-
Notifications
You must be signed in to change notification settings - Fork 6
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
Move build
from positional args to named.
#31
Comments
Fwiw, I like that it's more "uniform" this way, i.e. to me it feels a bit unbalanced that we currently have "--distro centos-9" but type is just an positional argument and has no --type. But then its a bit more typing for our users. We should probably have a brainstorm again in the new year. |
I agree, there's a convenience to positional args, but I think once you go beyond 3, it starts becoming easier to forget which is which. I think the extra typing is an acceptable tradeoff for explicitness. I wouldn't be against going that way. |
@ondrejbudai Any (strong) opinions here? |
I only have one strong opinion: the user experience for the first time users must be as simple as possible. I like that positional arguments is all you need to get an image, I find it extremely user-friendly: Requiring a named argument makes the command longer, and imo slightly harder to document. Would it make sense to split these use-cases into 2 subcommands? One very simple one ( $ cat fedora-iot.yaml
ostree-url: example.com/fedora
ostree-ref: fedora/rawhide
types:
- iot-installer
- iot-simplified-installer
- iot-raw
- iot-container
distro: fedora-rawhide
$ image-builder-cli multi-build fedora-iot.yaml |
I'm fine with either approach; I created a quick PR to have I'll add an opinion that if we do what @ondrejbudai proposes to please call these commands Perhaps we can rename |
It'd be nicer if the
image-builder build
subcommand takes named arguments instead of positional arguments. Currently it looks like this:I propose:
This would allow for multi-type builds (a very strong advantage of the
osbuild
system):And would allow us to in the future have other inputs except the built-in image types such as a custom YAML file for custom images.
The text was updated successfully, but these errors were encountered: