Skip to content

fix: suppress automatic CRC32 checksum headers to restore compatibility with S3-compatible backends#214

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-halo-s3-storage-error
Draft

fix: suppress automatic CRC32 checksum headers to restore compatibility with S3-compatible backends#214
Copilot wants to merge 2 commits intomainfrom
copilot/fix-halo-s3-storage-error

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 10, 2026

AWS SDK for Java v2 (≥2.21) defaults to WHEN_SUPPORTED checksum mode, which injects x-amz-checksum-crc32 headers into multipart upload requests. S3-compatible services that don't implement the flexible checksums spec (RustFS, and others) reject these with HTTP 400 — even though credentials and config are otherwise valid.

Change

  • S3OsAttachmentHandler.buildS3Client — set requestChecksumCalculation(RequestChecksumCalculation.WHEN_REQUIRED) on the S3Client builder, so checksum headers are only sent when an operation explicitly demands them.
S3Client.builder()
    ...
    .requestChecksumCalculation(RequestChecksumCalculation.WHEN_REQUIRED)
    .build();

S3Presigner does not expose this option and is unaffected (it only generates signed URLs, not upload payloads).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.aliyun.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en (dns block)
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Apr 10, 2026

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 10, 2026
Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Apr 10, 2026
…patible services like RustFS

Agent-Logs-Url: https://github.com/halo-dev/plugin-s3/sessions/fa39122f-b2d1-4a39-9cee-8a66d92b945e

Co-authored-by: ruibaby <21301288+ruibaby@users.noreply.github.com>
@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Apr 10, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from ruibaby. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI changed the title [WIP] Fix HALO S3 storage error after RUSTFS upgrade fix: suppress automatic CRC32 checksum headers to restore compatibility with S3-compatible backends Apr 10, 2026
Copilot AI requested a review from ruibaby April 10, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RUSTFS做为后端存储报错

2 participants