Each time I run `prefect deployment build` , the `...
# prefect-community
c
Each time I run
prefect deployment build
, the
deployment.yaml
file is overwritten ?
1
j
Try upgrading to 2.0.1 - released today. That release will change that behavior. 🎉
🙌 1
🙏 5
“The
deployment build
command now supports an optional output flag to customize the name of the deployment.yaml file, to better support projects with multiple flows” From the 2.01 release notes.
👍 4
c
Running
prefect deployment build path/to/flow.py:flow_name -n flow_name -t tag
creates
deployment.yaml
and
manifest.json
files in the root directory. Running this on multiple flows creates multiple
.yaml
and `.json`files in the root directory (set of 2 files for each flow). Is it normal to have these files pile up in the root directory or is there a recommended way to organize these deployment files for multiple flows ? Creating a
/deployments
directory and moving these files to that directory results in:
FileNotFoundError: [Errno 2] No such file or directory: 'flow-name-manifest.json'
when attempting to run a flow from the Prefect Cloud UI. Modifying the
manifest_path
arg in
deployment.yaml
file (below DO NOT EDIT) and subsequently issuing the CLI command
prefect deployment apply path/to/deployment.yaml
does not work as well.
a
it's a bit too early for best practice recommendations 😄 2.0 is live since last Wednesday with the --output flag you can specify the file name and path for a manifest
Copy code
prefect deployment build hi.py:hi --name hi --tag dev --output yourdir/hi.yaml
😅 1
o
Unfortunately you can't specify the path for the manifest file output (only the deployment file output), unless I'm doing something wrong. Copying it to where it should be and making an edit or two might work, didn't get that far yet.
c
@Anna Geller Guess I’m just too excited to migrate to the new release ! 🎉
🙌 1
@Oscar Björhn Yep, tested and you are right, --output path can only be specified for deployment file output, and this directs the creation of the file at the path specified. I tested your suggestions, both doesn’t work unfortunately. • Copying it to where it should be (moving the manifest file to another folder) • Making an edit (to the manifest path in deployment file) Re-directing the deployment file to
deployments/flow_deployment.yaml
and leaving the manifest file in root folder works as expected.