Support Airflow 2 to 3 deployment upgrades by jeremybeard · Pull Request #1818 · astronomer/astro-cli

Description

This change supports upgrading Astro deployments from Airflow 2 to 3. This involves updating the version comparison logic to take into account the new runtime versioning scheme for Airflow 3 images.

Note that for the initial period of Airflow 3 availability, to upgrade a deployment from Airflow 2 to 3 will require setting the --force-upgrade-to-af3 flag on the astro deploy command.

Resolves #1815

🧪 Functional Testing

  • Unit tests added/updated
  • Ran astro deploy for an AF3 project on an AF2 deployment, hit expected error on missing flag
  • Ran astro deploy --force-upgrade-to-af3 for an AF3 project on an AF2 deployment, deploy proceeded

📸 Screenshots

Without flag:
Screenshot 2025-03-26 at 3 43 23 PM

With flag:
Screenshot 2025-03-26 at 3 45 01 PM

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation