-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Colima runs should never overwrite configuration on disk #613
Comments
I can understand your point. Yeah, Colima basically merges the CLI flags (if specified) with the current config to generate a new config file, and thereafter starts off the (newly generated) config file. It is kinda convenient and works for most people.
I have no objections with that. What shall we call it? I would prefer to have a flag that the zero value defaults to the current behaviour i.e specifying it would disable overwriting the config file. |
Makes sense, I'm not too opinionated on that
Again, no strong opinions. I think I haven't dug into the codebase, but how reasonable would it be to have this flag in the profile config as well, indicating that that profile should never be overwritten by CLI? A use case would be to distribute a colima profile for everyone working in an org with some canonical configs, which won't unintentionally be changed when someone's running some experiments. If it's something you're ok with but can't prioritize, I can give it a shot. |
Simply having a # Prevent this config file from being updated by user specified CLI flags and temporary edits via the `--edit` flag.
# By default, Colima updates the config file to persist the changes specified via CLI flags or temporary edits.
# Default: false
locked: false The other question woud be the behaviour of the |
Sorry, had a busy week. I'm happy with that configuration, and I think it makes sense to prevent Btw another behavior I've noticed, which may impact even people who don't want to lock their profiles - any additional comments written get erased. So for instance, even without changing any configs, if my original config had comment explanations for why a certain default was changed, it gets erased on a plain |
The current behavior is extremely jarring and reads as a bug rather than a feature. Please do not touch the config unless it is asked for. And it is very natural for most people to assume overwriting the config would be opt-in rather than opt-out, so if you go with |
Are there any updates if this is going to be implemented? Because Colima always overwrites the configuration file it's hard to automate the Colima configuration. |
Description
Currently, running
colima start
with any configuration overwrites the profile on disk:This is highly undesirable unless explicitly asked for (for instance, maybe with a
--save-config
), since this means that a run of justcolima start
implies running the previous configuration, rather than running a profile you had saved. The point of a profile is to have a consistent saved config you can rely on, and any CLI args should be assumed to be overrides just for that specific run.This is especially true when you're not using a profile, where the assumption of running
colima start
with no args would be to choose the documented defaults (for example, 2GB of memory).(I also understand here that there might be a split in opinions on what the assumed behavior is, in which case I'd request at least having an option to prevent overwriting the configuration on disk, even if it doesn't default to that)
The text was updated successfully, but these errors were encountered: