Prerequisites
- You must be at least a Deployment Editor or otherwise have the permission
deployment.images.pushorsystem.deployments.images.pushto roll back a Deployment. - Your Deployment must be on Astro Runtime 5 (Airflow 2.3) or later. Rolling back to any version before Astro Runtime 5 is not supported.
- Your Deployment must be configured to use image or DAG-only deploys. Rollbacks are not supported for NFS deploys and Git sync deploys.
- Your Software installation must have
global.dagOnlyDeployment.enabled=True
Configure deploy rollbacks
To use deploy rollbacks, you must have them enabled for your entire installation. This configuration allows individual Deployment users with sufficient permissions to optionally enable them in specific Deployments. Configure the following values in yourvalues.yaml file:
Enable deploy rollbacks
If deploy rollbacks are configured for your installation, you can enable them in individual Deployments through the Deployment Settings page.- In the Software UI, open your Deployment.
- On the Settings page, toggle Rollback Deploy to Enable.
Roll back to a deploy
Astronomer recommends triggering Deployment rollbacks only as a last resort for recent deploys that aren’t working as expected. Deployment rollbacks can be disruptive, especially if you triggered multiple deploys between your current version and the rollback version. See What happens during a deploy rollback before you trigger a rollback to anticipate any unexpected effects.
- In the Software UI, open your Deployment, then go to Deploy History.
- Find the deploy you want to roll back to in the Deploys table, then click Deploy.
- Write a description for why you’re triggering the rollback, then confirm the rollback.
What happens during a deploy rollback
A deploy rollback is a new deploy of a previous version of your code. This means that the rollback deploy appears as a new deploy in Deploy History, and the records for any deploys between your current version and rollback version are still preserved. In Git terms, this is equivalent togit revert.
When you trigger a rollback, the following information is rolled back:
- All project code, including DAGs.
- Your Astro Runtime version. Note that if you roll back to a restricted Runtime version they can include major bugs and performance issues.
- Your Deployment’s DAG deploy setting.
- Your Deployment’s resource configurations, such as executor and scheduler configurations.
- Your Deployment’s environment variable values.
- Any other Deployment settings that you configure through the Astro UI, such as your Deployment name and description.
- For Runtime version downgrades, any data related to features that are not available in the rollback version are erased from the metadata database and not recoverable.