New versions of Astro Runtime are released regularly to support new Astro and Apache Airflow functionality. To take advantage of new features and bug and security fixes, Astronomer recommends upgrading Astro Runtime as new versions are available.
Consider the following when you upgrade Astro Runtime:
- All versions of the Astro CLI support all versions of Astro Runtime. There are no dependencies between the two products.
- Upgrading to certain versions of Runtime might result in extended upgrade times or otherwise disruptive changes to your environment. To learn more, see Version-specific upgrade considerations.
- Astronomer does not support downgrading a Deployment on Astro to a lower version of Astro Runtime.
To stay up to date on the latest versions of Astro Runtime, see Astro Runtime release notes. For more information on Astro Runtime versioning and support, see Astro Runtime versioning and lifecycle policy. For a full collection of Astro Runtime Docker images, go to the Astro Runtime repository on Quay.io.
Version upgrade considerations
This is where you'll find the upgrade considerations for specific Astro Runtime versions. This includes breaking changes, database migrations, and other considerations.
Runtime 6 (Airflow 2.4)
Smart Sensors were deprecated in Airflow 2.2.4 and removed in Airflow 2.4.0. If your organization is still using Smart Sensors, you'll need to start using deferrable operators. See Deferrable operators.
Runtime 5 (Airflow 2.3)
Astro Runtime 5.0.0, based on Airflow 2.3, includes changes to the schema of the Airflow metadata database. When you first upgrade to Runtime 5.0.0, consider the following:
Upgrading to Runtime 5.0.0 can take 10 to 30 minutes or more depending on the number of task instances that have been recorded in the metadata database throughout the lifetime of your Deployment on Astro.
Once you upgrade successfully to Runtime 5, you might see errors in the Airflow UI that warn you of incompatible data in certain tables of the database. For example:
Airflow found incompatible data in the `dangling_rendered_task_instance_fields` table in your metadata database, and moved...
These warnings have no impact on your tasks or DAGs and can be ignored. If you want to remove these warning messages from the Airflow UI, reach out to Astronomer support. If requested, Astronomer can drop incompatible tables from your metadata database.
If you're upgrading a local Airflow environment, you don't need an Astro Deployment and you can skip steps 3-4.
Update Your Dockerfile
In your Astro project, open your
Change the Docker image in the
FROMstatement of your
Dockerfileto a new version of Astro Runtime.
To upgrade to the latest version of Runtime, for example, change the
FROMstatement in your Dockerfile to:
You must always specify the major, minor, and patch version of any given Astro Runtime version.
Test Astro Runtime locally
Astronomer recommends testing new versions of Astro Runtime locally before upgrading a Deployment on Astro.
Save the changes to your
Open your project directory in your terminal and run
astro dev restart. This restarts the Docker containers for the Airflow webserver, scheduler, triggerer, and Postgres metadata database.
Access the Airflow UI of your local environment by navigating to
http://localhost:8080in your browser.
Confirm that your local upgrade was successful by scrolling to the bottom of any page. You should see your new Astro Runtime version in the footer as well as the version of Airflow it is based on.
Deploy to Astronomer
To push your upgraded project to an Astro Deployment, run:
For more information about deploying to Astro, see Deploy code.
Once you upgrade to a Deployment on Astro to a new version of Astro Runtime, you cannot roll back or downgrade to a lower version. If you attempt to do so, you will see an error in the Astro CLI and your request to deploy will not succeed.
Confirm your upgrade on Astro
In the Cloud UI, select a Workspace and then select a Deployment.
Click Open Airflow.
In the Airflow UI, scroll to the bottom of any page. You should see your new Runtime version in the footer:
You will also see an Image tag for your deploy. This tag is shown only for Deployments on Astro and is not generated for changes in a local environment.