Skip to content
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

dvc dependency repo: Catch FileNotFoundError #10501

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

Honzys
Copy link
Contributor

@Honzys Honzys commented Aug 2, 2024

This should fix #10500

  • When checkouting non-existent file the _checkout_file recursively calls os.stat on a symlinked file which destination doesn't exist. This causes a FileNotFoundError but it is not catched and it causes an unexpected error instead.

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

Copy link
Collaborator

@dberenbaum dberenbaum left a comment

Choose a reason for hiding this comment

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

I think this is the simplest way to go. @skshetry Please chime in if you prefer a different solution.

- When checkouting non-existent file the _checkout_file recursively
  calls os.stat on a symlinked file which destination doesn't exist.
  This causes a FileNotFoundError but it is not catched and it causes
  an unexpected error instead.

Fixes iterative#10500.
@Honzys Honzys force-pushed the fix_checkout_error_with_symlinks branch from d61e467 to 1f8a4b5 Compare August 9, 2024 13:12
@skshetry
Copy link
Member

skshetry commented Aug 9, 2024

Sorry, I'll take a look at this by Monday.

@skshetry skshetry merged commit 9735b5a into iterative:main Aug 12, 2024
19 checks passed
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==3.53.0 import fails with No such file or directory when cache.dir configured and cache.type symlink
3 participants