Importing from a git repo, then pulling

Hi all!

I’ve got a dvc repo which dvc imports a directory from another normal git repo. This works fine.

However if I clone the dvc repo (or do a git clean -xdf to simulate) then run dvc pull, I can’t pull the imports properly. I notice that they’re not in my remote: presumably that’s because dvc is getting them from the original git repo url instead which is fine.

The error I get is:

$ dvc pull imported_steps/step_A.dvc 
ERROR: unexpected error - 'ExternalGitRepo' object has no attribute 'cache'

The associated .dvc file is

md5: 89ee29a257a80e53398e0927103f9c40
locked: true
deps:
- path: src
  repo:
    url: /path/to/original/repo/step_A
    rev_lock: 4244a25681d4e9dcbd9795e9406c9d0734dac3f9
outs:
- md5: d3a51ab352355f4f39f5adf02bcd698a.dir
  path: step_A
  cache: true
  metric: false
  persist: false
1 Like

Hi @cbaynham and thanks for the question! Sorry for the delay…

This sounds like a bug in something that is a recent feature (importing Git-tracked files).

Do you mind opening this report as a bug in https://github.com/iterative/dvc/issues (including DVC version, etc.)?

1 Like

Cheers Jorge, have done in https://github.com/iterative/dvc/issues/3377

3 Likes