remote modify: allow modifying options for "non-existent" remotes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
In certain cases we need to define a value in the global/system/local config to override the same value in the projects config (e.g. we do dvc import and want to override path to the credentials file, so that it is preserved). DVC right now expects remote section to exist in the global/system (not sure about local) configs:
(chipbrain-backend) Johns-MacBook-Pro-8:~/chipbrain/chipbrain-backend John$ dvc config -l
remote.storage.url=gdrive://****
core.remote=storage
d(chipbrain-backend) Johns-MacBook-Pro-8:~/chipbrain/chipbrain-backend John$ dvc remote list
storage gdrive://*****
(chipbrain-backend) Johns-MacBook-Pro-8:~/chipbrain/chipbrain-backend John$ dvc remote modify storage --global gdrive_user_credentials_file .dvc/gdrive-user-credentials.json
ERROR: configuration error - config file error: remote 'storage' doesn't exist.
does it make sense to remove this restriction? create the section automatically?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the dvc remote modify storage --global ... command shown in the issue and trace the dvc remote modify entry point handling remote sections. Check how global, system, and local configuration layers are resolved. Done means modifying an option succeeds when the remote section exists only in another configuration layer, with coverage for the reported credentials-file case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100