Skip to content

objstore: test accept-encoding-only GCS signing#69759

Closed
joechenrh wants to merge 7 commits into
pingcap:masterfrom
joechenrh:fix-gcs-accept-encoding-only
Closed

objstore: test accept-encoding-only GCS signing#69759
joechenrh wants to merge 7 commits into
pingcap:masterfrom
joechenrh:fix-gcs-accept-encoding-only

Conversation

@joechenrh

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #69718

Problem Summary:

This is a draft E2E validation PR for the GCS S3-compatible import issue. The main proposed fix is #69721.

The specific question for this branch is whether excluding only Accept-Encoding from the SigV4 canonical request is enough for GCS S3 interoperability, while leaving the AWS SDK v2 metadata headers (Amz-Sdk-Invocation-Id and Amz-Sdk-Request) signed.

What changed and how does it work?

This PR keeps the GCS S3-compatible signer but changes it to remove only Accept-Encoding while signing.

It also adds draft-only HTTP fault injection for the GCS S3-compatible path so a real cluster E2E import can exercise AWS SDK retry behavior. The default behavior on this branch is:

  • enabled only for GCS S3-compatible stores
  • TIDB_GCS_S3_COMPAT_FAULT_RATE: default 0.02; set to 0 to disable
  • TIDB_GCS_S3_COMPAT_FAULT_MODE: default mixed; allowed values are http500, connection-reset, and mixed
  • TIDB_GCS_S3_COMPAT_FAULT_MAX: optional max number of injected faults per process

This PR is not intended to be the final mergeable fix as-is. It is intended to produce an image for online E2E validation.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Commands run locally:

make bazel_prepare
./tools/check/failpoint-go-test.sh pkg/objstore/s3store -run 'TestIsGCSS3Compatible|TestGCSS3CompatibleSignerSkipsAcceptEncodingWithRetry|TestGCSS3CompatibleFaultInjectionRetries' -count=1 -v
./tools/check/failpoint-go-test.sh pkg/objstore/s3store -run 'TestGCSS3CompatibleSignerSkipsAcceptEncodingWithRetry|TestGCSS3CompatibleFaultInjectionRetries' -race -count=1 -v
bazel test //pkg/objstore/s3store:s3store_test --test_sharding_strategy=disabled --test_arg=-test.run=TestIsGCSS3Compatible\|TestGCSS3CompatibleSignerSkipsAcceptEncodingWithRetry\|TestGCSS3CompatibleFaultInjectionRetries --test_output=streamed

Also attempted a failpoint-enabled Bazel run. The local Bazel build failed before tests with pkg/util/intest/assert_common.go:93:34: undefined: _curpkg_; failpoint state was disabled afterward.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot

ti-chi-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. labels Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7e933db1-7141-47d1-933e-aeceb800e090

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot

ti-chi-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

[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 assign yujuncen for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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

@ti-chi-bot ti-chi-bot Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 10, 2026
@joechenrh joechenrh closed this Jul 14, 2026
@joechenrh
joechenrh deleted the fix-gcs-accept-encoding-only branch July 14, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant