<@ULVA73B9P> When creating a deployment with somet...
# marvin-in-the-wild
m
@Marvin When creating a deployment with something like:
Copy code
my_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 2
m
From my search in Prefect documentation and relevant GitHub issues, it appears that specifying a
version
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:
Copy code
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?