apache-airflow-providers-edge3 1.4.1rc1__py3-none-any.whl → 1.4.1rc2__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/cli/api_client.py +9 -3
- airflow/providers/edge3/cli/worker.py +15 -9
- airflow/providers/edge3/executors/edge_executor.py +6 -4
- airflow/providers/edge3/models/edge_job.py +1 -1
- airflow/providers/edge3/models/edge_worker.py +21 -7
- airflow/providers/edge3/plugins/edge_executor_plugin.py +1 -2
- airflow/providers/edge3/plugins/www/dist/main.umd.cjs +13 -30
- airflow/providers/edge3/plugins/www/src/main.tsx +0 -5
- airflow/providers/edge3/plugins/www/src/utils/index.ts +0 -1
- airflow/providers/edge3/worker_api/routes/_v2_compat.py +1 -0
- airflow/providers/edge3/worker_api/routes/jobs.py +4 -5
- airflow/providers/edge3/worker_api/routes/ui.py +8 -3
- airflow/providers/edge3/worker_api/routes/worker.py +8 -4
- {apache_airflow_providers_edge3-1.4.1rc1.dist-info → apache_airflow_providers_edge3-1.4.1rc2.dist-info}/METADATA +1 -1
- {apache_airflow_providers_edge3-1.4.1rc1.dist-info → apache_airflow_providers_edge3-1.4.1rc2.dist-info}/RECORD +17 -18
- airflow/providers/edge3/plugins/www/src/utils/tokenHandler.ts +0 -51
- {apache_airflow_providers_edge3-1.4.1rc1.dist-info → apache_airflow_providers_edge3-1.4.1rc2.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_edge3-1.4.1rc1.dist-info → apache_airflow_providers_edge3-1.4.1rc2.dist-info}/entry_points.txt +0 -0
|
@@ -18,13 +18,11 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { ChakraProvider } from "@chakra-ui/react";
|
|
20
20
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
21
|
-
import axios from "axios";
|
|
22
21
|
import { OpenAPI } from "openapi/requests/core/OpenAPI";
|
|
23
22
|
import { FC } from "react";
|
|
24
23
|
|
|
25
24
|
import { ColorModeProvider } from "src/context/colorMode";
|
|
26
25
|
import { EdgeLayout } from "src/layouts/EdgeLayout";
|
|
27
|
-
import { tokenHandler } from "src/utils";
|
|
28
26
|
|
|
29
27
|
import { system } from "./theme";
|
|
30
28
|
|
|
@@ -39,9 +37,6 @@ const PluginComponent: FC<PluginComponentProps> = () => {
|
|
|
39
37
|
const baseUrl = new URL(baseHref, globalThis.location.origin);
|
|
40
38
|
OpenAPI.BASE = baseUrl.pathname.replace(/\/$/, ""); // Remove trailing slash
|
|
41
39
|
|
|
42
|
-
// ensure HTTP API calls are authenticated with current session token
|
|
43
|
-
axios.interceptors.request.use(tokenHandler);
|
|
44
|
-
|
|
45
40
|
const queryClient = new QueryClient({
|
|
46
41
|
defaultOptions: {
|
|
47
42
|
queries: {
|
|
@@ -39,7 +39,6 @@ from airflow.providers.edge3.worker_api.routes._v2_compat import (
|
|
|
39
39
|
status,
|
|
40
40
|
)
|
|
41
41
|
from airflow.stats import Stats
|
|
42
|
-
from airflow.utils.sqlalchemy import with_row_locks
|
|
43
42
|
from airflow.utils.state import TaskInstanceState
|
|
44
43
|
|
|
45
44
|
jobs_router = AirflowRouter(tags=["Jobs"], prefix="/jobs")
|
|
@@ -78,8 +77,8 @@ def fetch(
|
|
|
78
77
|
if body.queues:
|
|
79
78
|
query = query.where(EdgeJobModel.queue.in_(body.queues))
|
|
80
79
|
query = query.limit(1)
|
|
81
|
-
query =
|
|
82
|
-
job: EdgeJobModel = session.scalar(query)
|
|
80
|
+
query = query.with_for_update(skip_locked=True)
|
|
81
|
+
job: EdgeJobModel | None = session.scalar(query)
|
|
83
82
|
if not job:
|
|
84
83
|
return None
|
|
85
84
|
job.state = TaskInstanceState.RUNNING
|
|
@@ -148,7 +147,7 @@ def state(
|
|
|
148
147
|
)
|
|
149
148
|
Stats.incr("edge_worker.ti.finish", tags=tags)
|
|
150
149
|
|
|
151
|
-
|
|
150
|
+
query2 = (
|
|
152
151
|
update(EdgeJobModel)
|
|
153
152
|
.where(
|
|
154
153
|
EdgeJobModel.dag_id == dag_id,
|
|
@@ -159,4 +158,4 @@ def state(
|
|
|
159
158
|
)
|
|
160
159
|
.values(state=state, last_update=timezone.utcnow())
|
|
161
160
|
)
|
|
162
|
-
session.execute(
|
|
161
|
+
session.execute(query2)
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
+
from typing import TYPE_CHECKING
|
|
21
22
|
|
|
22
23
|
from fastapi import Depends, HTTPException, status
|
|
23
24
|
from sqlalchemy import select
|
|
@@ -44,6 +45,10 @@ from airflow.providers.edge3.worker_api.datamodels_ui import (
|
|
|
44
45
|
Worker,
|
|
45
46
|
WorkerCollectionResponse,
|
|
46
47
|
)
|
|
48
|
+
from airflow.utils.state import TaskInstanceState
|
|
49
|
+
|
|
50
|
+
if TYPE_CHECKING:
|
|
51
|
+
from sqlalchemy.engine import ScalarResult
|
|
47
52
|
|
|
48
53
|
ui_router = AirflowRouter(tags=["UI"])
|
|
49
54
|
|
|
@@ -59,7 +64,7 @@ def worker(
|
|
|
59
64
|
) -> WorkerCollectionResponse:
|
|
60
65
|
"""Return Edge Workers."""
|
|
61
66
|
query = select(EdgeWorkerModel).order_by(EdgeWorkerModel.worker_name)
|
|
62
|
-
workers:
|
|
67
|
+
workers: ScalarResult[EdgeWorkerModel] = session.scalars(query)
|
|
63
68
|
|
|
64
69
|
result = [
|
|
65
70
|
Worker(
|
|
@@ -91,7 +96,7 @@ def jobs(
|
|
|
91
96
|
) -> JobCollectionResponse:
|
|
92
97
|
"""Return Edge Jobs."""
|
|
93
98
|
query = select(EdgeJobModel).order_by(EdgeJobModel.queued_dttm)
|
|
94
|
-
jobs:
|
|
99
|
+
jobs: ScalarResult[EdgeJobModel] = session.scalars(query)
|
|
95
100
|
|
|
96
101
|
result = [
|
|
97
102
|
Job(
|
|
@@ -100,7 +105,7 @@ def jobs(
|
|
|
100
105
|
run_id=j.run_id,
|
|
101
106
|
map_index=j.map_index,
|
|
102
107
|
try_number=j.try_number,
|
|
103
|
-
state=j.state,
|
|
108
|
+
state=TaskInstanceState(j.state),
|
|
104
109
|
queue=j.queue,
|
|
105
110
|
queued_dttm=j.queued_dttm,
|
|
106
111
|
edge_worker=j.edge_worker,
|
|
@@ -172,7 +172,7 @@ def register(
|
|
|
172
172
|
"""Register a new worker to the backend."""
|
|
173
173
|
_assert_version(body.sysinfo)
|
|
174
174
|
query = select(EdgeWorkerModel).where(EdgeWorkerModel.worker_name == worker_name)
|
|
175
|
-
worker: EdgeWorkerModel = session.scalar(query)
|
|
175
|
+
worker: EdgeWorkerModel | None = session.scalar(query)
|
|
176
176
|
if not worker:
|
|
177
177
|
worker = EdgeWorkerModel(worker_name=worker_name, state=body.state, queues=body.queues)
|
|
178
178
|
worker.state = redefine_state(worker.state, body.state)
|
|
@@ -194,7 +194,9 @@ def set_state(
|
|
|
194
194
|
) -> WorkerSetStateReturn:
|
|
195
195
|
"""Set state of worker and returns the current assigned queues."""
|
|
196
196
|
query = select(EdgeWorkerModel).where(EdgeWorkerModel.worker_name == worker_name)
|
|
197
|
-
worker: EdgeWorkerModel = session.scalar(query)
|
|
197
|
+
worker: EdgeWorkerModel | None = session.scalar(query)
|
|
198
|
+
if not worker:
|
|
199
|
+
raise HTTPException(status.HTTP_404_NOT_FOUND, "Worker not found")
|
|
198
200
|
worker.state = redefine_state(worker.state, body.state)
|
|
199
201
|
worker.maintenance_comment = redefine_maintenance_comments(
|
|
200
202
|
worker.maintenance_comment, body.maintenance_comments
|
|
@@ -213,7 +215,7 @@ def set_state(
|
|
|
213
215
|
free_concurrency=int(body.sysinfo["free_concurrency"]),
|
|
214
216
|
queues=worker.queues,
|
|
215
217
|
)
|
|
216
|
-
_assert_version(body.sysinfo) #
|
|
218
|
+
_assert_version(body.sysinfo) # Exception only after worker state is in the DB
|
|
217
219
|
return WorkerSetStateReturn(
|
|
218
220
|
state=worker.state, queues=worker.queues, maintenance_comments=worker.maintenance_comment
|
|
219
221
|
)
|
|
@@ -229,7 +231,9 @@ def update_queues(
|
|
|
229
231
|
session: SessionDep,
|
|
230
232
|
) -> None:
|
|
231
233
|
query = select(EdgeWorkerModel).where(EdgeWorkerModel.worker_name == worker_name)
|
|
232
|
-
worker: EdgeWorkerModel = session.scalar(query)
|
|
234
|
+
worker: EdgeWorkerModel | None = session.scalar(query)
|
|
235
|
+
if not worker:
|
|
236
|
+
raise HTTPException(status.HTTP_404_NOT_FOUND, "Worker not found")
|
|
233
237
|
if body.new_queues:
|
|
234
238
|
worker.add_queues(body.new_queues)
|
|
235
239
|
if body.remove_queues:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-edge3
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.1rc2
|
|
4
4
|
Summary: Provider package apache-airflow-providers-edge3 for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,edge3,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -3,26 +3,26 @@ airflow/providers/edge3/__init__.py,sha256=YJGs4Uf4WWsejZd4Uumqg7rX6HFH8Z1mDA3I7
|
|
|
3
3
|
airflow/providers/edge3/get_provider_info.py,sha256=Ek27-dB4UALHUFYoYjtoQIGq0p7zeHcEgmELHvpVmCU,6836
|
|
4
4
|
airflow/providers/edge3/version_compat.py,sha256=JRhqYf4UklO3xwmtCRPSXLQqq0yD1pCts3bhwxgVC0s,1670
|
|
5
5
|
airflow/providers/edge3/cli/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
6
|
-
airflow/providers/edge3/cli/api_client.py,sha256=
|
|
6
|
+
airflow/providers/edge3/cli/api_client.py,sha256=IxG1dae4aemhO8yfKDA71PYSuBdf2ouGur8Cem1Ys4c,7489
|
|
7
7
|
airflow/providers/edge3/cli/dataclasses.py,sha256=JUuvvmzSVWvG9uOEfzLIiXrTZ-HbESvu50jkPpVIYVw,2895
|
|
8
8
|
airflow/providers/edge3/cli/edge_command.py,sha256=aZ8P9x9FBR_pyuDxi6LaLkz4ubGOBDk1RNNp0ppTbKY,21747
|
|
9
9
|
airflow/providers/edge3/cli/signalling.py,sha256=sf4S6j6OoP0bLkda3UlCmlZabjv5wsMypy3kAvx56Z0,3220
|
|
10
|
-
airflow/providers/edge3/cli/worker.py,sha256=
|
|
10
|
+
airflow/providers/edge3/cli/worker.py,sha256=_ykOpA-io31TxOsjoGpfCtXPC60_E2boQJDjAtqSVIM,17626
|
|
11
11
|
airflow/providers/edge3/example_dags/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
12
12
|
airflow/providers/edge3/example_dags/integration_test.py,sha256=_bY2tVjUZvKAJXzm0Ozrwas0efRU4X9kULKWxu7LYB4,6264
|
|
13
13
|
airflow/providers/edge3/example_dags/win_notepad.py,sha256=zYcrKqODN4KLZQ-5wNnZQQskrDd5LA-nKJNgKQDntSE,2832
|
|
14
14
|
airflow/providers/edge3/example_dags/win_test.py,sha256=9iZ8Ro1Pi9RhYVcFFyyzpb6q3M0Qt8Ft1wJUF1O3dQc,13565
|
|
15
15
|
airflow/providers/edge3/executors/__init__.py,sha256=y830gGSKCvjOcLwLuCDp84NCrHWWB9RSSH1qvJpFhyY,923
|
|
16
|
-
airflow/providers/edge3/executors/edge_executor.py,sha256=
|
|
16
|
+
airflow/providers/edge3/executors/edge_executor.py,sha256=_KWbjIe9KbosUKfoYZpeONNZnIdrqNK3ja3YzENL-pE,19336
|
|
17
17
|
airflow/providers/edge3/models/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
18
|
-
airflow/providers/edge3/models/edge_job.py,sha256=
|
|
18
|
+
airflow/providers/edge3/models/edge_job.py,sha256=PQRZcrl8RCj9d8xvdNFit7UJ6zRxvME_gZBLyBTN_70,3621
|
|
19
19
|
airflow/providers/edge3/models/edge_logs.py,sha256=rFVz4gR0GYiEpwai5Q2C5znkiuaUQTjq5EhfLnQUeZQ,3022
|
|
20
|
-
airflow/providers/edge3/models/edge_worker.py,sha256=
|
|
20
|
+
airflow/providers/edge3/models/edge_worker.py,sha256=kQV344idLt-ldk5Ru5V4g4RaaPlZA4H7XlWul5_KSuU,13789
|
|
21
21
|
airflow/providers/edge3/openapi/__init__.py,sha256=0O-WvmDx8GeKSoECpHYrbe0hW-LgjlKny3VqTCpBQeQ,927
|
|
22
22
|
airflow/providers/edge3/openapi/edge_worker_api_v1.yaml,sha256=GAE2IdOXmcUueNy5KFkLBgNpoWnOjnHT9TrW5NZEWpI,24938
|
|
23
23
|
airflow/providers/edge3/openapi/v2-edge-generated.yaml,sha256=VBjkPbZjG73QiU75H7UK45q0lLpMsK5E45L9j-LQypI,39727
|
|
24
24
|
airflow/providers/edge3/plugins/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
25
|
-
airflow/providers/edge3/plugins/edge_executor_plugin.py,sha256=
|
|
25
|
+
airflow/providers/edge3/plugins/edge_executor_plugin.py,sha256=VUPAH-goiwEWmlJy01Sp5X0tn_jkkiMrpCFURh4RyOY,13020
|
|
26
26
|
airflow/providers/edge3/plugins/templates/edge_worker_hosts.html,sha256=0_P2yfZwpy3Kvqd3GBvu_PgmmKCUbso3ieW8aYa76iU,8997
|
|
27
27
|
airflow/providers/edge3/plugins/templates/edge_worker_jobs.html,sha256=bZ-6ysmIy6j4eR_TPHiqbgb3qpNMKCcEEB-SpxuxNgc,2831
|
|
28
28
|
airflow/providers/edge3/plugins/www/.gitignore,sha256=glCQO0xBUzFDPKNjn3_mw7F6e51j3sjyo4knJAUqMz4,281
|
|
@@ -40,7 +40,7 @@ airflow/providers/edge3/plugins/www/tsconfig.lib.json,sha256=Z5M3uhtIZ0Uc9CFjc7F
|
|
|
40
40
|
airflow/providers/edge3/plugins/www/tsconfig.node.json,sha256=On9I0qUPqRSyxJNKP5OlnWX_rYR1CKZV8A3IgF1UxvE,680
|
|
41
41
|
airflow/providers/edge3/plugins/www/vite.config.ts,sha256=mxAyXyZhIaFA46v7DY4yAo__y6gs9YXuIIPEhN-6xis,2971
|
|
42
42
|
airflow/providers/edge3/plugins/www/dist/main.d.ts,sha256=eZKjnWzeXgUOt4RhqL-a2YYXWpSCboNcEQs5ZykL0kk,10
|
|
43
|
-
airflow/providers/edge3/plugins/www/dist/main.umd.cjs,sha256=
|
|
43
|
+
airflow/providers/edge3/plugins/www/dist/main.umd.cjs,sha256=QA22cjW1aG-FJ-fnc437p52Iw7vNNisn75-c4QEHlFQ,560410
|
|
44
44
|
airflow/providers/edge3/plugins/www/openapi-gen/queries/common.ts,sha256=mnY7x73LFNTprAZjwPRbl9W1VSmKXPflqtaQa4ocOxw,3531
|
|
45
45
|
airflow/providers/edge3/plugins/www/openapi-gen/queries/ensureQueryData.ts,sha256=CCvoih7AKo7voklUkF6EjcjMMVB0HOTY53mBFn2Nly0,1317
|
|
46
46
|
airflow/providers/edge3/plugins/www/openapi-gen/queries/index.ts,sha256=p941sYs7pyF4XLKPxPgBXIko0H6s2U4sowFygzJ6Jos,114
|
|
@@ -59,7 +59,7 @@ airflow/providers/edge3/plugins/www/openapi-gen/requests/core/CancelablePromise.
|
|
|
59
59
|
airflow/providers/edge3/plugins/www/openapi-gen/requests/core/OpenAPI.ts,sha256=Gu0_JlDV061xLt7NF2w9zb2gpP84-rybL86sgX71Ef0,1477
|
|
60
60
|
airflow/providers/edge3/plugins/www/openapi-gen/requests/core/request.ts,sha256=jG833drJAZFBKN9hnEL6RIRmAfys9eb5rC8p99wBWXk,9598
|
|
61
61
|
airflow/providers/edge3/plugins/www/src/dev.tsx,sha256=5sZlduF3IFFXKZMxV06hLsxhcCuWNzUMM4Ni1RITG8w,1114
|
|
62
|
-
airflow/providers/edge3/plugins/www/src/main.tsx,sha256=
|
|
62
|
+
airflow/providers/edge3/plugins/www/src/main.tsx,sha256=mY1QGUj7UNDq1H0AbG5lOK1Z3889iQrtPGOfwOBEb3A,1999
|
|
63
63
|
airflow/providers/edge3/plugins/www/src/theme.ts,sha256=6Fbo0Mwbah6HTupBYyUqOt_T8DAZtDG2UABtOoxUe1w,21458
|
|
64
64
|
airflow/providers/edge3/plugins/www/src/vite-env.d.ts,sha256=eY6SmeO3WS4Bxne5yY6kn_PXLilnlFfluNuZswLUDys,848
|
|
65
65
|
airflow/providers/edge3/plugins/www/src/components/AddQueueButton.tsx,sha256=Ahyf0_NXqEM0UjIdMyTuANKToD1coqfEjdsQiudK_Fg,4159
|
|
@@ -91,8 +91,7 @@ airflow/providers/edge3/plugins/www/src/res/README.md,sha256=v9BEjvcB_pOcCP0bCL8
|
|
|
91
91
|
airflow/providers/edge3/plugins/www/src/res/cloud-computer-dark.svg,sha256=o_HFnxsF9M8BbBgIMXuAv3gO0Wc7owQDg5hvw-Pz3ek,368
|
|
92
92
|
airflow/providers/edge3/plugins/www/src/res/cloud-computer.svg,sha256=oRbCGtHKdKwIqa3_540Np4Td5fkhu1YQ0n--OCRrkyw,365
|
|
93
93
|
airflow/providers/edge3/plugins/www/src/utils/config.ts,sha256=XTd5NDxkuNshitc1pL6zANnwBnOh8srKnLGfoKJLL80,1118
|
|
94
|
-
airflow/providers/edge3/plugins/www/src/utils/index.ts,sha256=
|
|
95
|
-
airflow/providers/edge3/plugins/www/src/utils/tokenHandler.ts,sha256=aLNV3b1_vYL_FnwPExMZozUMFCtR0cATAXk7c0t92yM,1690
|
|
94
|
+
airflow/providers/edge3/plugins/www/src/utils/index.ts,sha256=h1cm1iCT0LPIY_VzgKkstdUdIHodFoZW8SwSAUImQpA,915
|
|
96
95
|
airflow/providers/edge3/plugins/www/src/utils/useContainerWidth.ts,sha256=lLNc0NGM9y9ao538_MvbTiOBK3UYhNfBPX_PvRslCSg,1386
|
|
97
96
|
airflow/providers/edge3/worker_api/__init__.py,sha256=nnPvxWGTEKZ9YyB1Yd7P9IvDOenK01LVHm22Owwxj3g,839
|
|
98
97
|
airflow/providers/edge3/worker_api/app.py,sha256=yM2S2JLYE2lS4kN88XYnbeKKRa8vqVVhRq10yA_X0ig,3003
|
|
@@ -100,14 +99,14 @@ airflow/providers/edge3/worker_api/auth.py,sha256=nmwfUz-nokUKyQp-UKwlMn-i2U5AXz
|
|
|
100
99
|
airflow/providers/edge3/worker_api/datamodels.py,sha256=FAiXqnrSN8zH4YE2fUMjXfXcH9cHlhRh4uZvvr936Ys,6696
|
|
101
100
|
airflow/providers/edge3/worker_api/datamodels_ui.py,sha256=yPEdtZ7noV5BBNXvA9F-pqVDq7UxTIKUdoUf3_FTDdE,2795
|
|
102
101
|
airflow/providers/edge3/worker_api/routes/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
103
|
-
airflow/providers/edge3/worker_api/routes/_v2_compat.py,sha256=
|
|
102
|
+
airflow/providers/edge3/worker_api/routes/_v2_compat.py,sha256=R5w5XPBnOCr9AV-DXZFOP60CRaI9JwTR_kSXwMzt7HU,4576
|
|
104
103
|
airflow/providers/edge3/worker_api/routes/_v2_routes.py,sha256=xcbf6RdOHx5zOl9JlIAW9nQhiy3ju-EIyq1tbXGJSYc,10800
|
|
105
104
|
airflow/providers/edge3/worker_api/routes/health.py,sha256=1nRn_lvGhaMkGKGeEJbD_p7tJdMbC1LhEmwuQbqI9oE,1076
|
|
106
|
-
airflow/providers/edge3/worker_api/routes/jobs.py,sha256=
|
|
105
|
+
airflow/providers/edge3/worker_api/routes/jobs.py,sha256=oFf7E4IBX39npRyptISPy5ApgnKmXOwMJMefvF5iIcw,5678
|
|
107
106
|
airflow/providers/edge3/worker_api/routes/logs.py,sha256=uk0SZ5hAimj3sAcq1FYCDu0AXYNeTeyjZDGBvw-986E,4945
|
|
108
|
-
airflow/providers/edge3/worker_api/routes/ui.py,sha256=
|
|
109
|
-
airflow/providers/edge3/worker_api/routes/worker.py,sha256=
|
|
110
|
-
apache_airflow_providers_edge3-1.4.
|
|
111
|
-
apache_airflow_providers_edge3-1.4.
|
|
112
|
-
apache_airflow_providers_edge3-1.4.
|
|
113
|
-
apache_airflow_providers_edge3-1.4.
|
|
107
|
+
airflow/providers/edge3/worker_api/routes/ui.py,sha256=yjdNQ7N0h7g7rSzsi4r5inwi4rxlHCdmtYA-ZTWRu6k,9970
|
|
108
|
+
airflow/providers/edge3/worker_api/routes/worker.py,sha256=PWgD77rTOCqRGGp5TU4wYPbbu64aCbUrCgwLJEm9iQ8,9199
|
|
109
|
+
apache_airflow_providers_edge3-1.4.1rc2.dist-info/entry_points.txt,sha256=7WUIGfd3o9NvvbK5trbZxNXTgYGc6pqg74wZPigbx5o,206
|
|
110
|
+
apache_airflow_providers_edge3-1.4.1rc2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
111
|
+
apache_airflow_providers_edge3-1.4.1rc2.dist-info/METADATA,sha256=R_V8zpKp-1MoLwQjVizWBq_D0RoaJGy8aSBcjL0INx0,6133
|
|
112
|
+
apache_airflow_providers_edge3-1.4.1rc2.dist-info/RECORD,,
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
* or more contributor license agreements. See the NOTICE file
|
|
4
|
-
* distributed with this work for additional information
|
|
5
|
-
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
* to you under the Apache License, Version 2.0 (the
|
|
7
|
-
* "License"); you may not use this file except in compliance
|
|
8
|
-
* with the License. You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing,
|
|
13
|
-
* software distributed under the License is distributed on an
|
|
14
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
* KIND, either express or implied. See the License for the
|
|
16
|
-
* specific language governing permissions and limitations
|
|
17
|
-
* under the License.
|
|
18
|
-
*/
|
|
19
|
-
import type { InternalAxiosRequestConfig } from "axios";
|
|
20
|
-
|
|
21
|
-
export const TOKEN_STORAGE_KEY = "token";
|
|
22
|
-
const getTokenFromCookies = (): string | undefined => {
|
|
23
|
-
const cookies = document.cookie.split(";");
|
|
24
|
-
|
|
25
|
-
for (const cookie of cookies) {
|
|
26
|
-
const [name, token] = cookie.split("=");
|
|
27
|
-
|
|
28
|
-
if (name?.trim() === "_token" && token !== undefined) {
|
|
29
|
-
localStorage.setItem(TOKEN_STORAGE_KEY, token);
|
|
30
|
-
document.cookie = "_token=; expires=Sat, 01 Jan 2000 00:00:00 UTC; path=/;";
|
|
31
|
-
|
|
32
|
-
return token;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const tokenHandler = (config: InternalAxiosRequestConfig) => {
|
|
40
|
-
const token = localStorage.getItem(TOKEN_STORAGE_KEY) ?? getTokenFromCookies();
|
|
41
|
-
|
|
42
|
-
if (token !== undefined) {
|
|
43
|
-
config.headers.Authorization = `Bearer ${token}`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return config;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const clearToken = () => {
|
|
50
|
-
localStorage.removeItem(TOKEN_STORAGE_KEY);
|
|
51
|
-
};
|
|
File without changes
|