alcionai / corso

Free, Secure, and Open-Source Backup for Microsoft 365
https://corsobackup.io
Apache License 2.0
175 stars 27 forks source link

Improve configuration handling of parameters, envars, config file #3522

Open gmatev opened 1 year ago

gmatev commented 1 year ago

Context: The current scheme is not super clear and has caused some concerns with users who are struggling to change key parameters that are anchored to envars or config file.

Proposal: - Use a hierarchical model of overrides along the lines of what is available for the AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html. In order of precedence:

For the above to be effective we also need to:

Config file and secrets:

Corso persisting config file automatically:

Open questions:

One option is to show an error if the config file exists (with conflicting params) and allow an overwrite based on something like --overwrite-config. For simplicity this is treated as just deleting the file and persisting (after validation) all effective settings when init or connect is executed successfully

neha-Gupta1 commented 1 year ago

@gmatev need a little more explanation - For storage creds only-

neha-Gupta1 commented 1 year ago

Tracked in - https://github.com/alcionai/corso/issues/3586

neha-Gupta1 commented 1 year ago

Do we want to update config file values in case of repo Init command?

neha-Gupta1 commented 1 year ago

The config vars in - env, flags and config file is done