TEST_LOAD_SOURCE (fresh/update/existing) in test/install - #29
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
0eafd8a to
fa41763
Compare
|
test-permission-check |
d87dac1 to
f7cf0fa
Compare
f7cf0fa to
a1f29ee
Compare
a1f29ee to
5020348
Compare
616bb7b to
e127ab1
Compare
e127ab1 to
6c604db
Compare
6c604db to
fc2bff2
Compare
fc2bff2 to
04b8239
Compare
04b8239 to
9132027
Compare
e9dd270 to
6d6d1f6
Compare
test/install/load.sql now selects fresh/update/existing via the
count_nulls.test_load_mode GUC (TEST_LOAD_SOURCE make var), matching
pgxntool/README.asc's documented U&U pattern:
- fresh: CREATE EXTENSION count_nulls (unchanged from phase 1/2).
- update: CREATE EXTENSION VERSION '0.9.6', then ALTER EXTENSION UPDATE -
committed, since test/install runs outside any per-test rolled-back
transaction.
- existing: asserts count_nulls is already installed and current,
touches nothing - for a real pg_upgrade run external to this
invocation (a later phase adds the CI job that drives this).
Added the extension-update-test CI job: just `make verify-results
TEST_LOAD_SOURCE=update`, no external script needed - unlike a real
pg_upgrade, an in-place update is pure SQL, so test/install handles the
whole fresh-vs-updated comparison within one pg_regress invocation.
Verified locally against PG17: fresh, update, and existing modes all pass
via make verify-results, including update x TEST_SCHEMA=Quoted crossed
together - zero expected-output changes needed for any combination,
confirming phase 2's schema-invariant design holds across load modes too
(load-bearing for a later phase that crosses U&U with schema in CI).
existing mode verified manually against a real out-of-band CREATE
EXTENSION + --use-existing run.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Each extension-update-test leg duplicated the fresh-install test job's own per-PG-version container/checkout setup just to additionally run the update-mode check - a load mode is just an input the same assertions run against, not a real environment difference (same reasoning TEST_SCHEMA already collapsed out of the CI matrix on). Relocate its two steps into the test job instead of giving them their own dedicated job and matrix.
6d6d1f6 to
ab4c9f3
Compare
\gset binds every column of a query's result row at once, so the raw GUC read and the two derived-boolean SELECTs can be one three-column query instead of three separate SELECT/\gset pairs. The DO block's validation still runs immediately after, unchanged in position and logic.
|
Claude finished @jnasbyupgrade's task in 3m 7s —— View job Claude's Review of PR #29
Note: this PR is already merged, so this is a retrospective review for the record / any follow-up cleanup. SummaryThis implements the "load-mode" (fresh/update/existing) axis exactly as documented in
Overall this is solid, well-documented work. A few minor, non-blocking observations:
None of these are blocking — they're small polish items for a later pass if the author wants them. The core design (mode selection via |
Stacked on #28 (phase 2: schema switching). Adds the update+upgrade (U&U) load-mode axis test/install was always meant to carry, per pgxntool/README.asc's documented pattern.
What changed
Deliberately does NOT add a dependency guard yet (the "prove a non-CASCADE drop is blocked" mechanism) - that only earns its keep protecting against an EXTERNAL step corrupting state test/install can't see into (a real `pg_upgrade`), which doesn't exist until the next phase. Adding it here would also immediately conflict with the main suite's own `test__shutdown__drop_all`. Also not crossing this new job with `TEST_SCHEMA` yet - that's its own phase, once the real pg_upgrade job exists too so both can cross schema together.
Verification
Locally against PG17: fresh, update, and existing modes all pass via `make verify-results` - zero expected-output changes needed for any combination, including `update` × `TEST_SCHEMA=Quoted` crossed together, confirming phase 2's schema-invariant design holds across load modes too (load-bearing for the later phase that crosses U&U with schema in CI). `existing` mode verified manually against a real out-of-band `CREATE EXTENSION` + `--use-existing` run.