Skip to content

[python] Fix the failing native REST snapshot tests - #10626

Closed
sundapeng wants to merge 1 commit into
apache:masterfrom
sundapeng:python-native-snapshot-error-no-retry
Closed

sundapeng wants to merge 1 commit into
apache:masterfrom
sundapeng:python-native-snapshot-error-no-retry

Conversation

@sundapeng

@sundapeng sundapeng commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Purpose

apache/paimon-rust#1141 makes the Rust REST client retry GET requests on HTTP 429 and 503, as Java does. Native CI builds pypaimon-rust from paimon-rust main, so since then four tests fail on master and on every PR:

FAILED pypaimon/tests/native_hybrid_search_test.py::test_one_authoritative_rest_snapshot_for_all_routes_without_retry[error] - AssertionError: assert 6 == 1
FAILED pypaimon/tests/native_read_snapshot_test.py::test_rest_snapshot_response_is_authoritative_without_search_retry[error-vector] - AssertionError: assert 6 == 1
FAILED pypaimon/tests/native_read_snapshot_test.py::test_rest_snapshot_response_is_authoritative_without_search_retry[error-batch] - AssertionError: assert 6 == 1
FAILED pypaimon/tests/native_read_snapshot_test.py::test_rest_snapshot_response_is_authoritative_without_search_retry[error-text] - AssertionError: assert 6 == 1

They answer the snapshot request with 503 and expect one call, to check that search does not retry on its own. This PR answers with the non-retryable 500 instead, which keeps that check and leaves HTTP retries out of it.

Tests

With pypaimon-rust built from paimon-rust main (53dfa2cb5e) and the Native CI flags, native_hybrid_search_test.py and native_read_snapshot_test.py fail these four tests before the fix and pass all 87 with it.

In CI, Native CI passes; Python / Tests still fails on master's Plan.stats fallback, which #10620 fixes.

apache/paimon-rust#1141 made the Rust REST client retry GET requests on
HTTP 429 and 503, as Java does. Native CI builds pypaimon-rust from
paimon-rust main, so four tests that answer the snapshot request with 503
and expect a single call now see six and fail on master.

They check that search does not retry on its own, not HTTP retries, so
answer with the non-retryable 500 instead.
@sundapeng

Copy link
Copy Markdown
Member Author

This fix is now part of #10620, which also fixes Python / Tests, so one PR can go fully green. This PR stays a draft until #10620 merges and will then be closed.

@sundapeng

Copy link
Copy Markdown
Member Author

#10624 made the same change on master, so closing this.

@sundapeng sundapeng closed this Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant