Repository navigation
Test manifest cache size without reloading pyiceberg.manifest - #4517
Merged
Fokko merged 1 commit intoNov 29, 2026
Merged
Conversation
The cache size tests reloaded pyiceberg.manifest to pick up a new configuration. A reload replaces the module's classes, so test modules that imported them earlier, such as tests/table/test_validate.py, fail when they run afterwards. Build a _ManifestCache directly and patch it in with monkeypatch instead; the size is read when the cache is created. Generated-by: Claude Code
Fokko
approved these changes
Nov 29, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Sounds reasonable, thanks @moomindani for fixing this
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.
Rationale for this change
The manifest cache size tests in
tests/utils/test_manifest.pycallimportlib.reload(pyiceberg.manifest)to pick up a newmanifest-cache-size. A reload replaces the module's classes, so test modules that imported them earlier fail when they run afterwards. Runningtests/utils/test_manifest.pyand thentests/table/test_validate.pyfails seven tests onmain. CI doesn't hit it only becausetests/tableruns first.The size is read when
_ManifestCacheis created, so the tests now build one directly and patch it in withmonkeypatch, which also restores it.Are these changes tested?
Yes, this is a test-only change. The nine cache tests pass, and running
test_manifest.pybeforetest_validate.pynow passes (77 tests). If_ManifestCacheignores the configured size, the five size tests fail.Are there any user-facing changes?
No.
This pull request and its description were written by Claude Code.