astronomer / astro-cli

CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer
https://www.astronomer.io
Other
348 stars 70 forks source link

Invalid field error when using `astro dev pytest` with `--args` options #1515

Closed josh-fell closed 7 months ago

josh-fell commented 7 months ago

Describe the bug After upgrading to v1.22, astro dev pytest commands which also include --args options failed for an "invalid field error".

For example:

astro dev pytest --args "-c pyproject.toml"

Running Pytest
This may take a minute if you have not run this command before…
[build -t sirius_4026ab/airflow:latest -f Dockerfile . --secret -c pyproject.toml]
ERROR: invalid field '-c pyproject.toml' must be a key=value pair
Error: command 'docker build -t sirius_4026ab/airflow:latest failed: failed to execute cmd: exit status 1

Looking at the build command that is executed from the output above, it seems as though a --secret flag is injected.

What CLI Version did you experience this bug?

Astro CLI Version: 1.22.0

This CLI bug is related to which Astronomer Platform?

What Operating System is the above CLI installed on? Mac, darwin22.0

🪜 Steps To Reproduce

Within an Astro project that has unit tests, run an astro dev pytest command that includes --args options, like astro dev pytest --args "-c pyproject.toml"

📸 Screenshots

image
sunkickr commented 7 months ago

fixed