-
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
pull: fails in V2 if original import was in V1 and specified a git tag #6255
Comments
I think the problem is that here:
We then proceed to treat it as a commit, which does not work. The expected behaviour (I think) would be to get, in my example:
(the tag object does have a I suspect it might be a (haven't found an open issue there). What's even more worrying - seems like this |
fwiw, I've opened an issue in |
@tomaszpietruszka-globality I'm not able to reproduce this in DVC or with using pygit directly (tested with pygit 1.5.0 and 1.6.1). Can you confirm which pygit version you have installed through pip, and which libgit2 version it was built against (using
|
@pmrowla I believe I'm using the same versions:
The key thing is: the problem does not manifest when resolving the name of the annotated tag, it manifests when resolving the SHA of the annotated tag. It's probably a very rare use case, because why would someone use the SHAs of tags... except that's what DVC 1.x stores as Another way of reproducing, purely with pygit2:
|
That makes sense. I'm not sure if this is actually a pygit2 bug, or just an incorrect docstring explanation of the The problem here is that the Either way, we can handle this in DVC, whether or not it ends up being fixed upstream. |
Bug Report
Description
DVC 2.x does not seem to be backwards compatible with 1.x in cases where the
dvc import
specified a tagAttempting to
dvc pull
after a dvc upgrade results inOf course re-importing the same files using a new DVC version is a "solution", but the migration would be quite painful for us - large number of files in multiple places.
BTW, once a file has been re-imported using new DVC, the resulting
.dvc
file differs in 2 ways:rev_lock
SHAmd5
in the first line of the file (not surprising)Reproduce
.dvc
dvc pull
- fails withERROR: unexpected error - '_pygit2.Tag' object has no attribute 'tree'
(the example below includes a path to an existing repo created for debugging and an existing tag within that repo)
Expected
The imported file should get pulled again
Environment information
It's an issue of compatibility between versions - below showing the version after the upgrade.
Output of
dvc doctor
:After the V2 upgrade:
Additional Information (if any):
Verbose log:
The text was updated successfully, but these errors were encountered: