canonical / maas-anvil

A snap for managing charmed MAAS deployments.
https://maas.io
Apache License 2.0
3 stars 7 forks source link

Don't ask any questions if a manifest is being passed #68

Open bjornt opened 2 months ago

bjornt commented 2 months ago

When I pass a manifest to bootstrap, I would expect that anvil wouldn't ask me any questions for parameters that are not present in the manifest.

I would expect that it would take the values from the manifest, and then use the default values for anything that's not explicitly specified.

skatsaounis commented 2 months ago

Theoretically this is not an issue since the user can always run: maas-anvil cluster bootstrap --role region --manifest .config/anvil/manifest.yaml --accept-defaults, which will result to what you are expecting. On the other hand, this could be a matter of enhancing UX.

The PR opened by @SK1Y101 is removing the need for --accept-defaults. An alternative would be to default --accept-defaults to True. Another alternative is to do nothing. @bjornt Please review my comment and the linked PR and decide yourself what you think is more appropriate. I am fine with any alternative :slightly_smiling_face:

bjornt commented 2 months ago

I think @SK1Y101 's solution is good here.

To me that makes the most sense from a UX point of view. In my experience, you usually either provide a configuration/manifest file, or you get asked questions. To provide a manifest and get asked questions feels like an odd workflow. Do you have examples of other applications that behave in that way?

And as you said, this removes the need for --accept-defaults, which could be removed. Which is good, having fewer command line options makes things easier to understand.