Skip to content

add/etc: better handle file tracking crashes [qa] #4349

@jorgeorpinel

Description

@jorgeorpinel

Report

DVC moves data files to the cache and changes their file permissions (to 444), but if anything goes wrong (e.g. dvc add a file owned by another user, so DVC can't change the perms) the process crashes (some error is thrown) but not before disappearing the data file.

These complex operations should probably behave like transaction, or have some sort of backup mechanism to roll back the caching of the file if any error is thrown.

Please provide information about your setup

DVC 1.3
(Tried on Linux)

Additional Information (if any):

Context: https://discord.com/channels/485586884165107732/485596304961962003/740974097063739423 (starts before that)

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