Skip to content

Commit 98b45b2

Browse files
ysyneuclaude
andauthored
fix(ci): disable aws-chunked encoding for OSS uploads (#43)
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>
1 parent e6fb244 commit 98b45b2

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/goreleaser.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ jobs:
6565
# AWS CLI defaults to path-style for custom endpoints, so force
6666
# virtual-hosted style. Harmless for endpoints that accept either.
6767
aws configure set default.s3.addressing_style virtual
68+
# AWS CLI v2.23+ enabled default integrity protections that add
69+
# `aws-chunked` request encoding, which OSS rejects with
70+
# InvalidArgument. Restore the pre-2.23 behavior.
71+
aws configure set default.request_checksum_calculation when_required
72+
aws configure set default.response_checksum_validation when_required
6873
6974
# Normalize PREFIX: strip both leading and trailing slashes so a
7075
# value of "/" or "/foo/" doesn't produce a doubled or leading slash

.github/workflows/install-sh.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ jobs:
133133
fi
134134
# Aliyun OSS rejects path-style requests; force virtual-hosted style.
135135
aws configure set default.s3.addressing_style virtual
136+
# AWS CLI v2.23+ default integrity protections add `aws-chunked`
137+
# encoding which OSS rejects (InvalidArgument). Restore old behavior.
138+
aws configure set default.request_checksum_calculation when_required
139+
aws configure set default.response_checksum_validation when_required
136140
PREFIX="${PREFIX#/}"; PREFIX="${PREFIX%/}"
137141
key="${PREFIX:+${PREFIX}/}install.sh"
138142
aws --endpoint-url="$ENDPOINT" s3 cp install.sh "s3://${BUCKET}/${key}" \

0 commit comments

Comments
 (0)