Shane Breeze
11/03/2023, 1:05 PMmydeployment
, in my prefect.yaml which runs the flow myflow
. This gives the deployment myflow/mydeployment
. However, I would like to change the name of the flow from the prefect.yaml to name the deployment as flow2/mydeployment
. How can I do this?Marvin
11/03/2023, 1:06 PMprefect.yaml
file. However, the name of the flow in the deployment is determined by the flow name in your Python code, not the prefect.yaml
file.
If you want to change the name of the flow in the deployment, you would need to change the name of the flow in your Python code where the flow is defined.
For example, if your current flow is defined as:
@flow
def myflow():
# flow tasks here
You would change it to:
@flow
def flow2():
# flow tasks here
Then, in your prefect.yaml
file, you would reference flow2
instead of myflow
.
Please note that the prefect deploy
command uses the flow name and deployment name in the format flowname/deploymentname
. So if you want to deploy your renamed flow, you would use:
bash
$ prefect deploy --name flow2/mydeployment
Remember, when deploying more than one deployment with a single prefect deploy
command, any additional attributes provided via the CLI will be ignored. To provide overrides to a deployment via the CLI, you must deploy that deployment individually.