David Hlavaty
08/19/2022, 10:05 AMAnna Geller
08/19/2022, 11:34 AMprefect deployment build
what about having two deployments of the same flow, but with different schedules.this works two - you create 2 deployments of one flow
David Hlavaty
08/19/2022, 1:12 PMprefect deployment build
command only adds metadata to the deployment unless I am missing something. It has no effect on where the files are stored in the storage - e.g. S3 in my case.
So if my storage points to <s3://example/flow>
then:
1. prefect deployment build --version 1 ...
will upload the files to <s3://example/flow>
2. prefect deployment build --version 2 ...
will override files in <s3://example/flow>
What I would expect (or be able to do) is for the version to be appended to the storage configuration:
1. prefect deployment build --version 1 ...
will upload the files to <s3://example/flow/1>
2. prefect deployment build --version 2 ...
will upload the files to <s3://example/flow/2>
So that building the deployment again cannot interfere with any flows that are currently scheduling - e.g. what if version 2 added extra dependencies to a base image, but another flow is already starting that fetched the image, but has not downloaded the source code yet. I appreciate that the odds of this are very low, but it is a consequence of the build artefacts not being immutable - which is often a desirable property (the same as it is often desirable to make docker images immutable once uploaded to the repository).