dvc: better error when output is dvcignored
UPDATE: Skip to https://github.com/iterative/dvc/issues/3538#issuecomment-669603698
$ dvc version
DVC version: 0.90.2
Python version: 3.7.5
Platform: Windows-10-10.0.18362-SP0
Binary: True
Package: exe
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Filesystem type (workspace): ('NTFS', 'C:\\')
Having data
in .dvcignore makes DVC commands ignore all file names starting with that string e.g data2
, dataset
. https://dvc.org/doc/user-guide/dvcignore links to gitignore patterms but Git doesn’t do that.
UPDATE: Skip to https://github.com/iterative/dvc/issues/3538#issuecomment-621947830
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (13 by maintainers)
@jorgeorpinel Thanks for the update! Indeed, that message could be improved.
I would rather not do that. We’ve seen it causing very odd bugs in git, wouldn’t want that for dvc unless there are some very good scenarios. Would wait for someone to ask for it.
It seems the conflation of concepts “exists” and “ignored” leads to confusing error messages. In my case one of “run” outputs was by mistake ignored in .dvcignore, but the respective message was confusingly saying the file “does not exist”. Possibly related source: dvc/tree/local.py#L79.
@jorgeorpinel hmm, that does not seem right. I think we should behave in a similar way as git does, which is informing the user that his output collides with an entry of some
.dvcignore
file. This functionality can be implemented probably after we introduce something likegit check-ignore
for.dvcignore
. I think there was an issue for that already, but I am unable to find it.@jorgeorpinel Oh, I misunderstood your report. Need to check that, indeed. @pared Maybe you have any ideas?