Skip to content

remote: fail if does not exist #2700

@nkrot

Description

@nkrot

This is my first use of dvc and I may have missed something. If so, please disregard this issue.

So, I have configured remote to be a directory accessible via ssh. However, the last component in this path does not exist. I would expect dvc to fail but in reality, missing subdirectory was created on the remote machine when I pushed.

Illustration:

#  on the remote machine, we create a remote to the user project named `your-project`
mkdir -p /var/dvc-storage/your-project

# the user, on his/her own machine configures the remote in the wrong way
dvc remote add -d ssh://user@host/var/data/dvc-storage/your-project/someshit
# and then
dvc push

As a result, the subdirectory somethit is created and dvc push succeeds. Would it make sense to restrict remote to existing locations only, to avoid that user mess up the storage? This behaviour could be configurable but the default should be restrictive, imo.

kind regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions