Repository navigation
fix(pyamber, v1.3): isolate REST catalog S3 signers - #9136
Draft
github-actions[bot] wants to merge 1 commit into
Draft
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
### 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>
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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.