dvc: dvc_walk() and related things are broken by design

Created on 7 Dec 2019  路  7Comments  路  Source: iterative/dvc

A few things:

  • when we collect stages in a branch dvcignore is not used at all, i.e. we go into .dvc and other ignored dirs
  • dvc_walk() and walk_files() always walk the working dir, but might accept dvcignore built from a branch. The results will make no sense.

We may approach this from two sides:

  • wrap dvcignore into a tree, i.e. dvctree = TreeWithIgnores(some_tree); dvctree.walk(...).
  • check that we only use dvcignore built from working dir if we os.walk().
bug p1-important research

Most helpful comment

All 7 comments

when we collect stages in a branch dvcignore is not used at all, i.e. we go into .dvc and other ignored dirs

It is used https://github.com/iterative/dvc/blob/master/dvc/repo/__init__.py#L401 . Could you clarify?

@Suor Good catch! CC @pared

@Suor, what do you mean by a tree?

@mroutis trees that we use. E.g. dvc/dvc/scm/git/tree.py

thanks, @efiop

Confirmed, dvcignore has not been properly working for branches since day 1.
https://github.com/iterative/dvc/pull/1820

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shcheklein picture shcheklein  路  3Comments

dnabanita7 picture dnabanita7  路  3Comments

ghost picture ghost  路  3Comments

mfrata picture mfrata  路  3Comments

TezRomacH picture TezRomacH  路  3Comments