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

Allow passing build args, not just secrets, to relevant astro dev ... commands #1668

Open
2 of 4 tasks
ttzhou opened this issue Jun 14, 2024 · 3 comments
Open
2 of 4 tasks

Comments

@ttzhou
Copy link

ttzhou commented Jun 14, 2024

✍️ Is your feature request related to a problem? Please describe.

Currently, we can pass secrets to various astro dev ... commands via the --build-secrets flag. However, there are times where we may want to pass "one-off" arguments at build time (which we may not want as environment variables) that we can reference via ARG. This does not currently seem possible (2024-06-14), as confirmed by this response on the community Slack

🧩 Describe the solution you'd like

The request is for the ability to pass build time arguments that can be referenced via ARG, via a flag --build-arg <NAME>=<VALUE> (or some equivalent).

E.g.

astro dev start \
  --build-secrets id=...,src=... \
  --build-arg XXX=FOO \
  --build-arg YYY=BAR

🤔 Describe alternatives you've considered

We can get halfway there by using the --env arg and specifying a file to use (this is what we currently use as a workaround); however, some args we'd like not to be lying around in the environment, as they are for a true "one-off" usage.

Is your feature request specific to a particular Astronomer Platform?

  • Astro
  • Software
  • None/Unknown

💡 Additional context

Thanks for all the incredible work Astronomer does for Airflow.

@sunkickr
Copy link
Contributor

@ttzhou you could run a custom docker build --build-arg= command and then run start a project with that image astro dev start --image-name....

But I agree this solution would not be as nice as the one you have described above

@ttzhou
Copy link
Author

ttzhou commented Jun 17, 2024

@ttzhou you could run a custom docker build --build-arg= command and then run start a project with that image astro dev start --image-name....

But I agree this solution would not be as nice as the one you have described above

For sure, and I'm good to take that approach - the response on the Community Slack suggested to file this anyway though! @sunkickr

@collinmcnulty
Copy link
Contributor

Just wanted to record another instance of folks wanting to do this natively instead of using --image-name. This link only followable by Astronomers

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

3 participants