Watch the deployment versioning walkthrough video to learn how rollbacks works in the UI.
Today we're introducing deployment versioning in Prefect, a smarter way to manage changes, track performance, and recover quickly when something goes wrong.
If you've ever wished you could just "undo" a deployment or see exactly what code commit ran last week in production, this feature is for you.
Before this release, updating a deployment in Prefect meant overwriting it. Once a new version was pushed, there was no built-in safety net. If something broke, the only recovery path was to manually revert code in Git or rebuild and redeploy through CI.
That workflow works until it stops being reliable. It slows teams down, clutters your Git history and introduces risk when rolling out changes.
Deployment versioning solves that by making every update traceable and reversible.
With deployment versioning, you get better control over what runs, when it runs, and how to go back when something breaks.
These capabilities give you clearer visibility and safer control over your deployments, no matter where or how they're running.
Every deployment in Prefect Cloud is versioned. A new version is created automatically whenever you update a deployment using the CLI, Python deployment methods, the UI, or tools like Terraform.
Prefect also tracks Git metadata, like the commit SHA, when the update happens in a Git-aware environment such as GitHub Actions, the CLI, or Python. Deployments created with Terraform or the prefect-cloud package are still versioned, but Git information is not captured.
Each version includes the full deployment configuration, including parameter defaults, tags, pull steps, job variables, and concurrency limits.
In the UI, you can view version history and roll back to any earlier version. Just select "Roll back" and the next run will use it.
To learn how to pin a specific Git SHA or use a Docker image digest, see the deployment versioning documentation.
Let’s say you deploy a flow with updated logic for cost allocation. After pushing to production you notice workflows start failing. You added currency symbols to the cost values, forgetting that the column in your destination table expects floats, not strings. You need to fix your code and add a test to stop this mistake from happening in the future, but this workflow runs once per minute and any missed data is a problem for your team.
With deployment versioning, you don’t have to revert your Git repo or trigger a full rebuild. Instead:
You're now back to the version that worked. No new commits, no waiting on CI, no messy history.
Deployment versioning gives you a reliable rollback experience, but there are a few important caveats to know:
For more information on how to configure these fields and get the most out of deployment versioning, see the documentation.
Deployment versioning is available to Prefect Cloud users with Prefect versions 3.4.1 and above.
Visit the docs to learn more about deployment versioning or sign up now and get started for free.
We hope this gives you a smoother, safer way to manage changes.
Have questions? Join our community Slack.