Skip to content

Commit

Permalink
Improve error checking for astro dev upgrade-check (#396)
Browse files Browse the repository at this point in the history
* improve error checking for `astro dev upgrade-check`

* Update cmd/airflow.go

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>

* Update cmd/airflow.go

Co-authored-by: Greg Neiheisel <greg@astronomer.io>

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Greg Neiheisel <greg@astronomer.io>
  • Loading branch information
3 people committed Dec 11, 2020
1 parent 70ef968 commit 748ca2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/airflow.go
Expand Up @@ -398,7 +398,7 @@ func airflowUpgradeCheck(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true

// Add airflow command, to simplify astro cli usage
args = append([]string{"bash", "-c", "pip install --no-deps 'apache-airflow-upgrade-check'; airflow upgrade_check"})
args = append([]string{"bash", "-c", "pip install --no-deps 'apache-airflow-upgrade-check'; python -c 'from packaging.version import Version\nfrom airflow import __version__\nif Version(__version__) < Version(\"1.10.14\"):\n print(\"Please upgrade your image to Airflow 1.10.14 first, then try again.\");exit(1)\nelse:\n from airflow.upgrade.checker import __main__;__main__()'"})
return airflow.Run(config.WorkingPath, args, "root")
}

Expand Down

0 comments on commit 748ca2e

Please sign in to comment.