1107
1108
1109
1110
@@ -9384,7 +9366,35 @@
1207
1208
1209
-1210 | @deployment_app.command()
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
| @deployment_app.command(
+ deprecated=True,
+ deprecated_start_date="Mar 2024",
+ deprecated_name="deployment apply",
+ deprecated_help="Use 'prefect deploy' to deploy flows via YAML instead.",
+)
async def apply(
paths: List[str] = typer.Argument(
...,
@@ -9533,30 +9543,7 @@
Source code in prefect/cli/deployment.py
- 1256
-1257
-1258
-1259
-1260
-1261
-1262
-1263
-1264
-1265
-1266
-1267
-1268
-1269
-1270
-1271
-1272
-1273
-1274
-1275
-1276
-1277
-1278
-1279
+ 1279
1280
1281
1282
@@ -9948,7 +9935,40 @@
1668
1669
1670
-1671 | @deployment_app.command()
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
| @deployment_app.command(
+ deprecated=True,
+ deprecated_start_date="Mar 2024",
+ deprecated_name="deployment build",
+ deprecated_help="Use 'prefect deploy' to deploy flows via YAML instead.",
+)
async def build(
entrypoint: str = typer.Argument(
...,
@@ -10794,30 +10814,7 @@
Source code in prefect/cli/deployment.py
- 1213
-1214
-1215
-1216
-1217
-1218
-1219
-1220
-1221
-1222
-1223
-1224
-1225
-1226
-1227
-1228
-1229
-1230
-1231
-1232
-1233
-1234
-1235
-1236
+ 1236
1237
1238
1239
@@ -10827,7 +10824,30 @@
1243
1244
1245
-1246 | @deployment_app.command()
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
| @deployment_app.command()
async def delete(
name: Optional[str] = typer.Argument(
None, help="A deployed flow's name: <FLOW_NAME>/<DEPLOYMENT_NAME>"
@@ -11296,25 +11316,7 @@
Source code in prefect/cli/deployment.py
- 775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-787
-788
-789
-790
-791
-792
-793
+ 793
794
795
796
@@ -11332,7 +11334,25 @@
808
809
810
-811 | @deployment_app.command()
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
| @deployment_app.command()
async def ls(flow_name: List[str] = None, by_created: bool = False):
"""
View all deployments or deployments for specific flows.
@@ -11563,25 +11583,7 @@
Source code in prefect/cli/deployment.py
- 814
- 815
- 816
- 817
- 818
- 819
- 820
- 821
- 822
- 823
- 824
- 825
- 826
- 827
- 828
- 829
- 830
- 831
- 832
+ 832
833
834
835
@@ -11802,7 +11804,25 @@
1050
1051
1052
-1053 | @deployment_app.command()
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
| @deployment_app.command()
async def run(
name: Optional[str] = typer.Argument(
None, help="A deployed flow's name: <FLOW_NAME>/<DEPLOYMENT_NAME>"
diff --git a/versions/unreleased/api-ref/prefect/deployments/deployments/index.html b/versions/unreleased/api-ref/prefect/deployments/deployments/index.html
index cc41ca8e57..35c9e8ebcd 100644
--- a/versions/unreleased/api-ref/prefect/deployments/deployments/index.html
+++ b/versions/unreleased/api-ref/prefect/deployments/deployments/index.html
@@ -9247,7 +9247,11 @@
Bases: BaseModel
- A Prefect Deployment definition, used for specifying and building deployments.
+ DEPRECATION WARNING:
+This class is deprecated as of March 2024 and will not be available after September 2024.
+It has been replaced by flow.deploy , which offers enhanced functionality and better a better user experience.
+For upgrade instructions, see https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/.
+A Prefect Deployment definition, used for specifying and building deployments.
@@ -9544,10 +9548,7 @@
Source code in prefect/deployments/deployments.py
- 323
- 324
- 325
- 326
+ 326
327
328
329
@@ -10283,13 +10284,30 @@
1059
1060
1061
-1062 | @experimental_field(
- "work_pool_name",
- group="work_pools",
- when=lambda x: x is not None and x != DEFAULT_AGENT_WORK_POOL_NAME,
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
| @deprecated_class(
+ start_date="Mar 2024",
+ help="Use `flow.deploy` to deploy your flows instead."
+ " Refer to the upgrade guide for more information:"
+ " https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/.",
)
class Deployment(BaseModel):
"""
+ DEPRECATION WARNING:
+
+ This class is deprecated as of March 2024 and will not be available after September 2024.
+ It has been replaced by `flow.deploy`, which offers enhanced functionality and better a better user experience.
+ For upgrade instructions, see https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/.
+
A Prefect Deployment definition, used for specifying and building deployments.
Args:
@@ -11128,17 +11146,7 @@
Source code in prefect/deployments/deployments.py
- 849
-850
-851
-852
-853
-854
-855
-856
-857
-858
-859
+ 859
860
861
862
@@ -11225,7 +11233,17 @@ 943
944
945
-946 | @sync_compatible
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
| @sync_compatible
async def apply(
self, upload: bool = False, work_queue_concurrency: int = None
) -> UUID:
@@ -11506,17 +11524,7 @@
Source code in prefect/deployments/deployments.py
- 948
- 949
- 950
- 951
- 952
- 953
- 954
- 955
- 956
- 957
- 958
+ 958
959
960
961
@@ -11620,7 +11628,17 @@ 1059
1060
1061
-1062 | @classmethod
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
| @classmethod
@sync_compatible
async def build_from_flow(
cls,
@@ -11758,14 +11776,14 @@
Source code in prefect/deployments/deployments.py
- 620
-621
-622
-623
-624
-625
-626
-627 | @validator("parameter_openapi_schema", pre=True)
+ 630
+631
+632
+633
+634
+635
+636
+637 | @validator("parameter_openapi_schema", pre=True)
def handle_openapi_schema(cls, value):
"""
This method ensures setting a value of `None` is handled gracefully.
@@ -11826,17 +11844,7 @@
Source code in prefect/deployments/deployments.py
- 701
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
+ 711
712
713
714
@@ -11906,7 +11914,17 @@ 778
779
780
-781 | @sync_compatible
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
| @sync_compatible
async def load(self) -> bool:
"""
Queries the API for a deployment with this name for this flow, and if found,
@@ -12045,24 +12063,24 @@
Source code in prefect/deployments/deployments.py
- 783
-784
-785
-786
-787
-788
-789
-790
-791
-792
-793
+ 793
794
795
796
797
798
799
-800 | @sync_compatible
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
| @sync_compatible
async def update(self, ignore_none: bool = False, **kwargs):
"""
Performs an in-place update with the provided settings.
@@ -12155,17 +12173,7 @@
Source code in prefect/deployments/deployments.py
- 802
-803
-804
-805
-806
-807
-808
-809
-810
-811
-812
+ 812
813
814
815
@@ -12200,7 +12208,17 @@ 844
845
846
-847 | @sync_compatible
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
| @sync_compatible
async def upload_to_storage(
self, storage_block: str = None, ignore_file: str = ".prefectignore"
) -> Optional[int]:
@@ -12269,14 +12287,14 @@
Source code in prefect/deployments/deployments.py
- 629
-630
-631
-632
-633
-634
-635
-636 | @validator("triggers")
+ 639
+640
+641
+642
+643
+644
+645
+646 | @validator("triggers")
def validate_automation_names(cls, field_value, values, field, config):
"""Ensure that each trigger has a name for its automation if none is provided."""
for i, trigger in enumerate(field_value, start=1):
@@ -12317,9 +12335,7 @@
Source code in prefect/deployments/deployments.py
- 300
-301
-302
+ 302
303
304
305
@@ -12337,7 +12353,11 @@ 317
318
319
-320 | def load_deployments_from_yaml(
+320
+321
+322
+323
| @deprecated_callable(start_date="Mar 2024")
+def load_deployments_from_yaml(
path: str,
) -> PrefectObjectRegistry:
"""
@@ -12387,9 +12407,7 @@
Source code in prefect/deployments/deployments.py
- 219
-220
-221
+ 221
222
223
224
@@ -12465,7 +12483,9 @@ 294
295
296
-297 | @inject_client
+297
+298
+299
| @inject_client
async def load_flow_from_flow_run(
flow_run: FlowRun,
client: PrefectClient,
@@ -12746,9 +12766,7 @@
Source code in prefect/deployments/deployments.py
- 66
- 67
- 68
+ 68
69
70
71
@@ -12896,7 +12914,9 @@
213
214
215
-216 | @sync_compatible
+216
+217
+218
| @sync_compatible
@inject_client
async def run_deployment(
name: Union[str, UUID],
diff --git a/versions/unreleased/api-ref/prefect/infrastructure/index.html b/versions/unreleased/api-ref/prefect/infrastructure/index.html
index 2bbc20ee6e..7634a42029 100644
--- a/versions/unreleased/api-ref/prefect/infrastructure/index.html
+++ b/versions/unreleased/api-ref/prefect/infrastructure/index.html
@@ -9653,24 +9653,7 @@
Source code in prefect/infrastructure/container.py
- 173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
+ 190
191
192
193
@@ -10275,7 +10258,36 @@ 792
793
794
-795 | class DockerContainer(Infrastructure):
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
| @deprecated_class(
+ start_date="Mar 2024",
+ help="Use the Docker worker from prefect-docker instead."
+ " Refer to the upgrade guide for more information:"
+ " https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/.",
+)
+class DockerContainer(Infrastructure):
"""
Runs a command in a container.
@@ -10942,8 +10954,8 @@
Source code in prefect/infrastructure/container.py
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|