Skip to content

Fix: pass protocol to Meta.from_info in _filter_changed (fixes treeverse/dvc#10594)#656

Merged
skshetry merged 1 commit intotreeverse:mainfrom
runsascoded:main
Feb 27, 2026
Merged

Fix: pass protocol to Meta.from_info in _filter_changed (fixes treeverse/dvc#10594)#656
skshetry merged 1 commit intotreeverse:mainfrom
runsascoded:main

Conversation

@ryan-williams
Copy link
Copy Markdown
Contributor

Summary

_filter_changed() in fetch.py calls Meta.from_info(info) without the protocol argument, so for S3 sources the ETag is never extracted (S3's s3fs returns "ETag" with uppercase key; Meta.from_info without protocol only checks lowercase "etag").

This breaks import-url --no-download + pull for S3 sources: the ETag comparison always fails, the entry is dropped, fetch reports "Everything is up to date", and checkout fails because the file isn't in cache.

Fix

# Before (line 79):
meta = Meta.from_info(info)

# After:
meta = Meta.from_info(info, data_fs.protocol)

This matches the correct usage in save.py:_meta_matches (same commit f398036), which already passes fs.protocol.

Related

`Meta.from_info(info)` without the `protocol` arg only checks lowercase
`"etag"` key, but S3's `s3fs` returns ETags with uppercase `"ETag"`.
This causes `meta.etag` to always be `None` for S3 sources, breaking
`import-url --no-download` + `pull` (treeverse/dvc#10594).

The fix matches the correct usage in `save.py:_meta_matches`, which
already passes `fs.protocol`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-project-automation github-project-automation bot moved this to Backlog in DVC Feb 27, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 27, 2026

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.82%. Comparing base (e38c8c2) to head (9956cd7).
⚠️ Report is 71 commits behind head on main.

Files with missing lines Patch % Lines
src/dvc_data/index/fetch.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #656      +/-   ##
==========================================
+ Coverage   72.42%   73.82%   +1.40%     
==========================================
  Files          67       65       -2     
  Lines        5132     5357     +225     
  Branches      605      622      +17     
==========================================
+ Hits         3717     3955     +238     
+ Misses       1227     1209      -18     
- Partials      188      193       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skshetry
Copy link
Copy Markdown
Collaborator

@ryan-williams, thank you for contributing. Could you please sign the CLA?

@skshetry skshetry merged commit f76c1bd into treeverse:main Feb 27, 2026
24 of 25 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in DVC Feb 27, 2026
@skshetry
Copy link
Copy Markdown
Collaborator

Released in https://github.com/treeverse/dvc-data/releases/tag/3.18.3.

ryan-williams added a commit to runsascoded/dvx that referenced this pull request Feb 27, 2026
Upstream merged our fix (treeverse/dvc-data#656) and released 3.18.3.
Drop the git direct reference and `allow-direct-references` hatch config.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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 import-url: can't pull data if using --no-download

3 participants