Skip to content

fix(ci): disable aws-chunked encoding for OSS uploads#43

Merged
ysyneu merged 1 commit intomainfrom
fix/oss-disable-checksum-trailer
May 8, 2026
Merged

fix(ci): disable aws-chunked encoding for OSS uploads#43
ysyneu merged 1 commit intomainfrom
fix/oss-disable-checksum-trailer

Conversation

@ysyneu
Copy link
Copy Markdown
Collaborator

@ysyneu ysyneu commented May 8, 2026

Problem

After #42 fixed virtual-hosted addressing, the next mirror run failed with:

upload failed: ./install.sh to s3://***/***/install.sh
An error occurred (InvalidArgument) when calling the PutObject operation:
aws-chunked encoding is not supported with the specified x-amz-content-sha256 value.

AWS CLI v2.23 enabled default integrity protections that wrap PUT bodies in aws-chunked transfer encoding with a CRC32 trailer. Aliyun OSS S3-compat doesn't accept that encoding.

Fix

Set request_checksum_calculation and response_checksum_validation to when_required so the CLI only adds trailer checksums when an operation requires them. PUT object reverts to plain sigv4-signed bodies that OSS accepts.

Object integrity is unaffected — install.sh still verifies SHA256 against checksums.txt after download.

Test plan

  • Merge → mirror install.sh succeeds; curl https://flashduty-public.oss-cn-beijing.aliyuncs.com/flashduty-runner/install.sh returns 200 with matching sha256.

🤖 Generated with Claude Code

AWS CLI v2.23 enabled default integrity protections that wrap PUT bodies
in aws-chunked encoding with a CRC32 trailer. Aliyun OSS rejects this
(InvalidArgument: aws-chunked encoding is not supported with the
specified x-amz-content-sha256 value).

Set request_checksum_calculation / response_checksum_validation to
when_required so the CLI only applies trailer-based checksums when an
operation explicitly demands them. PUT object falls back to plain
sigv4-signed bodies. Object integrity is still anchored elsewhere
(SHA256 in checksums.txt verified by install.sh).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ysyneu ysyneu merged commit 98b45b2 into main May 8, 2026
13 checks passed
@ysyneu ysyneu deleted the fix/oss-disable-checksum-trailer branch May 8, 2026 07:31
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