Upgrade to Astro CLI version 1.0+
Upgrade to Astro CLI version 1.0+
Upgrade to Astro CLI version 1.0+
Astro CLI version 1.0+ delivers several new features to Astronomer Software and establishes a shared CLI framework across all Astronomer products.
Several commands and their flags have been updated as part of this release, resulting in breaking changes for users of Astronomer Software. Use this document to learn about these breaking changes and prepare for your upgrade to Astro CLI version 1.0+.
This information applies only to users who are upgrading the Astro CLI from a pre-1.0 to a post-1.0 version. To install the latest version of the CLI for the first time, see Install the CLI.
Before installing Astro CLI version 1.0+, complete all of the following steps:
After you complete these steps, upgrade to Astro CLI version 1.0+ by following the instructions in Install the CLI.
astro dev restart command to test local changesFor users making continuous changes to an Astro project locally, the Astro CLI now supports a new astro dev restart command. With this new command, you no longer need to run astro dev stop followed by astro dev start when you’re testing locally.
For more information, see CLI command reference.
You can now run custom unit tests for all DAGs in your Astro project with astro dev pytest, a new Astro CLI command that uses pytest, a common testing framework for Python. As part of this change, new Astro projects created with astro dev init now include a tests directory, which includes one example unit test built by Astronomer.
In addition to running tests locally, you can also run astro dev pytest as part of the deploy process to Astronomer Software. For more information, see CLI command reference.
The new astro dev parse command allows you to run a basic test against your Astro project to ensure that your DAGs are able to render in the Airflow UI. This includes the DAG integrity test that is run with astro dev pytest, which checks that your DAGs are able to render in the Airflow UI. Now, you can quickly run astro dev parse and see import and syntax errors directly in your terminal without having to restart all Airflow services locally.
For more complex testing, Astronomer recommends using astro dev pytest to run custom tests in your project. For more information on astro dev parse, see the CLI command reference.
This topic contains all information related to breaking changes included in Astro CLI version 1.0+ relative to version 0.28 and below.
This topic does not include information about new features and changes that are not breaking. For a summary of all changes, see the CLI release notes.
astro dev init: New --use-astronomer-certified Flag Required for All New Projects Deployed to SoftwareWhen you create a new Astro project with the astro dev init command, you must now specify the --use-astronomer-certified flag if you want to deploy the project to a Deployment on Astronomer Software. This flag initializes your project with the latest Astronomer Certified version.
If you don’t specify this flag, the project is initialized with an Astro Runtime image. Support for Astro Runtime on Astronomer Software is coming soon.
astro auth login is now astro loginThe previous astro auth login and astro auth logout commands have been simplified:
astro workspace create/update now takes all configurations as flagsWhen you specify configurations for a Workspace using astro workspace create or astro workspace update, you must now specify those properties with new flags.
astro workspace create/update: --desc flag has been renamed to --descriptionThe flag for specifying a description for a Workspace has been renamed from --desc to --description.
astro workspace user add: User email is now specified as a flagYou must now specify a new user’s email using the --email flag when running astro workspace
astro deploy Now accepts a Deployment ID instead of a release nameTo deploy code to a specific Deployment without manually selecting a Deployment from a list, you must now specify that Deployment’s ID instead of its release name when running astro deploy.
astro workspace sa get is now astro workspace sa listastro deployment/workspace sa create: --role only accepts full role namesThe --role flag now accepts either WORKSPACE_EDITOR, WORKSPACE_ADMIN, or WORKSPACE_VIEWER.
astro deployment create/update now takes all properties as flagsYou must now specify a Deployment’s properties using flags when you run astro deployment create or astro deployment update.
astro deployment user list Now Takes Deployment ID as a FlagTo list users that have access to a specific Deployment, you must now use the --deployment-id flag when running astro deployment user list.
astro deployment user add: --email flag is now requiredYou must now specify a user’s email using the --email flag when running astro deployment user add.
astro deployment user delete is now astro deployment user removeastro logs <component> is now deprecatedThe astro logs command has been removed. This command has been unavailable for the last several CLI releases. Use astro dev logs to view logs locally or astro deployment logs <component> to view logs for a Deployment hosted on Astronomer Software.
astro cluster list/switch is now astro context list/switchastro deployment sa create: --system-sa and --user-id are deprecatedThe --system-sa and --user-id flags have been deprecated for astro deployment sa create. These flags have not been functional for the last several CLI versions.
astro dev init: shortcut for --airflow-version is now -aThe shortcut for specifying an Astronomer Certified version for astro dev init has been changed from -v to -a.