Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --build-secrets behavior for multiple secrets #1720

Open
1 of 3 tasks
astro-anand opened this issue Sep 17, 2024 · 1 comment
Open
1 of 3 tasks

Fix --build-secrets behavior for multiple secrets #1720

astro-anand opened this issue Sep 17, 2024 · 1 comment

Comments

@astro-anand
Copy link

astro-anand commented Sep 17, 2024

Describe the bug

the astro cli --build-secrets flag generates an incorrect docker command when passed multiple secrets.
astro dev parse --build-secrets "id=secret1,env=ENV_SECRET" --build-secrets "id=secret2,env=ENV_SECRET2"-> build -t ul_44f240/airflow:latest -f Dockerfile . --secret id=secret1,env=ENV_SECRET,id=secret2,env=ENV_SECRET2

The command should include multiple --secrets flags. build -t ul_44f240/airflow:latest -f Dockerfile . --secret id=secret1,env=ENV_SECRET --secret id=secret2,env=ENV_SECRET2

slack reference: https://astronomer.slack.com/archives/CL44PA4DB/p1726511388479989

What CLI Version did you experience this bug?
1.28.1

This CLI bug is related to which Astronomer Platform?

  • Astro
  • Software
  • None/Unknown

What Operating System is the above CLI installed on?
Affects both Mac and Windows

🪜 Steps To Reproduce

run commands above.

@neel-astro
Copy link
Contributor

A possible workaround if someone stumble on this until this is fixed is to build the docker image manually and pass that in astro dev start command, i.e.

# command to build the custom image via docker cli
docker build -t <image_name>:<image_tag> -f Dockerfile . --secret id=<secret_id1>,env=<secret_env1> --secret id=<secret_id2>,env=<secret_env2>

# command to start the astro project with a custom image
astro dev start --image-name <image_name>:<image_tag>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants