Open aaazzam opened 2 months ago
Thanks for the issue @aaazzam!
In the current era of deployments (prefect deploy
, flow.deploy
, flow.serve
) the prefect client largely treated deployment configuration as declarative. Whatever you put in your prefect.yaml
or python script (including defaults you don't know about) will be the state of the deployment we create for you. Essentially, the last one in wins, which is easy to reason about (except for the defaults that you don't know about).
It sounds like this is different from what's expected. I'll speculate that might be informed by the previous era (prefect deployment build/apply
) where we would read from the server before updating a deployment to ensure we didn't change stuff that had changed in the UI.
I don't know if there is a clear expected behavior here, but if we want the prefect client to be more nuanced with updates, we'll likely need to gather and persist more metadata during deployment than we currently do.
Bug summary
Description
When redeploying a flow that previously had an active schedule which was turned off in the UI, the inactive schedule becomes active again. Additionally, other saved fields, such as "validate parameter schedule", are reset. This behavior affects CI/CD processes and production environments in ways users may not expect.
Steps to Reproduce
Expected Behavior
The flow should redeploy with:
Actual Behavior
Upon redeployment:
Version info (
prefect version
output)Additional context
This was a change in deployment behavior. When deployments accepted a single schedule I believe the
is_schedule_active
parameter at least was not overwritten. When deployments accepted multiple schedules this overwriting behavior began.