dvc: Failure to pull after importing a git repo
Please provide information about your setup
DVC version(i.e. dvc --version
), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))
DVC 0.86.4, conda installation, Windows.
See https://discuss.dvc.org/t/importing-from-a-git-repo-then-pulling/320 for background.
After import
ing a directory from a git repository (not a dvc repository), dvc pull
fails with ERROR: unexpected error - 'ExternalGitRepo' object has no attribute 'cache'
.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 15 (15 by maintainers)
Works like a charm
@charlesbaynham, #3503 implemented exactly how you described.
dvc pull
will fetch using specifiedrev_lock
.dvc import
can be used to import (or, forced re-import), and update will updaterev_lock
ifrev
moves. We haveupdate --rev
to move to a different revision.@charlesbaynham it actually does put it in the cache. Continuing your script:
But shouldn’t push it to the remote storage, indeed.
@skshetry in this case, I don’t understand why
dvc pull
is even trying to pull from this import stage, since the output is already in cache ^ (and workspace).I think that’s the current
p0
bug.dvc fetch\pull
anddvc push
as well, just in case.Thanks for the bug report @charlesbaynham ! We’ll take a look ASAP.
@skshetry @efiop Fantastic, thank you! I’ll give it a try.
Able to reproduce with following tests:
Looks like it never worked before.
dvc import
already puts the file in the cache, anddvc update
should be used for updating. Nevertheless, I’m trying to see what’s going on.