Skip to content
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

tests: add test for dvc.api.open with remote #7363

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Feb 8, 2022

Covers #7341.

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

@skshetry skshetry requested a review from a team as a code owner February 8, 2022 15:40
@skshetry skshetry requested a review from pared February 8, 2022 15:40
@skshetry
Copy link
Member Author

skshetry commented Feb 8, 2022

@efiop, this still fails on:

outs = list(self.repo.index.tree.iteritems(key))

(you can try placing breakpoint here on this test)

@skshetry skshetry requested a review from efiop February 8, 2022 15:44
@efiop efiop mentioned this pull request Feb 8, 2022
@efiop
Copy link
Contributor

efiop commented Feb 8, 2022

On closer inspection, unlike before data tree introduction, this rises a somewhat unnoticed before problem of remote argument and metadata that the repo structure is getting built from. Plus every output might use its own remote, so remote becomes even more questionable. What we might be looking for here is some kind of config (mapping?) adjustment. Some use cases that come to mind:

  1. change default core.remote to something else (dvc config core.remote myremote)
  2. adjust particular remote configuration (e.g. add some keys or something) (dvc remote modify myremote key mykey)
  3. adjust remotes for particular outputs (currently no CLI command, so can only be modified by opening dvc.yaml/data.dvc and editing by hand)

For the most part, it seems like current remote= argument is mostly used to emulate 1).

Overall this seems to be the same problem as providing config through cli/api, e.g. #2466

1 and 2 can be solved by supporting config= in API (the values will be merged with repo config and data tree will be built using it, so you won't need to provide remote= to open at all, which is nice), but option 3 seems to require something more advanced (data tree editing?).

@skshetry skshetry added testing Related to the tests and the testing infrastructure skip-changelog Skips changelog labels Apr 21, 2022
@skshetry skshetry enabled auto-merge (rebase) April 21, 2022 09:26
@skshetry skshetry disabled auto-merge April 21, 2022 09:26
@skshetry skshetry merged commit fed0bfb into iterative:main Apr 21, 2022
@skshetry skshetry deleted the test-7342 branch April 21, 2022 09:27
@skshetry skshetry restored the test-7342 branch April 27, 2022 03:56
efiop added a commit that referenced this pull request Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog testing Related to the tests and the testing infrastructure
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants