apache-airflow-providers-edge3 1.1.3__py3-none-any.whl → 1.2.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airflow/providers/edge3/__init__.py +1 -1
- airflow/providers/edge3/cli/worker.py +6 -2
- airflow/providers/edge3/example_dags/integration_test.py +6 -2
- airflow/providers/edge3/example_dags/win_test.py +6 -1
- airflow/providers/edge3/openapi/v2-edge-generated.yaml +1138 -0
- airflow/providers/edge3/plugins/edge_executor_plugin.py +43 -3
- airflow/providers/edge3/plugins/www/.gitignore +27 -0
- airflow/providers/edge3/plugins/www/.prettierignore +6 -0
- airflow/providers/edge3/plugins/www/.prettierrc +13 -0
- airflow/providers/edge3/plugins/www/README.md +141 -0
- airflow/providers/edge3/plugins/www/dist/main.d.ts +1 -0
- airflow/providers/edge3/plugins/www/dist/main.umd.cjs +124 -0
- airflow/providers/edge3/plugins/www/eslint.config.js +54 -0
- airflow/providers/edge3/plugins/www/index.html +13 -0
- airflow/providers/edge3/plugins/www/openapi-gen/queries/common.ts +33 -0
- airflow/providers/edge3/plugins/www/openapi-gen/queries/ensureQueryData.ts +16 -0
- airflow/providers/edge3/plugins/www/openapi-gen/queries/index.ts +4 -0
- airflow/providers/edge3/plugins/www/openapi-gen/queries/infiniteQueries.ts +2 -0
- airflow/providers/edge3/plugins/www/openapi-gen/queries/prefetch.ts +16 -0
- airflow/providers/edge3/plugins/www/openapi-gen/queries/queries.ts +87 -0
- airflow/providers/edge3/plugins/www/openapi-gen/queries/suspense.ts +16 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/core/ApiError.ts +21 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/core/ApiRequestOptions.ts +21 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/core/ApiResult.ts +7 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/core/CancelablePromise.ts +126 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/core/OpenAPI.ts +57 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/core/request.ts +347 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/index.ts +7 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/schemas.gen.ts +700 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/services.gen.ts +289 -0
- airflow/providers/edge3/plugins/www/openapi-gen/requests/types.gen.ts +655 -0
- airflow/providers/edge3/plugins/www/package.json +80 -0
- airflow/providers/edge3/plugins/www/pnpm-lock.yaml +6653 -0
- airflow/providers/edge3/plugins/www/src/components/ErrorAlert.tsx +66 -0
- airflow/providers/edge3/plugins/www/src/components/StateBadge.tsx +43 -0
- airflow/providers/edge3/plugins/www/src/components/StateIcon.tsx +58 -0
- airflow/providers/edge3/plugins/www/src/components/WorkerStateBadge.tsx +71 -0
- airflow/providers/edge3/plugins/www/src/components/WorkerStateIcon.tsx +57 -0
- airflow/providers/edge3/plugins/www/src/components/ui/Alert.tsx +62 -0
- airflow/providers/edge3/plugins/www/src/components/ui/CloseButton.tsx +32 -0
- airflow/providers/edge3/plugins/www/src/components/ui/index.ts +20 -0
- airflow/providers/edge3/plugins/www/src/context/colorMode/ColorModeProvider.tsx +24 -0
- airflow/providers/edge3/plugins/www/src/context/colorMode/index.ts +21 -0
- airflow/providers/edge3/plugins/www/src/context/colorMode/useColorMode.tsx +32 -0
- airflow/providers/edge3/plugins/www/src/dev.tsx +29 -0
- airflow/providers/edge3/plugins/www/src/layouts/EdgeLayout.tsx +44 -0
- airflow/providers/edge3/plugins/www/src/layouts/NavTabs.tsx +63 -0
- airflow/providers/edge3/plugins/www/src/main.tsx +58 -0
- airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx +88 -0
- airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx +105 -0
- airflow/providers/edge3/plugins/www/src/res/README.md +24 -0
- airflow/providers/edge3/plugins/www/src/res/cloud-computer-dark.svg +3 -0
- airflow/providers/edge3/plugins/www/src/res/cloud-computer.svg +3 -0
- airflow/providers/edge3/plugins/www/src/theme.ts +176 -0
- airflow/providers/edge3/plugins/www/src/utils/config.ts +23 -0
- airflow/providers/edge3/plugins/www/src/utils/index.ts +22 -0
- airflow/providers/edge3/plugins/www/src/utils/tokenHandler.ts +51 -0
- airflow/providers/edge3/plugins/www/src/utils/useContainerWidth.ts +43 -0
- airflow/providers/edge3/plugins/www/src/vite-env.d.ts +20 -0
- airflow/providers/edge3/plugins/www/testsSetup.ts +19 -0
- airflow/providers/edge3/plugins/www/tsconfig.app.json +31 -0
- airflow/providers/edge3/plugins/www/tsconfig.json +8 -0
- airflow/providers/edge3/plugins/www/tsconfig.lib.json +15 -0
- airflow/providers/edge3/plugins/www/tsconfig.node.json +29 -0
- airflow/providers/edge3/plugins/www/vite.config.ts +95 -0
- airflow/providers/edge3/version_compat.py +1 -0
- airflow/providers/edge3/worker_api/app.py +34 -8
- airflow/providers/edge3/worker_api/datamodels_ui.py +67 -0
- airflow/providers/edge3/worker_api/routes/health.py +1 -1
- airflow/providers/edge3/worker_api/routes/ui.py +102 -0
- {apache_airflow_providers_edge3-1.1.3.dist-info → apache_airflow_providers_edge3-1.2.0rc1.dist-info}/METADATA +8 -9
- apache_airflow_providers_edge3-1.2.0rc1.dist-info/RECORD +103 -0
- apache_airflow_providers_edge3-1.1.3.dist-info/RECORD +0 -41
- {apache_airflow_providers_edge3-1.1.3.dist-info → apache_airflow_providers_edge3-1.2.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_edge3-1.1.3.dist-info → apache_airflow_providers_edge3-1.2.0rc1.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,700 @@
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
2
|
+
|
3
|
+
export const $BundleInfo = {
|
4
|
+
properties: {
|
5
|
+
name: {
|
6
|
+
type: 'string',
|
7
|
+
title: 'Name'
|
8
|
+
},
|
9
|
+
version: {
|
10
|
+
anyOf: [
|
11
|
+
{
|
12
|
+
type: 'string'
|
13
|
+
},
|
14
|
+
{
|
15
|
+
type: 'null'
|
16
|
+
}
|
17
|
+
],
|
18
|
+
title: 'Version'
|
19
|
+
}
|
20
|
+
},
|
21
|
+
type: 'object',
|
22
|
+
required: ['name'],
|
23
|
+
title: 'BundleInfo',
|
24
|
+
description: 'Schema for telling task which bundle to run with.'
|
25
|
+
} as const;
|
26
|
+
|
27
|
+
export const $EdgeJobFetched = {
|
28
|
+
properties: {
|
29
|
+
dag_id: {
|
30
|
+
type: 'string',
|
31
|
+
title: 'Dag ID',
|
32
|
+
description: 'Identifier of the DAG to which the task belongs.'
|
33
|
+
},
|
34
|
+
task_id: {
|
35
|
+
type: 'string',
|
36
|
+
title: 'Task ID',
|
37
|
+
description: 'Task name in the DAG.'
|
38
|
+
},
|
39
|
+
run_id: {
|
40
|
+
type: 'string',
|
41
|
+
title: 'Run ID',
|
42
|
+
description: 'Run ID of the DAG execution.'
|
43
|
+
},
|
44
|
+
map_index: {
|
45
|
+
type: 'integer',
|
46
|
+
title: 'Map Index',
|
47
|
+
description: 'For dynamically mapped tasks the mapping number, -1 if the task is not mapped.'
|
48
|
+
},
|
49
|
+
try_number: {
|
50
|
+
type: 'integer',
|
51
|
+
title: 'Try Number',
|
52
|
+
description: 'The number of attempt to execute this task.'
|
53
|
+
},
|
54
|
+
command: {
|
55
|
+
'$ref': '#/components/schemas/ExecuteTask',
|
56
|
+
title: 'Command',
|
57
|
+
description: 'Command line to use to execute the job in Airflow 2. Task definition in Airflow 3'
|
58
|
+
},
|
59
|
+
concurrency_slots: {
|
60
|
+
type: 'integer',
|
61
|
+
title: 'Concurrency Slots',
|
62
|
+
description: 'Number of concurrency slots the job requires.'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
type: 'object',
|
66
|
+
required: ['dag_id', 'task_id', 'run_id', 'map_index', 'try_number', 'command', 'concurrency_slots'],
|
67
|
+
title: 'EdgeJobFetched',
|
68
|
+
description: 'Job that is to be executed on the edge worker.'
|
69
|
+
} as const;
|
70
|
+
|
71
|
+
export const $EdgeWorkerState = {
|
72
|
+
type: 'string',
|
73
|
+
enum: ['starting', 'running', 'idle', 'shutdown request', 'terminating', 'offline', 'unknown', 'maintenance request', 'maintenance pending', 'maintenance mode', 'maintenance exit', 'offline maintenance'],
|
74
|
+
title: 'EdgeWorkerState',
|
75
|
+
description: 'Status of a Edge Worker instance.'
|
76
|
+
} as const;
|
77
|
+
|
78
|
+
export const $ExecuteTask = {
|
79
|
+
properties: {
|
80
|
+
token: {
|
81
|
+
type: 'string',
|
82
|
+
title: 'Token'
|
83
|
+
},
|
84
|
+
ti: {
|
85
|
+
'$ref': '#/components/schemas/TaskInstance'
|
86
|
+
},
|
87
|
+
dag_rel_path: {
|
88
|
+
type: 'string',
|
89
|
+
format: 'path',
|
90
|
+
title: 'Dag Rel Path'
|
91
|
+
},
|
92
|
+
bundle_info: {
|
93
|
+
'$ref': '#/components/schemas/BundleInfo'
|
94
|
+
},
|
95
|
+
log_path: {
|
96
|
+
anyOf: [
|
97
|
+
{
|
98
|
+
type: 'string'
|
99
|
+
},
|
100
|
+
{
|
101
|
+
type: 'null'
|
102
|
+
}
|
103
|
+
],
|
104
|
+
title: 'Log Path'
|
105
|
+
},
|
106
|
+
type: {
|
107
|
+
type: 'string',
|
108
|
+
const: 'ExecuteTask',
|
109
|
+
title: 'Type',
|
110
|
+
default: 'ExecuteTask'
|
111
|
+
}
|
112
|
+
},
|
113
|
+
type: 'object',
|
114
|
+
required: ['token', 'ti', 'dag_rel_path', 'bundle_info', 'log_path'],
|
115
|
+
title: 'ExecuteTask',
|
116
|
+
description: 'Execute the given Task.'
|
117
|
+
} as const;
|
118
|
+
|
119
|
+
export const $HTTPExceptionResponse = {
|
120
|
+
properties: {
|
121
|
+
detail: {
|
122
|
+
anyOf: [
|
123
|
+
{
|
124
|
+
type: 'string'
|
125
|
+
},
|
126
|
+
{
|
127
|
+
additionalProperties: true,
|
128
|
+
type: 'object'
|
129
|
+
}
|
130
|
+
],
|
131
|
+
title: 'Detail'
|
132
|
+
}
|
133
|
+
},
|
134
|
+
type: 'object',
|
135
|
+
required: ['detail'],
|
136
|
+
title: 'HTTPExceptionResponse',
|
137
|
+
description: 'HTTPException Model used for error response.'
|
138
|
+
} as const;
|
139
|
+
|
140
|
+
export const $HTTPValidationError = {
|
141
|
+
properties: {
|
142
|
+
detail: {
|
143
|
+
items: {
|
144
|
+
'$ref': '#/components/schemas/ValidationError'
|
145
|
+
},
|
146
|
+
type: 'array',
|
147
|
+
title: 'Detail'
|
148
|
+
}
|
149
|
+
},
|
150
|
+
type: 'object',
|
151
|
+
title: 'HTTPValidationError'
|
152
|
+
} as const;
|
153
|
+
|
154
|
+
export const $Job = {
|
155
|
+
properties: {
|
156
|
+
dag_id: {
|
157
|
+
type: 'string',
|
158
|
+
title: 'Dag ID',
|
159
|
+
description: 'Identifier of the DAG to which the task belongs.'
|
160
|
+
},
|
161
|
+
task_id: {
|
162
|
+
type: 'string',
|
163
|
+
title: 'Task ID',
|
164
|
+
description: 'Task name in the DAG.'
|
165
|
+
},
|
166
|
+
run_id: {
|
167
|
+
type: 'string',
|
168
|
+
title: 'Run ID',
|
169
|
+
description: 'Run ID of the DAG execution.'
|
170
|
+
},
|
171
|
+
map_index: {
|
172
|
+
type: 'integer',
|
173
|
+
title: 'Map Index',
|
174
|
+
description: 'For dynamically mapped tasks the mapping number, -1 if the task is not mapped.'
|
175
|
+
},
|
176
|
+
try_number: {
|
177
|
+
type: 'integer',
|
178
|
+
title: 'Try Number',
|
179
|
+
description: 'The number of attempt to execute this task.'
|
180
|
+
},
|
181
|
+
state: {
|
182
|
+
'$ref': '#/components/schemas/TaskInstanceState',
|
183
|
+
description: 'State of the job from the view of the executor.'
|
184
|
+
},
|
185
|
+
queue: {
|
186
|
+
type: 'string',
|
187
|
+
title: 'Queue',
|
188
|
+
description: 'Queue for which the task is scheduled/running.'
|
189
|
+
},
|
190
|
+
queued_dttm: {
|
191
|
+
anyOf: [
|
192
|
+
{
|
193
|
+
type: 'string',
|
194
|
+
format: 'date-time'
|
195
|
+
},
|
196
|
+
{
|
197
|
+
type: 'null'
|
198
|
+
}
|
199
|
+
],
|
200
|
+
title: 'Queued Dttm',
|
201
|
+
description: 'When the job was queued.'
|
202
|
+
},
|
203
|
+
edge_worker: {
|
204
|
+
anyOf: [
|
205
|
+
{
|
206
|
+
type: 'string'
|
207
|
+
},
|
208
|
+
{
|
209
|
+
type: 'null'
|
210
|
+
}
|
211
|
+
],
|
212
|
+
title: 'Edge Worker',
|
213
|
+
description: 'The worker processing the job during execution.'
|
214
|
+
},
|
215
|
+
last_update: {
|
216
|
+
anyOf: [
|
217
|
+
{
|
218
|
+
type: 'string',
|
219
|
+
format: 'date-time'
|
220
|
+
},
|
221
|
+
{
|
222
|
+
type: 'null'
|
223
|
+
}
|
224
|
+
],
|
225
|
+
title: 'Last Update',
|
226
|
+
description: 'Last heartbeat of the job.'
|
227
|
+
}
|
228
|
+
},
|
229
|
+
type: 'object',
|
230
|
+
required: ['dag_id', 'task_id', 'run_id', 'map_index', 'try_number', 'state', 'queue'],
|
231
|
+
title: 'Job',
|
232
|
+
description: 'Details of the job sent to the scheduler.'
|
233
|
+
} as const;
|
234
|
+
|
235
|
+
export const $JobCollectionResponse = {
|
236
|
+
properties: {
|
237
|
+
jobs: {
|
238
|
+
items: {
|
239
|
+
'$ref': '#/components/schemas/Job'
|
240
|
+
},
|
241
|
+
type: 'array',
|
242
|
+
title: 'Jobs'
|
243
|
+
},
|
244
|
+
total_entries: {
|
245
|
+
type: 'integer',
|
246
|
+
title: 'Total Entries'
|
247
|
+
}
|
248
|
+
},
|
249
|
+
type: 'object',
|
250
|
+
required: ['jobs', 'total_entries'],
|
251
|
+
title: 'JobCollectionResponse',
|
252
|
+
description: 'Job Collection serializer.'
|
253
|
+
} as const;
|
254
|
+
|
255
|
+
export const $PushLogsBody = {
|
256
|
+
properties: {
|
257
|
+
log_chunk_time: {
|
258
|
+
type: 'string',
|
259
|
+
format: 'date-time',
|
260
|
+
title: 'Log Chunk Time',
|
261
|
+
description: 'Time of the log chunk at point of sending.'
|
262
|
+
},
|
263
|
+
log_chunk_data: {
|
264
|
+
type: 'string',
|
265
|
+
title: 'Log Chunk Data',
|
266
|
+
description: 'Log chunk data as incremental log text.'
|
267
|
+
}
|
268
|
+
},
|
269
|
+
type: 'object',
|
270
|
+
required: ['log_chunk_time', 'log_chunk_data'],
|
271
|
+
title: 'PushLogsBody',
|
272
|
+
description: 'Incremental new log content from worker.'
|
273
|
+
} as const;
|
274
|
+
|
275
|
+
export const $TaskInstance = {
|
276
|
+
properties: {
|
277
|
+
id: {
|
278
|
+
type: 'string',
|
279
|
+
format: 'uuid',
|
280
|
+
title: 'Id'
|
281
|
+
},
|
282
|
+
dag_version_id: {
|
283
|
+
type: 'string',
|
284
|
+
format: 'uuid',
|
285
|
+
title: 'Dag Version Id'
|
286
|
+
},
|
287
|
+
task_id: {
|
288
|
+
type: 'string',
|
289
|
+
title: 'Task Id'
|
290
|
+
},
|
291
|
+
dag_id: {
|
292
|
+
type: 'string',
|
293
|
+
title: 'Dag Id'
|
294
|
+
},
|
295
|
+
run_id: {
|
296
|
+
type: 'string',
|
297
|
+
title: 'Run Id'
|
298
|
+
},
|
299
|
+
try_number: {
|
300
|
+
type: 'integer',
|
301
|
+
title: 'Try Number'
|
302
|
+
},
|
303
|
+
map_index: {
|
304
|
+
type: 'integer',
|
305
|
+
title: 'Map Index',
|
306
|
+
default: -1
|
307
|
+
},
|
308
|
+
pool_slots: {
|
309
|
+
type: 'integer',
|
310
|
+
title: 'Pool Slots'
|
311
|
+
},
|
312
|
+
queue: {
|
313
|
+
type: 'string',
|
314
|
+
title: 'Queue'
|
315
|
+
},
|
316
|
+
priority_weight: {
|
317
|
+
type: 'integer',
|
318
|
+
title: 'Priority Weight'
|
319
|
+
},
|
320
|
+
parent_context_carrier: {
|
321
|
+
anyOf: [
|
322
|
+
{
|
323
|
+
additionalProperties: true,
|
324
|
+
type: 'object'
|
325
|
+
},
|
326
|
+
{
|
327
|
+
type: 'null'
|
328
|
+
}
|
329
|
+
],
|
330
|
+
title: 'Parent Context Carrier'
|
331
|
+
},
|
332
|
+
context_carrier: {
|
333
|
+
anyOf: [
|
334
|
+
{
|
335
|
+
additionalProperties: true,
|
336
|
+
type: 'object'
|
337
|
+
},
|
338
|
+
{
|
339
|
+
type: 'null'
|
340
|
+
}
|
341
|
+
],
|
342
|
+
title: 'Context Carrier'
|
343
|
+
}
|
344
|
+
},
|
345
|
+
type: 'object',
|
346
|
+
required: ['id', 'dag_version_id', 'task_id', 'dag_id', 'run_id', 'try_number', 'pool_slots', 'queue', 'priority_weight'],
|
347
|
+
title: 'TaskInstance',
|
348
|
+
description: 'Schema for TaskInstance with minimal required fields needed for Executors and Task SDK.'
|
349
|
+
} as const;
|
350
|
+
|
351
|
+
export const $TaskInstanceState = {
|
352
|
+
type: 'string',
|
353
|
+
enum: ['removed', 'scheduled', 'queued', 'running', 'success', 'restarting', 'failed', 'up_for_retry', 'up_for_reschedule', 'upstream_failed', 'skipped', 'deferred'],
|
354
|
+
title: 'TaskInstanceState',
|
355
|
+
description: `All possible states that a Task Instance can be in.
|
356
|
+
|
357
|
+
Note that None is also allowed, so always use this in a type hint with Optional.`
|
358
|
+
} as const;
|
359
|
+
|
360
|
+
export const $ValidationError = {
|
361
|
+
properties: {
|
362
|
+
loc: {
|
363
|
+
items: {
|
364
|
+
anyOf: [
|
365
|
+
{
|
366
|
+
type: 'string'
|
367
|
+
},
|
368
|
+
{
|
369
|
+
type: 'integer'
|
370
|
+
}
|
371
|
+
]
|
372
|
+
},
|
373
|
+
type: 'array',
|
374
|
+
title: 'Location'
|
375
|
+
},
|
376
|
+
msg: {
|
377
|
+
type: 'string',
|
378
|
+
title: 'Message'
|
379
|
+
},
|
380
|
+
type: {
|
381
|
+
type: 'string',
|
382
|
+
title: 'Error Type'
|
383
|
+
}
|
384
|
+
},
|
385
|
+
type: 'object',
|
386
|
+
required: ['loc', 'msg', 'type'],
|
387
|
+
title: 'ValidationError'
|
388
|
+
} as const;
|
389
|
+
|
390
|
+
export const $Worker = {
|
391
|
+
properties: {
|
392
|
+
queues: {
|
393
|
+
anyOf: [
|
394
|
+
{
|
395
|
+
items: {
|
396
|
+
type: 'string'
|
397
|
+
},
|
398
|
+
type: 'array'
|
399
|
+
},
|
400
|
+
{
|
401
|
+
type: 'null'
|
402
|
+
}
|
403
|
+
],
|
404
|
+
title: 'Queues',
|
405
|
+
description: 'List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.'
|
406
|
+
},
|
407
|
+
state: {
|
408
|
+
'$ref': '#/components/schemas/EdgeWorkerState',
|
409
|
+
description: 'State of the worker from the view of the worker.'
|
410
|
+
},
|
411
|
+
jobs_active: {
|
412
|
+
type: 'integer',
|
413
|
+
title: 'Jobs Active',
|
414
|
+
description: 'Number of active jobs the worker is running.',
|
415
|
+
default: 0
|
416
|
+
},
|
417
|
+
sysinfo: {
|
418
|
+
additionalProperties: {
|
419
|
+
anyOf: [
|
420
|
+
{
|
421
|
+
type: 'string'
|
422
|
+
},
|
423
|
+
{
|
424
|
+
type: 'integer'
|
425
|
+
}
|
426
|
+
]
|
427
|
+
},
|
428
|
+
type: 'object',
|
429
|
+
title: 'Sysinfo',
|
430
|
+
description: 'System information of the worker.',
|
431
|
+
examples: [
|
432
|
+
{
|
433
|
+
airflow_version: '2.0.0',
|
434
|
+
concurrency: 4,
|
435
|
+
edge_provider_version: '1.0.0',
|
436
|
+
free_concurrency: 3
|
437
|
+
}
|
438
|
+
]
|
439
|
+
},
|
440
|
+
maintenance_comments: {
|
441
|
+
anyOf: [
|
442
|
+
{
|
443
|
+
type: 'string'
|
444
|
+
},
|
445
|
+
{
|
446
|
+
type: 'null'
|
447
|
+
}
|
448
|
+
],
|
449
|
+
title: 'Maintenance Comments',
|
450
|
+
description: 'Comments about the maintenance state of the worker.'
|
451
|
+
},
|
452
|
+
worker_name: {
|
453
|
+
type: 'string',
|
454
|
+
title: 'Worker Name',
|
455
|
+
description: 'Name of the worker.'
|
456
|
+
},
|
457
|
+
first_online: {
|
458
|
+
anyOf: [
|
459
|
+
{
|
460
|
+
type: 'string',
|
461
|
+
format: 'date-time'
|
462
|
+
},
|
463
|
+
{
|
464
|
+
type: 'null'
|
465
|
+
}
|
466
|
+
],
|
467
|
+
title: 'First Online',
|
468
|
+
description: 'When the worker was first online.'
|
469
|
+
},
|
470
|
+
last_heartbeat: {
|
471
|
+
anyOf: [
|
472
|
+
{
|
473
|
+
type: 'string',
|
474
|
+
format: 'date-time'
|
475
|
+
},
|
476
|
+
{
|
477
|
+
type: 'null'
|
478
|
+
}
|
479
|
+
],
|
480
|
+
title: 'Last Heartbeat',
|
481
|
+
description: 'When the worker last sent a heartbeat.'
|
482
|
+
}
|
483
|
+
},
|
484
|
+
type: 'object',
|
485
|
+
required: ['state', 'sysinfo', 'worker_name'],
|
486
|
+
title: 'Worker',
|
487
|
+
description: 'Details of the worker state sent to the scheduler.'
|
488
|
+
} as const;
|
489
|
+
|
490
|
+
export const $WorkerCollectionResponse = {
|
491
|
+
properties: {
|
492
|
+
workers: {
|
493
|
+
items: {
|
494
|
+
'$ref': '#/components/schemas/Worker'
|
495
|
+
},
|
496
|
+
type: 'array',
|
497
|
+
title: 'Workers'
|
498
|
+
},
|
499
|
+
total_entries: {
|
500
|
+
type: 'integer',
|
501
|
+
title: 'Total Entries'
|
502
|
+
}
|
503
|
+
},
|
504
|
+
type: 'object',
|
505
|
+
required: ['workers', 'total_entries'],
|
506
|
+
title: 'WorkerCollectionResponse',
|
507
|
+
description: 'Worker Collection serializer.'
|
508
|
+
} as const;
|
509
|
+
|
510
|
+
export const $WorkerQueueUpdateBody = {
|
511
|
+
properties: {
|
512
|
+
new_queues: {
|
513
|
+
anyOf: [
|
514
|
+
{
|
515
|
+
items: {
|
516
|
+
type: 'string'
|
517
|
+
},
|
518
|
+
type: 'array'
|
519
|
+
},
|
520
|
+
{
|
521
|
+
type: 'null'
|
522
|
+
}
|
523
|
+
],
|
524
|
+
title: 'New Queues',
|
525
|
+
description: 'Additional queues to be added to worker.'
|
526
|
+
},
|
527
|
+
remove_queues: {
|
528
|
+
anyOf: [
|
529
|
+
{
|
530
|
+
items: {
|
531
|
+
type: 'string'
|
532
|
+
},
|
533
|
+
type: 'array'
|
534
|
+
},
|
535
|
+
{
|
536
|
+
type: 'null'
|
537
|
+
}
|
538
|
+
],
|
539
|
+
title: 'Remove Queues',
|
540
|
+
description: 'Queues to remove from worker.'
|
541
|
+
}
|
542
|
+
},
|
543
|
+
type: 'object',
|
544
|
+
required: ['new_queues', 'remove_queues'],
|
545
|
+
title: 'WorkerQueueUpdateBody',
|
546
|
+
description: 'Changed queues for the worker.'
|
547
|
+
} as const;
|
548
|
+
|
549
|
+
export const $WorkerQueuesBody = {
|
550
|
+
properties: {
|
551
|
+
queues: {
|
552
|
+
anyOf: [
|
553
|
+
{
|
554
|
+
items: {
|
555
|
+
type: 'string'
|
556
|
+
},
|
557
|
+
type: 'array'
|
558
|
+
},
|
559
|
+
{
|
560
|
+
type: 'null'
|
561
|
+
}
|
562
|
+
],
|
563
|
+
title: 'Queues',
|
564
|
+
description: 'List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.'
|
565
|
+
},
|
566
|
+
free_concurrency: {
|
567
|
+
type: 'integer',
|
568
|
+
title: 'Free Concurrency',
|
569
|
+
description: 'Number of free concurrency slots on the worker.'
|
570
|
+
}
|
571
|
+
},
|
572
|
+
type: 'object',
|
573
|
+
required: ['free_concurrency'],
|
574
|
+
title: 'WorkerQueuesBody',
|
575
|
+
description: 'Queues that a worker supports to run jobs on.'
|
576
|
+
} as const;
|
577
|
+
|
578
|
+
export const $WorkerRegistrationReturn = {
|
579
|
+
properties: {
|
580
|
+
last_update: {
|
581
|
+
type: 'string',
|
582
|
+
format: 'date-time',
|
583
|
+
title: 'Last Update',
|
584
|
+
description: 'Time of the last update of the worker.'
|
585
|
+
}
|
586
|
+
},
|
587
|
+
type: 'object',
|
588
|
+
required: ['last_update'],
|
589
|
+
title: 'WorkerRegistrationReturn',
|
590
|
+
description: 'The return class for the worker registration.'
|
591
|
+
} as const;
|
592
|
+
|
593
|
+
export const $WorkerSetStateReturn = {
|
594
|
+
properties: {
|
595
|
+
state: {
|
596
|
+
'$ref': '#/components/schemas/EdgeWorkerState',
|
597
|
+
description: 'State of the worker from the view of the server.'
|
598
|
+
},
|
599
|
+
queues: {
|
600
|
+
anyOf: [
|
601
|
+
{
|
602
|
+
items: {
|
603
|
+
type: 'string'
|
604
|
+
},
|
605
|
+
type: 'array'
|
606
|
+
},
|
607
|
+
{
|
608
|
+
type: 'null'
|
609
|
+
}
|
610
|
+
],
|
611
|
+
title: 'Queues',
|
612
|
+
description: 'List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.'
|
613
|
+
},
|
614
|
+
maintenance_comments: {
|
615
|
+
anyOf: [
|
616
|
+
{
|
617
|
+
type: 'string'
|
618
|
+
},
|
619
|
+
{
|
620
|
+
type: 'null'
|
621
|
+
}
|
622
|
+
],
|
623
|
+
title: 'Maintenance Comments',
|
624
|
+
description: 'Comments about the maintenance state of the worker.'
|
625
|
+
}
|
626
|
+
},
|
627
|
+
type: 'object',
|
628
|
+
required: ['state', 'queues'],
|
629
|
+
title: 'WorkerSetStateReturn',
|
630
|
+
description: 'The return class for the worker set state.'
|
631
|
+
} as const;
|
632
|
+
|
633
|
+
export const $WorkerStateBody = {
|
634
|
+
properties: {
|
635
|
+
queues: {
|
636
|
+
anyOf: [
|
637
|
+
{
|
638
|
+
items: {
|
639
|
+
type: 'string'
|
640
|
+
},
|
641
|
+
type: 'array'
|
642
|
+
},
|
643
|
+
{
|
644
|
+
type: 'null'
|
645
|
+
}
|
646
|
+
],
|
647
|
+
title: 'Queues',
|
648
|
+
description: 'List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.'
|
649
|
+
},
|
650
|
+
state: {
|
651
|
+
'$ref': '#/components/schemas/EdgeWorkerState',
|
652
|
+
description: 'State of the worker from the view of the worker.'
|
653
|
+
},
|
654
|
+
jobs_active: {
|
655
|
+
type: 'integer',
|
656
|
+
title: 'Jobs Active',
|
657
|
+
description: 'Number of active jobs the worker is running.',
|
658
|
+
default: 0
|
659
|
+
},
|
660
|
+
sysinfo: {
|
661
|
+
additionalProperties: {
|
662
|
+
anyOf: [
|
663
|
+
{
|
664
|
+
type: 'string'
|
665
|
+
},
|
666
|
+
{
|
667
|
+
type: 'integer'
|
668
|
+
}
|
669
|
+
]
|
670
|
+
},
|
671
|
+
type: 'object',
|
672
|
+
title: 'Sysinfo',
|
673
|
+
description: 'System information of the worker.',
|
674
|
+
examples: [
|
675
|
+
{
|
676
|
+
airflow_version: '2.0.0',
|
677
|
+
concurrency: 4,
|
678
|
+
edge_provider_version: '1.0.0',
|
679
|
+
free_concurrency: 3
|
680
|
+
}
|
681
|
+
]
|
682
|
+
},
|
683
|
+
maintenance_comments: {
|
684
|
+
anyOf: [
|
685
|
+
{
|
686
|
+
type: 'string'
|
687
|
+
},
|
688
|
+
{
|
689
|
+
type: 'null'
|
690
|
+
}
|
691
|
+
],
|
692
|
+
title: 'Maintenance Comments',
|
693
|
+
description: 'Comments about the maintenance state of the worker.'
|
694
|
+
}
|
695
|
+
},
|
696
|
+
type: 'object',
|
697
|
+
required: ['state', 'sysinfo'],
|
698
|
+
title: 'WorkerStateBody',
|
699
|
+
description: 'Details of the worker state sent to the scheduler.'
|
700
|
+
} as const;
|