Skip to content

import/get: improve message when we try to re-import an artifact #2710

Closed
@shcheklein

Description

@shcheklein

We need to check (and fail gracefully?) if someone tries to do import/get of an output from the imported stage.

Example:

mkdir test-import
cd test-import
git init
dvc init
dvc import https://github.com/iterative/example-get-started model.pkl
dvc remote add -d myremote /tmp/storage
git commit -a -m "add remote"
cd ..
mkdir test-recursive-import
git init
dvc init
dvc import ../test-import/ model.pkl

outputs:

Importing 'model.pkl (../test-import/)' -> 'model.pkl'
WARNING: Some of the cache files do not exist neither locally nor on remote. Missing cache files:
name: ../../../../private/var/folders/_1/dxrf7_f15sn4r01jvqvr5b6h0000gn/T/tmprcut42dgdvc-erepo/model.pkl, md5: 662eb7f64216d9c2c1088d0a5e2c6951
WARNING: Cache '662eb7f64216d9c2c1088d0a5e2c6951' not found. File 'model.pkl' won't be created.
ERROR: failed to import 'model.pkl' from '../test-import/'. - output 'model.pkl' does not exist

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

which is ugly and technically correct but can improved to warn that we are trying to re-import imported output which will always fail since we don't cache imports.

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