Skip to content

fix: don't proxy backend ETag by default - #23

Merged
krokicki merged 1 commit into
mainfrom
fix-etag-integrity-check
Jul 27, 2026
Merged

fix: don't proxy backend ETag by default#23
krokicki merged 1 commit into
mainfrom
fix-etag-integrity-check

Conversation

@krokicki

@krokicki krokicki commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • A recent change (e45a732) started proxying the backend's raw ETag/Last-Modified through on GetObject/HeadObject/ListObjectsV2. Some S3-compatible backends (e.g. VAST) return an ETag that isn't a true content MD5, which breaks the AWS SDK/CLI download integrity check ("Unable to verify integrity of data download"). This surfaced in production via N5/Zarr Java readers (Fiji/BigDataViewer), which use the AWS SDK v1 client that validates GetObject downloads against the ETag.
  • Adds a per-target proxy_etag option on aioboto targets (default false) so ETag is no longer proxied unless explicitly opted into for backends known to return a real content-MD5 ETag (e.g. real AWS S3).
  • Adds tests/java/src/test/java/org/janelia/x2s3/S3v1IntegrityTest.java, which reproduces the exact AWS SDK v1 code path that was throwing in Fiji, and updates S3CompatTest to reflect the new default (ETag no longer proxied).

Test plan

  • python -m pytest --cov=x2s3 — 70 passed
  • pixi run test-java (against a locally-running x2s3 pointed at real Janelia S3-gateway targets) — 16 passed, confirming no SdkClientException and well-formed downloaded content
  • Confirm the fix resolves the original Fiji/BigDataViewer failure against the live VAST-backed deployment

@StephanPreibisch

Some S3-compatible backends (e.g. VAST) return an ETag that is not a
true content MD5. Proxying it unconditionally broke AWS SDK/CLI
download integrity checks ("Unable to verify integrity of data
download"), including in N5/Zarr Java readers used by Fiji/BigDataViewer.

Add a per-target `proxy_etag` option (default false) to opt back in
for backends known to return a real content-MD5 ETag, like AWS S3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@krokicki
krokicki merged commit 46ecdb9 into main Jul 27, 2026
5 checks passed
@krokicki
krokicki deleted the fix-etag-integrity-check branch July 27, 2026 21:54
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.

1 participant