Allow passing build args, not just secrets, to relevant `astro dev ...` commands
- [x] I have checked that a similar feature request does not already exist.
✍️ 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?
- [x] Astro
- [ ] Software
- [ ] None/Unknown
💡 Additional context
Thanks for all the incredible work Astronomer does for Airflow.
@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 you could run a custom
docker build --build-arg=command and then run start a project with that imageastro 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
Just wanted to record another instance of folks wanting to do this natively instead of using --image-name. This link only followable by Astronomers