apache-airflow-providers-edge3 1.1.3__py3-none-any.whl → 1.2.0__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.
Files changed (75) hide show
  1. airflow/providers/edge3/__init__.py +1 -1
  2. airflow/providers/edge3/cli/worker.py +6 -2
  3. airflow/providers/edge3/example_dags/integration_test.py +6 -2
  4. airflow/providers/edge3/example_dags/win_test.py +6 -1
  5. airflow/providers/edge3/openapi/v2-edge-generated.yaml +1138 -0
  6. airflow/providers/edge3/plugins/edge_executor_plugin.py +43 -3
  7. airflow/providers/edge3/plugins/www/.gitignore +27 -0
  8. airflow/providers/edge3/plugins/www/.prettierignore +6 -0
  9. airflow/providers/edge3/plugins/www/.prettierrc +13 -0
  10. airflow/providers/edge3/plugins/www/README.md +141 -0
  11. airflow/providers/edge3/plugins/www/dist/main.d.ts +1 -0
  12. airflow/providers/edge3/plugins/www/dist/main.umd.cjs +124 -0
  13. airflow/providers/edge3/plugins/www/eslint.config.js +54 -0
  14. airflow/providers/edge3/plugins/www/index.html +13 -0
  15. airflow/providers/edge3/plugins/www/openapi-gen/queries/common.ts +33 -0
  16. airflow/providers/edge3/plugins/www/openapi-gen/queries/ensureQueryData.ts +16 -0
  17. airflow/providers/edge3/plugins/www/openapi-gen/queries/index.ts +4 -0
  18. airflow/providers/edge3/plugins/www/openapi-gen/queries/infiniteQueries.ts +2 -0
  19. airflow/providers/edge3/plugins/www/openapi-gen/queries/prefetch.ts +16 -0
  20. airflow/providers/edge3/plugins/www/openapi-gen/queries/queries.ts +87 -0
  21. airflow/providers/edge3/plugins/www/openapi-gen/queries/suspense.ts +16 -0
  22. airflow/providers/edge3/plugins/www/openapi-gen/requests/core/ApiError.ts +21 -0
  23. airflow/providers/edge3/plugins/www/openapi-gen/requests/core/ApiRequestOptions.ts +21 -0
  24. airflow/providers/edge3/plugins/www/openapi-gen/requests/core/ApiResult.ts +7 -0
  25. airflow/providers/edge3/plugins/www/openapi-gen/requests/core/CancelablePromise.ts +126 -0
  26. airflow/providers/edge3/plugins/www/openapi-gen/requests/core/OpenAPI.ts +57 -0
  27. airflow/providers/edge3/plugins/www/openapi-gen/requests/core/request.ts +347 -0
  28. airflow/providers/edge3/plugins/www/openapi-gen/requests/index.ts +7 -0
  29. airflow/providers/edge3/plugins/www/openapi-gen/requests/schemas.gen.ts +700 -0
  30. airflow/providers/edge3/plugins/www/openapi-gen/requests/services.gen.ts +289 -0
  31. airflow/providers/edge3/plugins/www/openapi-gen/requests/types.gen.ts +655 -0
  32. airflow/providers/edge3/plugins/www/package.json +80 -0
  33. airflow/providers/edge3/plugins/www/pnpm-lock.yaml +6653 -0
  34. airflow/providers/edge3/plugins/www/src/components/ErrorAlert.tsx +66 -0
  35. airflow/providers/edge3/plugins/www/src/components/StateBadge.tsx +43 -0
  36. airflow/providers/edge3/plugins/www/src/components/StateIcon.tsx +58 -0
  37. airflow/providers/edge3/plugins/www/src/components/WorkerStateBadge.tsx +71 -0
  38. airflow/providers/edge3/plugins/www/src/components/WorkerStateIcon.tsx +57 -0
  39. airflow/providers/edge3/plugins/www/src/components/ui/Alert.tsx +62 -0
  40. airflow/providers/edge3/plugins/www/src/components/ui/CloseButton.tsx +32 -0
  41. airflow/providers/edge3/plugins/www/src/components/ui/index.ts +20 -0
  42. airflow/providers/edge3/plugins/www/src/context/colorMode/ColorModeProvider.tsx +24 -0
  43. airflow/providers/edge3/plugins/www/src/context/colorMode/index.ts +21 -0
  44. airflow/providers/edge3/plugins/www/src/context/colorMode/useColorMode.tsx +32 -0
  45. airflow/providers/edge3/plugins/www/src/dev.tsx +29 -0
  46. airflow/providers/edge3/plugins/www/src/layouts/EdgeLayout.tsx +44 -0
  47. airflow/providers/edge3/plugins/www/src/layouts/NavTabs.tsx +63 -0
  48. airflow/providers/edge3/plugins/www/src/main.tsx +58 -0
  49. airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx +88 -0
  50. airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx +105 -0
  51. airflow/providers/edge3/plugins/www/src/res/README.md +24 -0
  52. airflow/providers/edge3/plugins/www/src/res/cloud-computer-dark.svg +3 -0
  53. airflow/providers/edge3/plugins/www/src/res/cloud-computer.svg +3 -0
  54. airflow/providers/edge3/plugins/www/src/theme.ts +176 -0
  55. airflow/providers/edge3/plugins/www/src/utils/config.ts +23 -0
  56. airflow/providers/edge3/plugins/www/src/utils/index.ts +22 -0
  57. airflow/providers/edge3/plugins/www/src/utils/tokenHandler.ts +51 -0
  58. airflow/providers/edge3/plugins/www/src/utils/useContainerWidth.ts +43 -0
  59. airflow/providers/edge3/plugins/www/src/vite-env.d.ts +20 -0
  60. airflow/providers/edge3/plugins/www/testsSetup.ts +19 -0
  61. airflow/providers/edge3/plugins/www/tsconfig.app.json +31 -0
  62. airflow/providers/edge3/plugins/www/tsconfig.json +8 -0
  63. airflow/providers/edge3/plugins/www/tsconfig.lib.json +15 -0
  64. airflow/providers/edge3/plugins/www/tsconfig.node.json +29 -0
  65. airflow/providers/edge3/plugins/www/vite.config.ts +95 -0
  66. airflow/providers/edge3/version_compat.py +1 -0
  67. airflow/providers/edge3/worker_api/app.py +34 -8
  68. airflow/providers/edge3/worker_api/datamodels_ui.py +67 -0
  69. airflow/providers/edge3/worker_api/routes/health.py +1 -1
  70. airflow/providers/edge3/worker_api/routes/ui.py +102 -0
  71. {apache_airflow_providers_edge3-1.1.3.dist-info → apache_airflow_providers_edge3-1.2.0.dist-info}/METADATA +7 -8
  72. apache_airflow_providers_edge3-1.2.0.dist-info/RECORD +103 -0
  73. apache_airflow_providers_edge3-1.1.3.dist-info/RECORD +0 -41
  74. {apache_airflow_providers_edge3-1.1.3.dist-info → apache_airflow_providers_edge3-1.2.0.dist-info}/WHEEL +0 -0
  75. {apache_airflow_providers_edge3-1.1.3.dist-info → apache_airflow_providers_edge3-1.2.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,289 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { CancelablePromise } from './core/CancelablePromise';
4
+ import { OpenAPI } from './core/OpenAPI';
5
+ import { request as __request } from './core/request';
6
+ import type { FetchData, FetchResponse, StateData, StateResponse, LogfilePathData, LogfilePathResponse, PushLogsData, PushLogsResponse, RegisterData, RegisterResponse, SetStateData, SetStateResponse, UpdateQueuesData, UpdateQueuesResponse, HealthResponse, WorkerResponse, JobsResponse } from './types.gen';
7
+
8
+ export class JobsService {
9
+ /**
10
+ * Fetch
11
+ * Fetch a job to execute on the edge worker.
12
+ * @param data The data for the request.
13
+ * @param data.workerName
14
+ * @param data.authorization JWT Authorization Token
15
+ * @param data.requestBody
16
+ * @returns unknown Successful Response
17
+ * @throws ApiError
18
+ */
19
+ public static fetch(data: FetchData): CancelablePromise<FetchResponse> {
20
+ return __request(OpenAPI, {
21
+ method: 'POST',
22
+ url: '/edge_worker/v1/jobs/fetch/{worker_name}',
23
+ path: {
24
+ worker_name: data.workerName
25
+ },
26
+ headers: {
27
+ authorization: data.authorization
28
+ },
29
+ body: data.requestBody,
30
+ mediaType: 'application/json',
31
+ errors: {
32
+ 400: 'Bad Request',
33
+ 403: 'Forbidden',
34
+ 422: 'Validation Error'
35
+ }
36
+ });
37
+ }
38
+
39
+ /**
40
+ * State
41
+ * Update the state of a job running on the edge worker.
42
+ * @param data The data for the request.
43
+ * @param data.dagId Identifier of the DAG to which the task belongs.
44
+ * @param data.taskId Task name in the DAG.
45
+ * @param data.runId Run ID of the DAG execution.
46
+ * @param data.tryNumber The number of attempt to execute this task.
47
+ * @param data.mapIndex For dynamically mapped tasks the mapping number, -1 if the task is not mapped.
48
+ * @param data.state State of the assigned task under execution.
49
+ * @param data.authorization JWT Authorization Token
50
+ * @returns null Successful Response
51
+ * @throws ApiError
52
+ */
53
+ public static state(data: StateData): CancelablePromise<StateResponse> {
54
+ return __request(OpenAPI, {
55
+ method: 'PATCH',
56
+ url: '/edge_worker/v1/jobs/state/{dag_id}/{task_id}/{run_id}/{try_number}/{map_index}/{state}',
57
+ path: {
58
+ dag_id: data.dagId,
59
+ task_id: data.taskId,
60
+ run_id: data.runId,
61
+ try_number: data.tryNumber,
62
+ map_index: data.mapIndex,
63
+ state: data.state
64
+ },
65
+ headers: {
66
+ authorization: data.authorization
67
+ },
68
+ errors: {
69
+ 400: 'Bad Request',
70
+ 403: 'Forbidden',
71
+ 422: 'Validation Error'
72
+ }
73
+ });
74
+ }
75
+
76
+ }
77
+
78
+ export class LogsService {
79
+ /**
80
+ * Logfile Path
81
+ * Elaborate the path and filename to expect from task execution.
82
+ * @param data The data for the request.
83
+ * @param data.dagId Identifier of the DAG to which the task belongs.
84
+ * @param data.taskId Task name in the DAG.
85
+ * @param data.runId Run ID of the DAG execution.
86
+ * @param data.tryNumber The number of attempt to execute this task.
87
+ * @param data.mapIndex For dynamically mapped tasks the mapping number, -1 if the task is not mapped.
88
+ * @param data.authorization JWT Authorization Token
89
+ * @returns string Successful Response
90
+ * @throws ApiError
91
+ */
92
+ public static logfilePath(data: LogfilePathData): CancelablePromise<LogfilePathResponse> {
93
+ return __request(OpenAPI, {
94
+ method: 'GET',
95
+ url: '/edge_worker/v1/logs/logfile_path/{dag_id}/{task_id}/{run_id}/{try_number}/{map_index}',
96
+ path: {
97
+ dag_id: data.dagId,
98
+ task_id: data.taskId,
99
+ run_id: data.runId,
100
+ try_number: data.tryNumber,
101
+ map_index: data.mapIndex
102
+ },
103
+ headers: {
104
+ authorization: data.authorization
105
+ },
106
+ errors: {
107
+ 400: 'Bad Request',
108
+ 403: 'Forbidden',
109
+ 422: 'Validation Error'
110
+ }
111
+ });
112
+ }
113
+
114
+ /**
115
+ * Push Logs
116
+ * Push an incremental log chunk from Edge Worker to central site.
117
+ * @param data The data for the request.
118
+ * @param data.dagId Identifier of the DAG to which the task belongs.
119
+ * @param data.taskId Task name in the DAG.
120
+ * @param data.runId Run ID of the DAG execution.
121
+ * @param data.tryNumber The number of attempt to execute this task.
122
+ * @param data.mapIndex For dynamically mapped tasks the mapping number, -1 if the task is not mapped.
123
+ * @param data.authorization JWT Authorization Token
124
+ * @param data.requestBody
125
+ * @returns null Successful Response
126
+ * @throws ApiError
127
+ */
128
+ public static pushLogs(data: PushLogsData): CancelablePromise<PushLogsResponse> {
129
+ return __request(OpenAPI, {
130
+ method: 'POST',
131
+ url: '/edge_worker/v1/logs/push/{dag_id}/{task_id}/{run_id}/{try_number}/{map_index}',
132
+ path: {
133
+ dag_id: data.dagId,
134
+ task_id: data.taskId,
135
+ run_id: data.runId,
136
+ try_number: data.tryNumber,
137
+ map_index: data.mapIndex
138
+ },
139
+ headers: {
140
+ authorization: data.authorization
141
+ },
142
+ body: data.requestBody,
143
+ mediaType: 'application/json',
144
+ errors: {
145
+ 400: 'Bad Request',
146
+ 403: 'Forbidden',
147
+ 422: 'Validation Error'
148
+ }
149
+ });
150
+ }
151
+
152
+ }
153
+
154
+ export class WorkerService {
155
+ /**
156
+ * Register
157
+ * Register a new worker to the backend.
158
+ * @param data The data for the request.
159
+ * @param data.workerName Hostname or instance name of the worker
160
+ * @param data.authorization JWT Authorization Token
161
+ * @param data.requestBody
162
+ * @returns WorkerRegistrationReturn Successful Response
163
+ * @throws ApiError
164
+ */
165
+ public static register(data: RegisterData): CancelablePromise<RegisterResponse> {
166
+ return __request(OpenAPI, {
167
+ method: 'POST',
168
+ url: '/edge_worker/v1/worker/{worker_name}',
169
+ path: {
170
+ worker_name: data.workerName
171
+ },
172
+ headers: {
173
+ authorization: data.authorization
174
+ },
175
+ body: data.requestBody,
176
+ mediaType: 'application/json',
177
+ errors: {
178
+ 400: 'Bad Request',
179
+ 403: 'Forbidden',
180
+ 422: 'Validation Error'
181
+ }
182
+ });
183
+ }
184
+
185
+ /**
186
+ * Set State
187
+ * Set state of worker and returns the current assigned queues.
188
+ * @param data The data for the request.
189
+ * @param data.workerName Hostname or instance name of the worker
190
+ * @param data.authorization JWT Authorization Token
191
+ * @param data.requestBody
192
+ * @returns WorkerSetStateReturn Successful Response
193
+ * @throws ApiError
194
+ */
195
+ public static setState(data: SetStateData): CancelablePromise<SetStateResponse> {
196
+ return __request(OpenAPI, {
197
+ method: 'PATCH',
198
+ url: '/edge_worker/v1/worker/{worker_name}',
199
+ path: {
200
+ worker_name: data.workerName
201
+ },
202
+ headers: {
203
+ authorization: data.authorization
204
+ },
205
+ body: data.requestBody,
206
+ mediaType: 'application/json',
207
+ errors: {
208
+ 400: 'Bad Request',
209
+ 403: 'Forbidden',
210
+ 422: 'Validation Error'
211
+ }
212
+ });
213
+ }
214
+
215
+ /**
216
+ * Update Queues
217
+ * @param data The data for the request.
218
+ * @param data.workerName Hostname or instance name of the worker
219
+ * @param data.authorization JWT Authorization Token
220
+ * @param data.requestBody
221
+ * @returns null Successful Response
222
+ * @throws ApiError
223
+ */
224
+ public static updateQueues(data: UpdateQueuesData): CancelablePromise<UpdateQueuesResponse> {
225
+ return __request(OpenAPI, {
226
+ method: 'PATCH',
227
+ url: '/edge_worker/v1/worker/queues/{worker_name}',
228
+ path: {
229
+ worker_name: data.workerName
230
+ },
231
+ headers: {
232
+ authorization: data.authorization
233
+ },
234
+ body: data.requestBody,
235
+ mediaType: 'application/json',
236
+ errors: {
237
+ 400: 'Bad Request',
238
+ 403: 'Forbidden',
239
+ 422: 'Validation Error'
240
+ }
241
+ });
242
+ }
243
+
244
+ }
245
+
246
+ export class MonitorService {
247
+ /**
248
+ * Health
249
+ * Report API Health.
250
+ * @returns string Successful Response
251
+ * @throws ApiError
252
+ */
253
+ public static health(): CancelablePromise<HealthResponse> {
254
+ return __request(OpenAPI, {
255
+ method: 'GET',
256
+ url: '/edge_worker/v1/health'
257
+ });
258
+ }
259
+
260
+ }
261
+
262
+ export class UiService {
263
+ /**
264
+ * Worker
265
+ * Return Edge Workers.
266
+ * @returns WorkerCollectionResponse Successful Response
267
+ * @throws ApiError
268
+ */
269
+ public static worker(): CancelablePromise<WorkerResponse> {
270
+ return __request(OpenAPI, {
271
+ method: 'GET',
272
+ url: '/edge_worker/ui/worker'
273
+ });
274
+ }
275
+
276
+ /**
277
+ * Jobs
278
+ * Return Edge Jobs.
279
+ * @returns JobCollectionResponse Successful Response
280
+ * @throws ApiError
281
+ */
282
+ public static jobs(): CancelablePromise<JobsResponse> {
283
+ return __request(OpenAPI, {
284
+ method: 'GET',
285
+ url: '/edge_worker/ui/jobs'
286
+ });
287
+ }
288
+
289
+ }