Skip to content

fix(pyamber, v1.3): isolate REST catalog S3 signers - #9136

Merged
mengw15 merged 1 commit into
release/v1.3from
backport/9129-isolate-rest-catalog-s3-signers-v1.3
Oct 29, 2026
Merged

mengw15 merged 1 commit into
release/v1.3from
backport/9129-isolate-rest-catalog-s3-signers-v1.3

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Automated backport of #9129 to release/v1.3.

Source: 3b8e43e · automation run

Any related issues, documentation, discussions?

Backport of #9129. Originally linked #9128.

How was this PR tested?

Release-branch CI runs on this branch once the build is fixed and this PR is marked ready for review.

Was this PR authored or co-authored using generative AI tooling?

No.

### What changes were proposed in this PR?

Disable fsspec's global S3 instance cache when creating a REST catalog.
PyIceberg already caches each filesystem per FileIO thread. Sharing
another cached filesystem lets a second table temporarily remove the
first table's request signer, causing `403 AccessDenied` during
materialization reads.

Before: signer replacement can interrupt an existing read.
After: FileIO instances have separate signers and retain their own
filesystem caches.

This is a workaround for apache/iceberg-python#3896. It disables the
global S3 instance cache for the Python process, including other fsspec
S3 users. Local-filesystem caching is unchanged. It does not change
credentials or retry failed reads.

### Any related issues, documentation, discussions?

Closes #9128

Related to the failing loop integration check on #8957. Its timestamp
change stays separate.

### How was this PR tested?

Fresh detached worktree from upstream main at `98c63374b7`, Python 3.12
on Windows.

The new regression first failed in two cache configurations. After the
fix, all 71 focused storage tests pass, with the separately marked REST
integration test excluded. The regression uses real FileIO and S3
filesystem instances, verifies distinct signers between FileIO
instances, and verifies that per-thread and local-filesystem caches
remain intact.

```text
bash bin/python-proto-gen.sh
cd amber
python -m pytest src/test/python/core/storage/iceberg -m "not integration" -q --tb=short -p no:cacheprovider
python -m ruff check src/main/python src/test/python
python -m ruff format --check src/main/python src/test/python
```

Live verification used an isolated RustFS rc.6 and Lakekeeper 0.11.0
stack. A real Parquet read succeeds before signer replacement, fails
during a controlled replacement gap, and succeeds after registration
resumes. With the fix, 40 concurrent real S3 reads pass. Both Ruff
checks pass for all 217 Python files.

The full engine loop suite also passes with this worktree's freshly
built JVM classes and Python workers against that REST-backed stack: 8
passed, 0 failed, 0 canceled. This checks materialized row counts for
single and nested loops, JVM operators, loop-variable references,
reconverging branches, and state-emitting UDFs. No test assertions or
timeouts were changed.

From the repository root, with the private stack's storage environment
configured:

```text
sbt -batch "WorkflowExecutionService/testOnly *LoopIntegrationSpec -- -oDF"
sbt -batch scalafmtCheckAll
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Codex

(backported from commit 3b8e43e)

Co-authored-by: Xuan Gu <162244362+xuang7@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

The cherry-pick applied cleanly but the backported tree failed its pre-merge build. Fix the build on this branch, then mark this PR ready for review.

@github-actions
github-actions Bot requested a review from mengw15 October 25, 2026 22:02
@mengw15 mengw15 closed this Oct 29, 2026
@mengw15 mengw15 reopened this Oct 29, 2026
@mengw15 mengw15 closed this Oct 29, 2026
@mengw15 mengw15 reopened this Oct 29, 2026
@mengw15
mengw15 marked this pull request as ready for review October 29, 2026 05:19
@mengw15
mengw15 enabled auto-merge October 29, 2026 05:20
@github-actions

Copy link
Copy Markdown
Contributor Author

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@mengw15
mengw15 added this pull request to the merge queue Oct 29, 2026
Merged via the queue into release/v1.3 with commit 7034c52 Oct 29, 2026
32 of 38 checks passed
@mengw15
mengw15 deleted the backport/9129-isolate-rest-catalog-s3-signers-v1.3 branch October 29, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants