Skip to content

Commit 6e47a7a

Browse files
committed
fix: broad rework of the pilots stack
1 parent 0dc45cf commit 6e47a7a

File tree

43 files changed

+2968
-2188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2968
-2188
lines changed

diracx-client/src/diracx/client/_generated/aio/operations/_operations.py

Lines changed: 103 additions & 124 deletions
Large diffs are not rendered by default.

diracx-client/src/diracx/client/_generated/aio/operations/_patch.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@
1212
__all__ = [
1313
"AuthOperations",
1414
"JobsOperations",
15+
"PilotsOperations",
1516
] # Add all objects you want publicly available to users at this package level
1617

1718
from ....patches.auth.aio import AuthOperations
1819
from ....patches.jobs.aio import JobsOperations
19-
20-
try:
21-
from ....patches.pilots.aio import PilotsOperations
22-
23-
__all__.append("PilotsOperations")
24-
except ImportError:
25-
pass
20+
from ....patches.pilots.aio import PilotsOperations
2621

2722

2823
def patch_sdk():

diracx-client/src/diracx/client/_generated/models/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
BodyAuthRevokeRefreshTokenByRefreshToken,
1717
BodyJobsRescheduleJobs,
1818
BodyJobsUnassignBulkJobsSandboxes,
19-
BodyPilotsAddPilotStamps,
20-
BodyPilotsUpdatePilotFields,
19+
BodyPilotsRegisterPilots,
20+
BodyPilotsUpdatePilotMetadata,
2121
GroupInfo,
2222
HTTPValidationError,
2323
HeartbeatData,
@@ -28,7 +28,7 @@
2828
JobStatusUpdate,
2929
Metadata,
3030
OpenIDConfiguration,
31-
PilotFieldsMapping,
31+
PilotMetadata,
3232
SandboxDownloadResponse,
3333
SandboxInfo,
3434
SandboxUploadResponse,
@@ -67,8 +67,8 @@
6767
"BodyAuthRevokeRefreshTokenByRefreshToken",
6868
"BodyJobsRescheduleJobs",
6969
"BodyJobsUnassignBulkJobsSandboxes",
70-
"BodyPilotsAddPilotStamps",
71-
"BodyPilotsUpdatePilotFields",
70+
"BodyPilotsRegisterPilots",
71+
"BodyPilotsUpdatePilotMetadata",
7272
"GroupInfo",
7373
"HTTPValidationError",
7474
"HeartbeatData",
@@ -79,7 +79,7 @@
7979
"JobStatusUpdate",
8080
"Metadata",
8181
"OpenIDConfiguration",
82-
"PilotFieldsMapping",
82+
"PilotMetadata",
8383
"SandboxDownloadResponse",
8484
"SandboxInfo",
8585
"SandboxUploadResponse",

diracx-client/src/diracx/client/_generated/models/_models.py

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ def __init__(self, *, job_ids: list[int], **kwargs: Any) -> None:
184184
self.job_ids = job_ids
185185

186186

