Mitch
07/15/2024, 10:53 PMmy_flow.deploy(
name=DEPLOYMENT_NAME,
work_pool_name="my-workpool",
image=image,
build=False,
push=False,
tags=tags,
version=2,
)
will this make a separate deployment called version 2Marvin
07/15/2024, 10:53 PMversion
in Flow.deploy()
will not create a separate deployment with that version number. Instead, it will update the existing deployment with the given version number. Here’s a brief explanation:
1. Deployment Versioning:
- When you specify a version in deploy()
, it is used to version the deployment itself but does not create a new separate deployment with that version. Instead, it updates or sets the version of the existing deployment.
2. Separate Deployments:
- To create distinct or separate deployments, you would typically change the deployment's name. Keeping the deployment name the same but changing other parameters like the version number will update the existing deployment.
If you're looking to create truly separate deployments (e.g., Deployment V1
and Deployment V2
), you should use different deployment names:
python
my_flow.deploy(
name="DEPLOYMENT_NAME_V1",
work_pool_name="my-workpool",
image=image,
build=False,
push=False,
tags=tags,
)
my_flow.deploy(
name="DEPLOYMENT_NAME_V2",
work_pool_name="my-workpool",
image=image,
build=False,
push=False,
tags=tags,
version=2,
)
This will create two separate deployments, DEPLOYMENT_NAME_V1
and DEPLOYMENT_NAME_V2
.
For more details, you can refer to the deployments documentation and the specific versioning doc.
Would you like any additional information or examples?