When pushing deployments via `prefect deploy` that...
# prefect-cloud
c
When pushing deployments via
prefect deploy
that are configured in
prefect.yaml
, is there a way to keep the data from the deployment if it currently exists within Prefect Cloud? Whenever I deploy, and change the schedule in the UI, and I deploy again, it overrides the schedule that I set in the UI to the one in
prefect.yaml
. My old way of deploying via Python
Deployment.build_from_flow
had the
load_existing=True
parameter that didn't overwrite whatever the existing deployment already had in place.
s
I think that could be tricky because
prefect deploy
is reading from the deployment config in your yaml, and isn’t aware of updates made in the UI afterward. I think the workflow here might be that you’re using yaml to define your deployments, including your schedule. So instead of changing the schedule in the UI, you would probably do it in yaml right before you re-deploy. Side note: We did introduce a Python-based deployment method:
flow.deploy
, which you can read more about here: https://docs.prefect.io/2.13.8/tutorial/workers/?h=flow.deploy#create-the-deployment However, I don’t believe that we try to load an existing deployment for comparison. If that’s something of interest to you, feel free to file an enhancement proposal for that.
upvote 1