187-
class BodyPilotsAddPilotStamps(_serialization.Model):
188-
"""Body_pilots_add_pilot_stamps.
187+
class BodyPilotsRegisterPilots(_serialization.Model):
188+
"""Body_pilots_register_pilots.
189189
190190
All required parameters must be populated in order to send to server.
191191
192-
:ivar pilot_stamps: List of the pilot stamps we want to add to the db. Required.
192+
:ivar pilot_stamps: Stamps of the pilots to create. Required.
193193
:vartype pilot_stamps: list[str]
194194
:ivar vo: Pilot virtual organization. Required.
195195
:vartype vo: str
@@ -201,8 +201,8 @@ class BodyPilotsAddPilotStamps(_serialization.Model):
201201
:vartype destination_site: str
202202
:ivar pilot_references: Association of a pilot reference with a pilot stamp.
203203
:vartype pilot_references: dict[str, str]
204-
:ivar pilot_status: Status of the pilots. Known values are: "Submitted", "Waiting", "Running",
205-
"Done", "Failed", "Deleted", "Aborted", and "Unknown".
204+
:ivar pilot_status: Initial status of the pilots. Known values are: "Submitted", "Waiting",
205+
"Running", "Done", "Failed", "Deleted", "Aborted", and "Unknown".
206206
:vartype pilot_status: str or ~_generated.models.PilotStatus
207207
"""
208208

@@ -234,7 +234,7 @@ def __init__(
234234
**kwargs: Any
235235
) -> None:
236236
"""
237-
:keyword pilot_stamps: List of the pilot stamps we want to add to the db. Required.
237+
:keyword pilot_stamps: Stamps of the pilots to create. Required.
238238
:paramtype pilot_stamps: list[str]
239239
:keyword vo: Pilot virtual organization. Required.
240240
:paramtype vo: str
@@ -246,7 +246,7 @@ def __init__(
246246
:paramtype destination_site: str
247247
:keyword pilot_references: Association of a pilot reference with a pilot stamp.
248248
:paramtype pilot_references: dict[str, str]
249-
:keyword pilot_status: Status of the pilots. Known values are: "Submitted", "Waiting",
249+
:keyword pilot_status: Initial status of the pilots. Known values are: "Submitted", "Waiting",
250250
"Running", "Done", "Failed", "Deleted", "Aborted", and "Unknown".
251251
:paramtype pilot_status: str or ~_generated.models.PilotStatus
252252
"""
@@ -260,31 +260,30 @@ def __init__(
260260
self.pilot_status = pilot_status
261261

262262

263-
class BodyPilotsUpdatePilotFields(_serialization.Model):
264-
"""Body_pilots_update_pilot_fields.
263+
class BodyPilotsUpdatePilotMetadata(_serialization.Model):
264+
"""Body_pilots_update_pilot_metadata.
265265
266266
All required parameters must be populated in order to send to server.
267267
268-
:ivar pilot_stamps_to_fields_mapping: (pilot_stamp, pilot_fields) mapping to change. Required.
269-
:vartype pilot_stamps_to_fields_mapping: list[~_generated.models.PilotFieldsMapping]
268+
:ivar pilot_metadata: Pilot metadata mappings to apply. Required.
269+
:vartype pilot_metadata: list[~_generated.models.PilotMetadata]
270270
"""
271271

272272
_validation = {
273-
"pilot_stamps_to_fields_mapping": {"required": True},
273+
"pilot_metadata": {"required": True},
274274
}
275275

276276
_attribute_map = {
277-
"pilot_stamps_to_fields_mapping": {"key": "pilot_stamps_to_fields_mapping", "type": "[PilotFieldsMapping]"},
277+
"pilot_metadata": {"key": "pilot_metadata", "type": "[PilotMetadata]"},
278278
}
279279

280-
def __init__(self, *, pilot_stamps_to_fields_mapping: list["_models.PilotFieldsMapping"], **kwargs: Any) -> None:
280+
def __init__(self, *, pilot_metadata: list["_models.PilotMetadata"], **kwargs: Any) -> None:
281281
"""
282-
:keyword pilot_stamps_to_fields_mapping: (pilot_stamp, pilot_fields) mapping to change.
283-
Required.
284-
:paramtype pilot_stamps_to_fields_mapping: list[~_generated.models.PilotFieldsMapping]
282+
:keyword pilot_metadata: Pilot metadata mappings to apply. Required.
283+
:paramtype pilot_metadata: list[~_generated.models.PilotMetadata]
285284
"""
286285
super().__init__(**kwargs)
287-
self.pilot_stamps_to_fields_mapping = pilot_stamps_to_fields_mapping
286+
self.pilot_metadata = pilot_metadata
288287

289288

290289
class GroupInfo(_serialization.Model):
@@ -1032,31 +1031,34 @@ def __init__(
10321031
self.code_challenge_methods_supported = code_challenge_methods_supported
10331032

10341033

1035-
class PilotFieldsMapping(_serialization.Model):
1036-
"""All the fields that a user can modify on a Pilot (except PilotStamp).
1034+
class PilotMetadata(_serialization.Model):
1035+
"""Mutable metadata attached to a pilot.
1036+
1037+
``PilotStamp`` identifies the pilot and cannot be changed. Every other
1038+
field is optional; when absent it is left untouched by an update.
10371039
10381040
All required parameters must be populated in order to send to server.
10391041
1040-
:ivar pilot_stamp: Pilotstamp. Required.
1042+
:ivar pilot_stamp: Immutable stamp identifying the pilot. Required.
10411043
:vartype pilot_stamp: str
1042-
:ivar status_reason: Statusreason.
1044+
:ivar status_reason: Human-readable reason for the current status.
10431045
:vartype status_reason: str
1044-
:ivar status: PilotStatus. Known values are: "Submitted", "Waiting", "Running", "Done",
1045-
"Failed", "Deleted", "Aborted", and "Unknown".
1046+
:ivar status: Current pilot status. Known values are: "Submitted", "Waiting", "Running",
1047+
"Done", "Failed", "Deleted", "Aborted", and "Unknown".
10461048
:vartype status: str or ~_generated.models.PilotStatus
1047-
:ivar bench_mark: Benchmark.
1049+
:ivar bench_mark: Pilot benchmark value.
10481050
:vartype bench_mark: float
1049-
:ivar destination_site: Destinationsite.
1051+
:ivar destination_site: Destination site.
10501052
:vartype destination_site: str
1051-
:ivar queue: Queue.
1053+
:ivar queue: Batch queue name.
10521054
:vartype queue: str
1053-
:ivar grid_site: Gridsite.
1055+
:ivar grid_site: Grid site.
10541056
:vartype grid_site: str
1055-
:ivar grid_type: Gridtype.
1057+
:ivar grid_type: Grid type.
10561058
:vartype grid_type: str
1057-
:ivar accounting_sent: Accountingsent.
1059+
:ivar accounting_sent: Whether accounting has been sent for this pilot.
10581060
:vartype accounting_sent: bool
1059-
:ivar current_job_id: Currentjobid.
1061+
:ivar current_job_id: ID of the job currently running on this pilot.
10601062
:vartype current_job_id: int
10611063
"""
10621064

@@ -1093,26 +1095,26 @@ def __init__(
10931095
**kwargs: Any
10941096
) -> None:
10951097
"""
1096-
:keyword pilot_stamp: Pilotstamp. Required.
1098+
:keyword pilot_stamp: Immutable stamp identifying the pilot. Required.
10971099
:paramtype pilot_stamp: str
1098-
:keyword status_reason: Statusreason.
1100+
:keyword status_reason: Human-readable reason for the current status.
10991101
:paramtype status_reason: str
1100-
:keyword status: PilotStatus. Known values are: "Submitted", "Waiting", "Running", "Done",
1101-
"Failed", "Deleted", "Aborted", and "Unknown".
1102+
:keyword status: Current pilot status. Known values are: "Submitted", "Waiting", "Running",
1103+
"Done", "Failed", "Deleted", "Aborted", and "Unknown".
11021104
:paramtype status: str or ~_generated.models.PilotStatus
1103-
:keyword bench_mark: Benchmark.
1105+
:keyword bench_mark: Pilot benchmark value.
11041106
:paramtype bench_mark: float
1105-
:keyword destination_site: Destinationsite.
1107+
:keyword destination_site: Destination site.
11061108
:paramtype destination_site: str
1107-
:keyword queue: Queue.
1109+
:keyword queue: Batch queue name.
11081110
:paramtype queue: str
1109-
:keyword grid_site: Gridsite.
1111+
:keyword grid_site: Grid site.
11101112
:paramtype grid_site: str
1111-
:keyword grid_type: Gridtype.
1113+
:keyword grid_type: Grid type.
11121114
:paramtype grid_type: str
1113-
:keyword accounting_sent: Accountingsent.
1115+
:keyword accounting_sent: Whether accounting has been sent for this pilot.
11141116
:paramtype accounting_sent: bool
1115-
:keyword current_job_id: Currentjobid.
1117+
:keyword current_job_id: ID of the job currently running on this pilot.
11161118
:paramtype current_job_id: int
11171119
"""
11181120
super().__init__(**kwargs)

0 commit comments

Comments
 (0)