Skip to content

fix(storage): suppress SDK checksum WARN for S3-compatible backends (MinIO/Ceph)#3284

Open
AdaAibaby wants to merge 1 commit into
e2b-dev:mainfrom
AdaAibaby:fix/s3-response-checksum-validation-warn
Open

fix(storage): suppress SDK checksum WARN for S3-compatible backends (MinIO/Ceph)#3284
AdaAibaby wants to merge 1 commit into
e2b-dev:mainfrom
AdaAibaby:fix/s3-response-checksum-validation-warn

Conversation

@AdaAibaby

Copy link
Copy Markdown
Contributor

Problem

When using an S3-compatible backend (MinIO, Ceph, etc.), the orchestrator logs a flood of WARN messages:

SDK WARN Response has no supported checksum. Not validating response payload.

This fires on every GetObject response because MinIO does not return x-amz-checksum-* response headers, and AWS SDK Go v2 defaults to ResponseChecksumValidationWhenSupported — logging a WARN whenever it cannot find a checksum to validate.

Root Cause

newAWSStorage in packages/shared/pkg/storage/storage_aws.go creates the S3 client without setting ResponseChecksumValidation. The SDK default (WhenSupported) attempts checksum validation on every response and emits a WARN when no checksum header is present.

Fix

Set o.ResponseChecksumValidation = aws.ResponseChecksumValidationWhenRequired in the s3.NewFromConfig options func. This tells the SDK to only validate checksums when the caller explicitly requests one — which is the correct contract for S3-compatible backends that don't implement the checksum extension.

This does not weaken integrity guarantees for callers that do pass WithChecksum options; it only stops the SDK from logging warnings for responses where no checksum was requested.

Testing

  • Build: go build ./packages/shared/pkg/storage/
  • The WARN log no longer appears when running against a MinIO backend.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request configures the AWS S3 client to only validate response checksums when explicitly required, aiming to prevent warning logs when using S3-compatible backends like MinIO or Ceph. The reviewer noted that applying this setting unconditionally weakens data integrity guarantees for standard AWS S3 clients. They suggested conditionally applying this configuration only when targeting S3-compatible backends, such as when S3_USE_PATH_STYLE is enabled.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/shared/pkg/storage/storage_aws.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8ebd7c9ae8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/shared/pkg/storage/storage_aws.go Outdated
AWS SDK Go v2 logs a WARN on every GetObject response when the server
does not return x-amz-checksum-* headers, which MinIO and other
S3-compatible backends do not include by default.

Setting ResponseChecksumValidation to WhenRequired tells the SDK to
only validate payload checksums when the caller explicitly requests
one, eliminating the noise without compromising integrity guarantees
for callers that do use checksums.
@AdaAibaby AdaAibaby force-pushed the fix/s3-response-checksum-validation-warn branch from 8ebd7c9 to 2a7545b Compare July 14, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants