Skip to content

[4.2-dev] fix: preserve SQL S3 environment region fallback - #32877

Merged
mergify[bot] merged 1 commit into
matrixorigin:4.2-devfrom
Ariznawlll:codex/issue-32876-s3-region-42
Nov 18, 2026
Merged

mergify[bot] merged 1 commit into
matrixorigin:4.2-devfrom
Ariznawlll:codex/issue-32876-s3-region-42

Conversation

@Ariznawlll

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • BUG
  • Test and CI

Which issue(s) this PR fixes:

Fixes #32876

What this PR does / why we need it:

Backports the region fallback from main PR #30533 to 4.2-dev. A dynamic SQL S3 request without an explicit region resolves AWS_REGION first and then AWS_DEFAULT_REGION; an explicit region always wins. This reads only region configuration and does not enable ambient credential discovery.

The 4.2 stability data preparation run failed to load ten TPCC tables with an S3 HeadObject invalid-region error. The loader omitted a region. A controlled end-to-end reproduction in that environment is still needed before confirming the original incident's complete cause.

Validation

  • On the unpatched 4.2-dev base 72c43e9305d8355c940075e414f30eaf2e4112a6, the two backported tests failed, including the same invalid-region error from a simulated S3 transport.
  • After the patch, the focused fallback and caller-credential tests passed three runs and three race runs; the SQL file-access test group passed three runs.
  • Real cloud S3, public SQL end-to-end, the original ten-table stability import, and the complete fileservice suite remain unverified. Some fileservice tests use shared /tmp socket paths, so the complete suite was not run on the shared host.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify mergify Bot added kind/bug Something isn't working kind/test-ci labels Nov 18, 2026
@mergify

mergify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Queue requested — the merge queue status continues in this comment ↓.

@XuPeng-SH

XuPeng-SH commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 272ba5c12fb309f26a219383af1a9ba0eb419438

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH 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.

mo-bot review · mo-bot-local · review

Commit: 272ba5c12fb309f26a219383af1a9ba0eb419438

Assessment: approve

The backport restores region fallback in the existing caller-only AWS configuration. An explicit region takes precedence. If the region is still unset after bucket discovery, the client checks AWS_REGION and then AWS_DEFAULT_REGION. The fallback preserves caller credential isolation.

Model: gpt-6.2-sol / xhigh

Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0

Validation:

  • Isolation preflight, frozen source verification, git diff --check, and native artifact checks passed. Receipts 1794974291759524688-3.json and 1794974359374724254-2.json.

  • Both new tests failed with the merge-base implementation, reproducing the empty-region HeadObject error. Both passed on the candidate alongside credential isolation, role refresh, cancellation, and admission controls. Receipts 1794974601801657339-2.json and 1794974557398608313-2.json.

  • Public SQL LOAD DATA against a loopback S3 fixture passed all three region cases and verified caller-signed HEAD and GET requests. Missing credentials were rejected before a request, and a denied import left the existing rows intact. Receipt 1794974701960817023-2.json and sql-s3-probe.jsonl.

  • The frozen CI snapshot shows the latest required result succeeded, along with build, unit, coverage, PROXY, and PESSIMISTIC checks.

Limitations:

  • The full local fileservice suite exceeded its time budget during a local disk-cache fsync. Receipt 1794974718967129293-2.json and fileservice-package.jsonl.

  • Real-cloud S3 and the original ten-table stability import remain unverified. The upstream main PR diff was outside the frozen evidence.

@mergify mergify Bot added the queued label Nov 18, 2026
@mergify
mergify Bot merged commit 1920dc5 into matrixorigin:4.2-dev Nov 18, 2026
@mergify

mergify Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

✅ Merged into 4.2-dev as 1920dc5 at 04:07 UTC

Less than a minute in the queue, with no time running CI.

So far

  • ✅ Entered the queue Wed 18 Nov, 04:07 · rule release-4.2 · triggered by rule Automatic queue on approval for release-4.2
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged 04:07 · 1920dc5 · squash
3 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = CI Required
    • check-neutral = CI Required
    • check-skipped = CI Required

Times in UTC · dashboard · how the merge queue works

This branch was previously deployed

1 inactive deployment
ci — 272ba5c1 Deployed Nov 18, 2026 by Ariznawlll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants