Documentation Index
Fetch the complete documentation index at: https://astronomer-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The behavior and format of this command are the same for both Astro and Astro Private Cloud.
- Identify major and minor version changes of the Python packages in your upgrade version.
- Identify dag import errors that will appear after you upgrade.
Usage
Options
| Option | Description | Possible Values |
|---|---|---|
-a, --airflow-version | The equivalent of Airflow you want to upgrade to. The default is the latest available version. Note that the Astro CLI will still test against an Astro Runtime image based on the Airflow version you specify. | Any valid Airflow version. |
--build-secrets | Run docker build --secret to mount a secret value to your Docker image. | id=<your-secret-id>, src=<path-to-secret> . See Docker documentation. |
-d, --dag-test | Only run dag tests. These tests check whether your dags will generate import errors after you upgrade. | None |
-i, --deployment-id | Specify a Deployment ID to test with an image from an Astro Deployment instead of the image listed in your Astro project Dockerfile. | Any valid Deployment ID. |
-n, --image-name | A custom image with an upgraded image tag to test against. The CLI creates a new Dockerfile in your project named upgrade-test-<old version>--<new version>/Dockerfile that includes your upgraded image, then tests against that Dockerfile. | A valid image URL |
-v, --runtime-version | The version of Astro Runtime you want to upgrade to. The default is the latest available version. | Any valid Astro runtime version. |
--use-astronomer-certified | Test against an Astronomer Certified distribution of Airflow. Must be used with --airflow-version. | None |
--version-test | Only run version tests. These tests show you how the versions of your dependencies will change after you upgrade. | None |
--fix | Automatically fix linting issues identified by the upgrade test using ruff. | None |
--lint-deprecations | Include deprecation warnings in lint tests (set to false by default). | true, false |
Examples
-
Run all tests before upgrading to the latest version of Astro Runtime:
-
Test an Astro project file against a the Astro Runtime distribution of a Airflow 2.6.3:
-
Include deprecation warnings in lint tests (exports to ruff-lint-results.txt):
-
Test only dependency version changes against the Astro Runtime distribution for Airflow 2.6.3:
-
Test a custom image for an upgrade to a custom versioned distribution of Astro Runtime:
If you were upgrading from
quay.io/example-organization/new-example-organization-image:1.0.5, for example, the Astro CLI creates a new Dockerfile located inupgrade-test-1.0.5--1.0.7/Dockerfilethat contains the image you specified and tests against it.