Skip to content

Conversation

@danielfleischer
Copy link

@danielfleischer danielfleischer commented Nov 3, 2020

Files are checked for ownership by trying to chmod them before moving them around; if fail, return a verbose exception.
Previous behavior: moving files to a temp folder and then do the check; when fail, files seemed to be missing.

Should fix #4348 and maybe fix #2992.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

Copy link
Contributor

@pared pared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! One minor thing

If error related to access/permission, throw the newly created
FileOwnershipError exception, otherwise throw the OSError as is.
@pared
Copy link
Contributor

pared commented Nov 9, 2020

@danielfleischer looks good, the tests test_add_symlink_file seems to be failing on windows due to this change.

Using the function _unlink which includes error handling.
@danielfleischer
Copy link
Author

Made a small fix; used _unlink instead, it's safer. Now all Windows tests pass.

@pared pared requested review from efiop, pmrowla and skshetry November 11, 2020 13:03
@pared pared merged commit 8e73826 into iterative:master Nov 12, 2020
@pared
Copy link
Contributor

pared commented Nov 12, 2020

@danielfleischer Thank you very much!

@efiop efiop added the enhancement Enhances DVC label Nov 18, 2020
efiop pushed a commit that referenced this pull request Jan 24, 2021
Fixes #5255

We need a proper solution for #4832, will introduce later.

This reverts commit 8e73826.
efiop added a commit that referenced this pull request Jan 24, 2021
…#5321)

Fixes #5255

We need a proper solution for #4832, will introduce later.

This reverts commit 8e73826.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhances DVC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parquet file owned by other user gets deleted upon dvc add better message when trying to link from files that belong to another user

5 participants