-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
scm: use dulwich backend when fetching exps during clone/pull #9023
Conversation
refspecs uses pygit2 backend by default, which does not support git credential helpers. This PR forces to use dulwich backend during clone/pull operations.
Codecov ReportBase: 93.07% // Head: 93.06% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #9023 +/- ##
==========================================
- Coverage 93.07% 93.06% -0.02%
==========================================
Files 455 455
Lines 36753 36753
Branches 5316 5316
==========================================
- Hits 34208 34203 -5
- Misses 2023 2026 +3
- Partials 522 524 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Not blocking this) Should we set up some tests using credential manager?
We don't run any dockerized tests in dvc at the moment. We could test in scmrepo, but the whole exp-refs/external_repo logic remains in dvc. |
I can take a look though. |
Seems like this should be resolved on the scmrepo end. We can move credentials.py up a level into (and from there DVC doesn't need to do anything, the automatic backend stuff will try pygit first and then fall back to dulwich when it has to) |
Decided not to add, I think this should be natively supported by our backends. We cannot and should not test every kind of configuration. |
if we do that, we should just add support for git credential-helpers. |
We already have generic logic for doing this checking the configuration as it only requires reading |
I'd just prioritize having parity between different backends instead of using complicated logic to choose backends. Implementing git credential-helpers will offer the same performance. |
I looked into it briefly, and it seems we can implement it by extending |
Actually, looking at what's in |
Yes, we can reuse most of the stuff, we need to interface with |
@skshetry Thank you for the fix! Can you open a follow-up issue for adding credential helpers in pygit2? |
refspecs uses pygit2 backend by default, which does not support git credential helpers. This PR forces to use dulwich backend during clone/pull operations. Other uses of refspecs (in
experiments
in particular) is broken for users of git credential-helpers though.Fixes #9016.