prefect-client 3.3.4.dev1__py3-none-any.whl → 3.3.4.dev3__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.
- prefect/_build_info.py +3 -3
- prefect/deployments/base.py +5 -0
- prefect/runner/runner.py +4 -2
- prefect/runner/server.py +12 -0
- prefect/runner/submit.py +13 -1
- prefect/settings/models/server/services.py +7 -0
- {prefect_client-3.3.4.dev1.dist-info → prefect_client-3.3.4.dev3.dist-info}/METADATA +1 -1
- {prefect_client-3.3.4.dev1.dist-info → prefect_client-3.3.4.dev3.dist-info}/RECORD +10 -10
- {prefect_client-3.3.4.dev1.dist-info → prefect_client-3.3.4.dev3.dist-info}/WHEEL +0 -0
- {prefect_client-3.3.4.dev1.dist-info → prefect_client-3.3.4.dev3.dist-info}/licenses/LICENSE +0 -0
prefect/_build_info.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Generated by versioningit
|
2
|
-
__version__ = "3.3.4.
|
3
|
-
__build_date__ = "2025-04-
|
4
|
-
__git_commit__ = "
|
2
|
+
__version__ = "3.3.4.dev3"
|
3
|
+
__build_date__ = "2025-04-10 08:08:19.507291+00:00"
|
4
|
+
__git_commit__ = "b2c74894cacb929a747cf8169975fd731e9c28cb"
|
5
5
|
__dirty__ = False
|
prefect/deployments/base.py
CHANGED
@@ -110,6 +110,7 @@ def create_default_prefect_yaml(
|
|
110
110
|
f,
|
111
111
|
sort_keys=False,
|
112
112
|
)
|
113
|
+
|
113
114
|
return True
|
114
115
|
|
115
116
|
|
@@ -293,6 +294,10 @@ def _save_deployment_to_prefect_file(
|
|
293
294
|
|
294
295
|
current_directory_name = os.path.basename(os.getcwd())
|
295
296
|
if not prefect_file.exists():
|
297
|
+
if triggers:
|
298
|
+
deployment["triggers"] = triggers
|
299
|
+
if sla:
|
300
|
+
deployment["sla"] = sla
|
296
301
|
create_default_prefect_yaml(
|
297
302
|
".",
|
298
303
|
current_directory_name,
|
prefect/runner/runner.py
CHANGED
@@ -1363,7 +1363,9 @@ class Runner:
|
|
1363
1363
|
ready_to_submit = await self._propose_pending_state(flow_run)
|
1364
1364
|
|
1365
1365
|
if ready_to_submit:
|
1366
|
-
readiness_result
|
1366
|
+
readiness_result: (
|
1367
|
+
anyio.abc.Process | Exception
|
1368
|
+
) = await self._runs_task_group.start(
|
1367
1369
|
partial(
|
1368
1370
|
self._submit_run_and_capture_errors,
|
1369
1371
|
flow_run=flow_run,
|
@@ -1374,7 +1376,7 @@ class Runner:
|
|
1374
1376
|
if readiness_result and not isinstance(readiness_result, Exception):
|
1375
1377
|
async with self._flow_run_process_map_lock:
|
1376
1378
|
self._flow_run_process_map[flow_run.id] = ProcessMapEntry(
|
1377
|
-
pid=readiness_result, flow_run=flow_run
|
1379
|
+
pid=readiness_result.pid, flow_run=flow_run
|
1378
1380
|
)
|
1379
1381
|
# Heartbeats are opt-in and only emitted if a heartbeat frequency is set
|
1380
1382
|
if self.heartbeat_seconds is not None:
|
prefect/runner/server.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import uuid
|
4
|
+
from datetime import datetime
|
4
5
|
from typing import TYPE_CHECKING, Any, Callable, Coroutine, Hashable, Optional
|
5
6
|
|
6
7
|
import uvicorn
|
@@ -8,6 +9,7 @@ from fastapi import APIRouter, FastAPI, HTTPException, status
|
|
8
9
|
from fastapi.responses import JSONResponse
|
9
10
|
from typing_extensions import Literal
|
10
11
|
|
12
|
+
from prefect._internal.compatibility.deprecated import deprecated_callable
|
11
13
|
from prefect._internal.schemas.validators import validate_values_conform_to_schema
|
12
14
|
from prefect.client.orchestration import get_client
|
13
15
|
from prefect.exceptions import MissingFlowError, ScriptError
|
@@ -252,6 +254,11 @@ def _build_generic_endpoint_for_flows(
|
|
252
254
|
return _create_flow_run_for_flow_from_fqn
|
253
255
|
|
254
256
|
|
257
|
+
@deprecated_callable(
|
258
|
+
start_date=datetime(2025, 4, 1),
|
259
|
+
end_date=datetime(2025, 10, 1),
|
260
|
+
help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
|
261
|
+
)
|
255
262
|
async def build_server(runner: "Runner") -> FastAPI:
|
256
263
|
"""
|
257
264
|
Build a FastAPI server for a runner.
|
@@ -296,6 +303,11 @@ async def build_server(runner: "Runner") -> FastAPI:
|
|
296
303
|
return webserver
|
297
304
|
|
298
305
|
|
306
|
+
@deprecated_callable(
|
307
|
+
start_date=datetime(2025, 4, 1),
|
308
|
+
end_date=datetime(2025, 10, 1),
|
309
|
+
help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
|
310
|
+
)
|
299
311
|
def start_webserver(runner: "Runner", log_level: str | None = None) -> None:
|
300
312
|
"""
|
301
313
|
Run a FastAPI server for a runner.
|
prefect/runner/submit.py
CHANGED
@@ -3,12 +3,14 @@ from __future__ import annotations
|
|
3
3
|
import asyncio
|
4
4
|
import inspect
|
5
5
|
import uuid
|
6
|
+
from datetime import datetime
|
6
7
|
from typing import TYPE_CHECKING, Any, Union, overload
|
7
8
|
|
8
9
|
import anyio
|
9
10
|
import httpx
|
10
11
|
from typing_extensions import Literal, TypeAlias
|
11
12
|
|
13
|
+
from prefect._internal.compatibility.deprecated import deprecated_callable
|
12
14
|
from prefect.client.orchestration import get_client
|
13
15
|
from prefect.client.schemas.filters import (
|
14
16
|
FlowRunFilter,
|
@@ -119,6 +121,11 @@ def submit_to_runner(
|
|
119
121
|
) -> list[FlowRun]: ...
|
120
122
|
|
121
123
|
|
124
|
+
@deprecated_callable(
|
125
|
+
start_date=datetime(2025, 4, 1),
|
126
|
+
end_date=datetime(2025, 10, 1),
|
127
|
+
help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
|
128
|
+
)
|
122
129
|
@sync_compatible
|
123
130
|
async def submit_to_runner(
|
124
131
|
prefect_callable: Flow[Any, Any],
|
@@ -186,13 +193,18 @@ async def submit_to_runner(
|
|
186
193
|
return submitted_runs
|
187
194
|
|
188
195
|
|
196
|
+
@deprecated_callable(
|
197
|
+
start_date=datetime(2025, 4, 1),
|
198
|
+
end_date=datetime(2025, 10, 1),
|
199
|
+
help="Use background tasks (https://docs.prefect.io/v3/develop/deferred-tasks) or `run_deployment` and `.serve` instead of submitting runs to the Runner webserver.",
|
200
|
+
)
|
189
201
|
@sync_compatible
|
190
202
|
async def wait_for_submitted_runs(
|
191
203
|
flow_run_filter: FlowRunFilter | None = None,
|
192
204
|
task_run_filter: TaskRunFilter | None = None,
|
193
205
|
timeout: float | None = None,
|
194
206
|
poll_interval: float = 3.0,
|
195
|
-
):
|
207
|
+
) -> uuid.UUID | None:
|
196
208
|
"""
|
197
209
|
Wait for completion of any provided flow runs (eventually task runs), as well as subflow runs
|
198
210
|
of the current flow run (if called from within a flow run and subflow runs exist).
|
@@ -385,6 +385,13 @@ class ServerServicesSchedulerSettings(ServicesBaseSetting):
|
|
385
385
|
),
|
386
386
|
)
|
387
387
|
|
388
|
+
recent_deployments_loop_seconds: float = Field(
|
389
|
+
default=5,
|
390
|
+
description="""
|
391
|
+
The number of seconds the recent deployments scheduler will wait between checking for recently updated deployments. Defaults to `5`.
|
392
|
+
""",
|
393
|
+
)
|
394
|
+
|
388
395
|
|
389
396
|
class ServerServicesPauseExpirationsSettings(ServicesBaseSetting):
|
390
397
|
"""
|
@@ -1,7 +1,7 @@
|
|
1
1
|
prefect/.prefectignore,sha256=awSprvKT0vI8a64mEOLrMxhxqcO-b0ERQeYpA2rNKVQ,390
|
2
2
|
prefect/__init__.py,sha256=iCdcC5ZmeewikCdnPEP6YBAjPNV5dvfxpYCTpw30Hkw,3685
|
3
3
|
prefect/__main__.py,sha256=WFjw3kaYJY6pOTA7WDOgqjsz8zUEUZHCcj3P5wyVa-g,66
|
4
|
-
prefect/_build_info.py,sha256=
|
4
|
+
prefect/_build_info.py,sha256=EB4PbgHb3ytqQHnkBOsEe0aoS2qo0EGYeE09idgtiQw,185
|
5
5
|
prefect/_result_records.py,sha256=S6QmsODkehGVSzbMm6ig022PYbI6gNKz671p_8kBYx4,7789
|
6
6
|
prefect/_waiters.py,sha256=Ia2ITaXdHzevtyWIgJoOg95lrEXQqNEOquHvw3T33UQ,9026
|
7
7
|
prefect/agent.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
|
@@ -133,7 +133,7 @@ prefect/concurrency/v1/context.py,sha256=BhK63TYp9BQYRCgTI1onUPXmgBoYaP7o27U695l
|
|
133
133
|
prefect/concurrency/v1/services.py,sha256=ppVCllzb2qeKc-xntobFu45dEh3J-ZTtLDPuHr1djxo,2958
|
134
134
|
prefect/concurrency/v1/sync.py,sha256=N_CHNkbV_eNQvDsJoJaehQo8H68MFlX6B1ObDZuYlTM,2112
|
135
135
|
prefect/deployments/__init__.py,sha256=_wb7NxDKhq11z9MjYsPckmT3o6MRhGLRgCV9TmvYtew,1002
|
136
|
-
prefect/deployments/base.py,sha256=
|
136
|
+
prefect/deployments/base.py,sha256=YY7g8MN6qzjNEjEA8wQXPxCrd47WnACIUeSRtI4nrEk,11849
|
137
137
|
prefect/deployments/deployments.py,sha256=K3Rgnpjxo_T8I8LMwlq24OKqZiZBTE8-YnPg-YGUStM,171
|
138
138
|
prefect/deployments/flow_runs.py,sha256=NYe-Bphsy6ENLqSSfywQuX5cRZt-uVgzqGmOsf3Sqw4,7643
|
139
139
|
prefect/deployments/runner.py,sha256=QNKdKsLEzx3TE7T_3dJcK7bGvTCvNLY2WCpgDxiQDno,54368
|
@@ -182,10 +182,10 @@ prefect/logging/highlighters.py,sha256=BCf_LNhFInIfGPqwuu8YVrGa4wVxNc4YXo2pYgftp
|
|
182
182
|
prefect/logging/loggers.py,sha256=rwFJv0i3dhdKr25XX-xUkQy4Vv4dy18bTy366jrC0OQ,12741
|
183
183
|
prefect/logging/logging.yml,sha256=tT7gTyC4NmngFSqFkCdHaw7R0GPNPDDsTCGZQByiJAQ,3169
|
184
184
|
prefect/runner/__init__.py,sha256=pQBd9wVrUVUDUFJlgiweKSnbahoBZwqnd2O2jkhrULY,158
|
185
|
-
prefect/runner/runner.py,sha256=
|
186
|
-
prefect/runner/server.py,sha256=
|
185
|
+
prefect/runner/runner.py,sha256=D2sTbcUvFW5eiQLsQgzUO8hSTyWMvwQ7-nTg35twuIY,64962
|
186
|
+
prefect/runner/server.py,sha256=YRYFNoYddA9XfiTIYtudxrnD1vCX-PaOLhvyGUOb9AQ,11966
|
187
187
|
prefect/runner/storage.py,sha256=L7aSjie5L6qbXYCDqYDX3ouQ_NsNMlmfjPeaWOC-ncs,28043
|
188
|
-
prefect/runner/submit.py,sha256=
|
188
|
+
prefect/runner/submit.py,sha256=qOEj-NChQ6RYFV35hHEVMTklrNmKwaGs2mR78ku9H0o,9474
|
189
189
|
prefect/runner/utils.py,sha256=19DbhyiV6nvSpTXmnWlt7qPNt1jrz1jscznYrRVGurw,3413
|
190
190
|
prefect/runtime/__init__.py,sha256=JswiTlYRup2zXOYu8AqJ7czKtgcw9Kxo0tTbS6aWCqY,407
|
191
191
|
prefect/runtime/deployment.py,sha256=0A_cUVpYiFk3ciJw2ixy95dk9xBJcjisyF69pakSCcQ,5091
|
@@ -264,7 +264,7 @@ prefect/settings/models/server/ephemeral.py,sha256=rh8Py5Nxh-gq9KgfB7CDnIgT_nuOu
|
|
264
264
|
prefect/settings/models/server/events.py,sha256=9rdlbLz9SIg_easm1UcFTfX1seS935Xtv5d9y3r39Eo,5578
|
265
265
|
prefect/settings/models/server/flow_run_graph.py,sha256=PuAZqqdu6fzvrbUgXZzyntUH_Ii_bP7qezgcgvW7ULk,1146
|
266
266
|
prefect/settings/models/server/root.py,sha256=Dk_Zx4eGUy1h2cAetDKphnd6TWhDrK6DHOLJxdP7e1Y,5215
|
267
|
-
prefect/settings/models/server/services.py,sha256=
|
267
|
+
prefect/settings/models/server/services.py,sha256=FlU12Mw_J7KG_xsX-4Xp_t1WfTqDUDeniEGseV1WaEI,18866
|
268
268
|
prefect/settings/models/server/tasks.py,sha256=_CaOUfh3WDXvUhmHXmR-MkTRaQqocZck4efmX74iOg8,2976
|
269
269
|
prefect/settings/models/server/ui.py,sha256=hShsi4rPBtdJA2WnT1Er0tWqu-e5wUum8NkNgucShkk,1867
|
270
270
|
prefect/telemetry/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
@@ -316,7 +316,7 @@ prefect/workers/cloud.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
|
|
316
316
|
prefect/workers/process.py,sha256=uxOwcqA2Ps-V-W6WeSdKCQMINrCxBEVx1K1Un8pb7vs,8973
|
317
317
|
prefect/workers/server.py,sha256=2pmVeJZiVbEK02SO6BEZaBIvHMsn6G8LzjW8BXyiTtk,1952
|
318
318
|
prefect/workers/utilities.py,sha256=VfPfAlGtTuDj0-Kb8WlMgAuOfgXCdrGAnKMapPSBrwc,2483
|
319
|
-
prefect_client-3.3.4.
|
320
|
-
prefect_client-3.3.4.
|
321
|
-
prefect_client-3.3.4.
|
322
|
-
prefect_client-3.3.4.
|
319
|
+
prefect_client-3.3.4.dev3.dist-info/METADATA,sha256=RPc_G8XPEiDrD7xPB9Q2pDp62u6XRQjwy8ZpqpVxXmo,7456
|
320
|
+
prefect_client-3.3.4.dev3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
321
|
+
prefect_client-3.3.4.dev3.dist-info/licenses/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
|
322
|
+
prefect_client-3.3.4.dev3.dist-info/RECORD,,
|
File without changes
|
{prefect_client-3.3.4.dev1.dist-info → prefect_client-3.3.4.dev3.dist-info}/licenses/LICENSE
RENAMED
File without changes
|