-
Notifications
You must be signed in to change notification settings - Fork 1.3k
exp show: throws an error with -n -1 #7435
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
Conversation
fix: treeverse#7434 exp show -n -1 will throw error on any repo with a remote repo setted. 1. Update new version of `scmrepo` 2. Update the unit test add a remote repo to the test case.
|
Looks like scmrepo is not compatible with current version of DVC. After PR Guess it arises from the relative path and abs path change in recent |
|
See #7359 (comment). |
|
@karajan1001, I don't understand the change here. Do we need this? Tests pass fine on master with |
I used to update |
|
@dberenbaum so I guess for now, after updating the |
|
If the underlying issue was in scmrepo, #7434 should just be closed with a link to the scmrepo fix/PR (and the appropriate test should have been added in scmrepo) |
|
The fix in treeverse/scmrepo#32 was about supporting |
The test here influence the line below gen = iter_revs(scm, ["other"], -1)which will test |
|
Ok, so the remote being set causes us to manually try The actual underlying problem was that trying to resolve relative commits that did not exist would lead to the unhandled pygit exception in scmrepo. This is not actually related to whether or not remotes are set at all, the same behavior would occur if we tried a non-remote ref like So we probably do not actually need this test/change on the DVC side, since we now have an actual test for resolving non-existent relative commits on the scmrepo side. |
For future reference, when we see cases like this, tests should be for the actual bug behavior. So if there is a case where some higher level function call in DVC leads to a bug in Adding a test for the higher level API call generally just leads to test code/behavior that is not obvious at all (like randomly setting a git remote). And it's basically impossible for someone else to look at the test function and understand what we are even trying to test in the first place |
fix: #7434
exp show -n -1 will throw error on any repo with a remote repo setted.
scmrepo❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