I’m using Prefect Cloud and have noticed a problem with scheduled flow runs not being executed when I re-deploy an existing deployment (typically via a CI pipeline). What happens is the following:
- I create and apply a new deployment via the Python API using
Deployment.build_from_flow(name="test-flow", work_queue_name="production", flow=my_flow, storage=my_storage);
- I attach a cron schedule to the deployment via the web interface, for example
"0 11,12,13 * * *";
- Shortly after, the upcoming scheduled flow runs will appear in the web interface at 11:00, 12:00, 13:00;
- Next, I re-deploy by running the Python
- The scheduled runs disappear from the web interface;
- At 11:00, I would expect the first scheduled run to occur. Instead, the scheduled runs re-appear in the web interface at this point, starting from 12:00;
- At 12:00 the job will run.
I have a CI pipeline that will redeploy all my jobs when code changes are made, and am noticing that this behaviour causes some flow runs to get skipped.