-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
index: fix storage for imports #10213
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #10213 +/- ##
=======================================
Coverage 90.50% 90.50%
=======================================
Files 499 499
Lines 37970 37982 +12
Branches 5517 5518 +1
=======================================
+ Hits 34363 34375 +12
Misses 2965 2965
Partials 642 642 ☔ View full report in Codecov by Sentry. |
07d34bc
to
930cb02
Compare
Thanks @efiop! Just checking that this doesn't break some other edge cases for import-url:
The general logic behind |
@dberenbaum Thank you for this, looks like I indeed completely forgot about 1 (confusing how we have 3 different behaviours for import-url and import together). Will adjust. Second one also needs some attention with cloud versioning context, but it is clear that it is partially broken at the very least. Also taking a look (if I won't send a PR soon I'll create an issue first). |
@dberenbaum Double checked, we have test for those in dvc/dvc/testing/workspace_tests.py Line 89 in bf5fe95
Always using that source fs as a remote storage with version-aware imports ✅
and that remote is always marked as read-only ✅
We have a specific test for that (see no_download one in the first link). ✅
We request a particular version_id in both, so missing (particular version_id) will get you a FileNotFoundError and modified shouldn't affect it (as that's a different version_id). |
That's great (and how it should be obviously).
Non-version-aware remotes should also be able to pull from source after no-download. That's tested here: dvc/tests/func/test_data_cloud.py Lines 268 to 277 in bf5fe95
For non-version-aware remotes, we should also test that it fails if the original source is missing or modified. See this comment. I added tests for those in https://github.com/iterative/dvc/tree/test-pull-partial-import if you want to merge those. |
Should we open an issue for this and move the discussion there? |
@dberenbaum That makes sense, I don't think we ever supported that in the past, but now we totally can through the same mechanism that we use for cloud versioning. I'll introduce metadata valiadation for non cloud versioned file storage in dvc-data and will update what's necessary in #10220 on top of your tests. Thank you! |
@efiop Are you sure it was never supported? Maybe it was specific to storages that have etags? This is what it says in #8024 (comment):
|
@dberenbaum I'll be sure to double check. |
Fixes #10194