Skip to content

repro: better handling for dvc.yaml files in tracked directories [qa] #4293

@jorgeorpinel

Description

@jorgeorpinel

Bug? Report

  1. Let's create a dataset dir and add it:
λ mkdir adir
λ echo data > adir/data
λ dvc add adir
100% Add|███████████...
  1. Now let's create a dvc.yaml file in there manually (since we can't use dvc run in a tracked dir because it's "within an output '.' of another stage" — not really a stage though, just a .dvc file)
λ cd adir
λ cat << EOF >> dvc.yaml
> stages:
>   hello:
>     cmd: echo hi
> EOF
λ dvc add adir
...

Notice how DVC allows me to update the adir output which now includes a dvc.yaml file.

  1. Finally, let's try to run the hello stage with repro:
λ dvc repro hello
ERROR: unexpected error - Stage: 'hello'
λ cd ..
λ dvc repro -c adir hello
ERROR: unexpected error - Stage: 'hello'
λ dvc repro adir/dvc.yaml
ERROR: unexpected error - Stage: 'hello'
λ dvc repro -R .
Stage 'adir.dvc' didn't change, skipping
Stage 'cpplot' didn't change, skipping
Data and pipelines are up to date.
λ dvc repro -P
Stage 'adir.dvc' didn't change, skipping
Stage 'cpplot' didn't change, skipping
Data and pipelines are up to date.

Problems

  • Notice how the first 3 direct forms produce an "unexpected error" — there should be a better error message probably.
  • The last 2 (with -R and -P) don't even find adir/dvc.yaml. Should they? (and print the same message above)

Please provide information about your setup

Output of dvc version:

λ dvc version
DVC version: 1.2.1
Python version: 3.8.2
Platform: Windows-10-10.0.18362-SP0
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('NTFS', 'C:\\')
Repo: dvc, git
Filesystem type (workspace): ('NTFS', 'C:\\')

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-mediumMedium priority, should be done, but less importantresearch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions