Skip to content

No prompt: fail when checking out without cache #2801

@dmpetrov

Description

@dmpetrov

See #2498

Some quotes:

dvc init --no-scm
echo 'foo' > foo
dvc add foo
rm -rf .dvc/cache/d3/b07384d113edec49eaa6238ad5ff00
dvc checkout

# WARNING: Cache 'd3b07384d113edec49eaa6238ad5ff00' not found. File 'foo' won't be created.
#   0%|          |Checkout                                                                                                 0/1 [00:00<?,     ?file/s]
# file 'foo' is going to be removed. Are you sure you want to proceed? [y/n]

Is there are cases when it makes sense to checkout data files without checking out a particular one (answer Yes case)? It seems like in most of the cases this is going to happen when a user forgets to run dvc pull\fetch - it is fine to fail in this case (wee can also show a proper message like Data file 'foo' is missing in cache. Please run 'dvc fetch' first.). Also, I can imagine when dvc fetch won't give you the data file (corrupted cache and remote) - in this "debug" mode partial checkout can be done by *.dvc files. So, in both of cases, failing seems like a better option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions