Skip to content

dvc: properly handle relative symlinks #4275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2020
Merged

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Jul 24, 2020

Fix #4160

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

@efiop efiop changed the title dvc: properly handle relative symlinks [WIP] dvc: properly handle relative symlinks Jul 24, 2020
@efiop efiop changed the title [WIP] dvc: properly handle relative symlinks dvc: properly handle relative symlinks Jul 24, 2020
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.

I wonder what about followin situation:

  1. We have a link in our data dir
  2. We add it
  3. We update link origin

I guess one would expect its state will also be updated in our data dir, right?

@efiop
Copy link
Contributor Author

efiop commented Jul 24, 2020

I guess one would expect its state will also be updated in our data dir, right?

@pared Great point! Potentially we could just keep the original link, but if someone would to think "oh, I've added it to dvc, so I can delete it now" we would get a broken link. From that standpoint it is just easier to replace the link with our own link (which in this test is copy, but might be symlink/hardlink/reflink). But let's definitely keep that use case in mind, maybe someone will come ask for it.

@efiop efiop merged commit 39c0bdb into iterative:master Jul 24, 2020
@pared
Copy link
Contributor

pared commented Jul 24, 2020

Yeah, I guess there is no proper solution that would satisfy all use cases and expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'dvc add dir' fails when 'dir' contains a file and a relative symlink on this file
2 participants