Open sjawhar opened 1 year ago
CCing @efiop since I think it's highly related to his work on using Index for all the things. I just tested this with 3.0.0a2 and the unwanted behavior is still there for fetch
and checkout
.
@sjawhar Sorry, but I don't have time to look deep into it right now. Probably related to how --with-deps
is resolved in targets_view
, but one would need to take a closer look.
@sjawhar Sorry, but I don't have time to look deep into it right now. Probably related to how
--with-deps
is resolved intargets_view
, but one would need to take a closer look.
Totally understandable. I have some ideas on how to address this, but I don't know what other work is being done that might conflict with my approach or render my fix irrelevant like the last PR I opened :sweat_smile: I'm motivated to fix this, though, so any advice you can offer would be much appreciated.
@sjawhar targets_view
is not going to change significantly any time soon. checkout
is also already migrated to a new arch. If you would look into those - i don't think your effort is going to be wasted.
@efiop I see the latest couple releases of DVC have some bugfixes specifically addressing imports. Is this issue resolved now? Can I finally upgrade to DVC 3?!
Nevermind, I just tested using the repro script above. Still the same problem :(
Bug Report
Description
dvc fetch
a subdirectory of animport
ed asset (tracked by.dvc
file), I see a "N files fetched" message. However, doingdvc checkout
of the same subdir has no effect (nothing checked out in workspace).dvc pull
instead.add
ed asset instead of animport
ed one, all files in the asset are fetcheddvc fetch --with-deps
a stage that has adep
which is a subdirectory of an import, it doesn't fetch the data for that dependency.repo.used_objs()
dvc checkout --with-deps
a stage that has adep
which is a subdirectory of an import, it seems to try to checkout the entire import, not just the subdirectoryadd
ed assetsReproduce
How about something like this:
Can then
dvc import
from this dummy repo to see the behavior forimport
ed assets instead ofadd
ed ones.Expected
deps/foo
(and notdeps/bar
) is fetched from the remote and checked out in the workspaceEnvironment information
Output of
dvc doctor
:Additional Information (if any):