Repository navigation
Conversation
👷 Deploy request for thriving-cassata-78ae72 pending review.Visit the deploys page to approve it
|
Contributor
[Low impact] The PR appears safe to merge. SummaryMoves preaggregation metadata reads from the shared template to each test’s private database.
Reviews (1) · Last reviewed commit: "Fix shared preaggregation template reade..." · Reviewed by Greptile |
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.
Parallel server tests can fail during fixture setup with
psycopg.errors.AdminShutdownwhen one worker reads preaggregation IDs from the sharedtemplate_preaggsdatabase while another worker clones it. The clone helper terminates connections to its source template, so the disconnected reader causes subsequent tests on that worker to fail setup.Yield only the template name and load ordered preaggregation objects through each test's existing private-clone session. This preserves per-test isolation and the
preagg1throughpreagg10ordering without opening metadata readers on the shared template. Add a deterministic real-Postgres regression that interleaves cloning before any shared-template read.Validation (Python 3.13):
AdminShutdownerror.pytest -q tests/api/preaggregations_test.py --tb=short: 91 passed with locally managed Postgres.pytest -n 3 --dist=loadscope -q tests/api/preaggregations_test.py --tb=short: 91 passed usingDJ_TEST_POSTGRES_URLand all three templates prebuilt as in CI.pre-commit run --files datajunction-server/tests/api/preaggregations_test.py: all applicable checks passed, including Ruff, formatting and mypy.This changes only test fixtures and their regression coverage. It is independent of the compiler changes in #2755, whose CI exposed the race. The full server suite and the Python 3.12 CI matrix were not rerun locally.