Gio
07/11/2025, 9:19 PMMarvin
07/11/2025, 9:19 PMMarvin
07/11/2025, 9:19 PMprefect deploy
command does not automatically update your prefect.yaml file. The relationship actually works in the opposite direction - the prefect.yaml file serves as the source of configuration that the CLI command reads from, not writes to.
When you want to modify your deployment configuration, you'll need to:
1. Manually edit the prefect.yaml file with your desired changes
2. Run prefect deploy
to apply those changes
The prefect.yaml file acts as a declarative configuration file that defines how your flows should be deployed. You can find detailed information about configuring your prefect.yaml file in the deployment configuration documentation.
This design ensures that your deployment configuration remains explicit and version-controlled, rather than being modified automatically by CLI commands. It's rather like having a recipe book - you modify the recipe first, then cook from it, rather than having the cooking process modify your recipe.Gio
07/11/2025, 9:33 PMMarvin
07/11/2025, 9:33 PMMarvin
07/11/2025, 9:34 PMyaml
deployments:
- name: your-deployment-name
schedules:
- interval: 3600 # for interval schedules (in seconds)
# OR
- cron: "0 * * * *" # for cron schedules
# OR
- rrule: "FREQ=DAILY;INTERVAL=1" # for rrule schedules
2. There's a known behavior where deployment updates can sometimes override UI-configured values. This is currently being addressed by the Prefect team (as evidenced by recent GitHub discussions).
To ensure your schedule appears correctly:
1. Make sure your schedule is properly indented under the correct deployment in the yaml file
2. Use prefect deploy
without going through the interactive CLI prompts (which can override your yaml configurations)
3. Verify the schedule appears in the UI after deployment
If you're still not seeing the schedule appear, could you share your prefect.yaml configuration (with any sensitive information removed)? That would help me identify if there might be a syntax issue.
As a temporary workaround, if you need to maintain both the UI-configured schedule and the yaml configuration, you can:
1. First deploy using your yaml file
2. Then add additional schedules through the UI
3. When you need to update other aspects of the deployment, be careful not to override the schedules
The Prefect team is working on improvements to make this behavior more intuitive, including potential options to preserve UI-configured values during deployment updates.