-
Notifications
You must be signed in to change notification settings - Fork 394
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
config: document the way config files play together, add some how-tos or examples? #1368
Comments
(at the request of @pared after speaking on Discord)
I am using the --local option because I don't want to put my credentials under version control (i.e. the connection_string when it comes to Azure). I would expect that since it is not defined in the original repo, but it is defined in the project repo that DVC understands it should use the remote definition that actually exists, albeit not in the original repo. Taking this principle further, if I would have defined it in the original repo and in the project repo, I would expect DVC to overwrite the config from the original repo with the one provided in the project repo. A workaround is possible by using an environment variable to supply the connection string. |
@steffansluis You could also use your |
Looks we have a two different use cases here. One for the regular workflow, one for @kopytjuk have you tried to use two configs simultaneously? The way I understood your concern is that if we define a remote (name and all settings) in a local config (for security concerns) all other team members have to agree on the It's not a well known or documented feature of DVC, but DVC merges sections with same name from different configs. What it means in our case: we put ['remote "my-azure-remote"']
url = azure://my-container/dvc/ in the regular at the same moment, we can put ['remote "my-azure-remote"']
connection_string = <conn string> in the This way every team member can specify a connection string per remote, while everyone agree on URL being used. Would it solve the issue for you, @kopytjuk ? in your case, it is the same idea, but you should be using Please, let us know what do you think? |
@shcheklein I am now indeed using I discussed it with @efiop a bit, the main point of the current implementation is to avoid collisions in the config as that would lead to strange and hard to debug behavior. There seems be be some resemblance to how package managers like I think it makes sense to close or "rework" this issue into a general polishing of the remotes/config, although it would be even less actionable at this point, using |
@steffansluis okay, repurposing and moving this to the iterative/dvc.org for now ! Thanks for the feedback. |
Hey, thank you for your idea - that "merging" behaviour was not known to me - seems like a good solution. |
EDIT by @shcheklein
Repurposed from a few issues - both come from some misunderstanding/lack of proper docs on how config files (default vs local vs system vs global) play together.
#1368 (comment)
Currently, there are only two ways to handle secrets (e.g. connection strings, tokens, etc)
.dvc/config.local
file. Since this file is not shared among developers in Git, a team has to agree on a local configuration to pull/push data.AZURE_STORAGE_CONNECTION_STRING
- but if one has different storage destinations, one variable is not enough.It would be very handy to use
.dvc/config
but with own placeholders for secrets:If the right secret is set, we can share
.dvc/config
without revealing secrets in Git.The text was updated successfully, but these errors were encountered: