Rollback version compatibility
Starting in Astro Private Cloud 1.1, rollbacks are supported across Airflow 3 and Airflow 2 Runtime versions. The following rollback paths are now available:Airflow 3 to Airflow 2 rollback considerations
When rolling back from Airflow 3 to Airflow 2:- Dag compatibility: Dags written for Airflow 3 aren’t compatible with Airflow 2. Ensure you roll back your Dags as well, or revert any Airflow 3-specific code changes before rolling back.
- Longer rollback time: Cross-major version rollbacks take longer than same-version rollbacks due to database schema migrations.
- UI warnings: The UI displays prominent warnings when attempting cross-major version rollbacks to ensure you understand the implications.
Prerequisites
- You must be at least a Deployment Editor or otherwise have the permission
deployment.images.pushordeployment.dags.pushor both to roll back images and/or Dags, respectively, for a Deployment.- If you want to limit users to either rollback images or Dags, you can configure granular rollback permissions for more information on how to modify these values.
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 Astro Private Cloud 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 Astro Private Cloud 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, it might 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 aren’t available in the rollback version are erased from the metadata database and not recoverable.
Granular rollback permissions
You might want to enable your users to roll back Dag-only or image-only deploys, without granting them the ability to roll back complete project deploys. This allows you to maintain higher security measures, by limiting who has permission to roll back both image and Dag deploys, or only one of the two.deployment.images.push: Grants permission to roll back just the image of a revision in an imaged-based, Dag-only, and gitSync deployment.deployment.dags.push: Grants permission to roll back only Dags for Dag-only deploys.