Real pg_upgrade support via a reduced bin/test_existing - #31
Real pg_upgrade support via a reduced bin/test_existing#31jnasbyupgrade wants to merge 5 commits into
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 |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
8a6a467 to
d05ccf0
Compare
6c1d36f to
e64f80f
Compare
e64f80f to
fb1431a
Compare
a9c46c2 to
a791789
Compare
a791789 to
03c7af9
Compare
03c7af9 to
acba0ca
Compare
acba0ca to
bc3c24e
Compare
bc3c24e to
031abc6
Compare
031abc6 to
7cb2293
Compare
7cb2293 to
80d37b7
Compare
80d37b7 to
0f9ede2
Compare
0f9ede2 to
f38f82d
Compare
f38f82d to
74d6de1
Compare
3b33ad8 to
f37b039
Compare
f37b039 to
96d93f7
Compare
96d93f7 to
3c19783
Compare
Adds the pg-upgrade-test CI job: install 0.9.6 on an old PostgreSQL major, plant + prove a dependency guard, binary pg_upgrade to a newer major, ALTER EXTENSION UPDATE the migrated objects, then run the suite against the real upgraded database in existing mode. bin/test_existing is much smaller than the equivalent script would have been pre-test/install: only prepare-old and run-suite are genuinely external-to-pg_regress concerns (a real pg_upgrade binary run isn't something pg_regress can invoke itself), plus a small `update` subcommand for the post-upgrade ALTER EXTENSION UPDATE step. There's no update-scenario subcommand at all - that entire scenario is just `make test-update` now (test/install/load.sql's own 'update' mode, added in phase 3), since an in-place update has no external step to drive. run_suite() gates on plain `make test`, not the old belt-and-suspenders `make test && make verify-results` - pgxntool 2.3.0 (this repo's phase 0) already made `make test` itself exit non-zero on regression failures. Not yet crossed with TEST_SCHEMA - that's the next phase, once both this job and extension-update-test can cross it together. Verified locally against PG17 (prepare-old -> update -> run-suite, without a real pg_upgrade - this container's clusters are persistent shared infra, so the actual binary pg_upgrade leg is left for CI's ephemeral containers, same reasoning as the pg-tle-test work). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… not after Reorders prepare-old -> update -> pg_upgrade -> run-suite (was prepare-old -> pg_upgrade -> update -> run-suite). The old order proved pg_upgrade could migrate 0.9.6's frozen objects, then updated afterward - not actionable, since that version already shipped. This job's whole point is proving pg_upgrade correctly migrates the objects count_nulls' CURRENT code creates, which requires updating BEFORE the binary upgrade runs. make install (into the old cluster) already happens earlier in the job, so the current version's update scripts are on disk in time for the moved step. Updates the job's step names/comments and bin/test_existing's own file-header sequence description to match the new order.
Propagates the draft-PR gating from phase3.5-ci-hygiene to the pg-upgrade-test job introduced by this branch: same needs:[changes]/ if: docs_only pattern as pg-tle-test, so it gets the same && github.event.pull_request.draft != true guard.
old_pg=12 keeps updating to current before the binary pg_upgrade (proves pg_upgrade preserves CURRENT-code objects); old_pg=10 now updates after instead (proves pg_upgrade preserves objects still frozen at the oldest supported version at upgrade time - a real user scenario the update-before-only setup missed). Same 2-leg matrix, no added CI cost. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ed6d991 to
0a67678
Compare
|
Claude finished @jnasbyupgrade's task in 5m 47s —— View job Code review
Overall this is a well-reasoned, carefully-commented PR — the two-leg matrix design (updating on opposite sides of the binary One real issue, otherwise minor:
assert_version() {
local db=$1 expected=$2 installed
[ "$expected" = current ] && expected=$(current_version)
...Under This is exactly the failure mode this file's own author already flagged and avoided a few lines below, in It's currently dormant — if [ "$expected" = current ]; then expected=$(current_version); fiNothing else stood out: the |
…n databases The old_pg=10-vs-12 split wrongly conflated two independent axes (which PG floor is tested, and which update-order is tested). Both orderings are now compared on the SAME floor (old_pg=10, the oldest supported) using twin databases migrated by a single pg_upgrade call - the same trick this file already uses to cross TEST_SCHEMA without doubling matrix legs. old_pg=12 reverts to its original single-database, single-ordering design and is now just a second, unrelated old-PG-floor data point.
|
Claude finished @jnasbyupgrade's task in 2m 20s —— View job Code review
This push (
No bugs found in this diff. One item from the previous review remains open, since it's in a file this push didn't touch:
[ "$expected" = current ] && expected=$(current_version)Under if [ "$expected" = current ]; then expected=$(current_version); fi |
Stacked on #30 (phase 3.5: CI hygiene). Adds binary `pg_upgrade` coverage - the one U&U scenario that genuinely can't live inside a single `pg_regress` invocation, since `pg_upgrade` is an external binary process.
What changed
Not yet crossed with `TEST_SCHEMA` - that's the next phase, once both this job and `extension-update-test` can cross it together.
Verification
Locally against PG17: `prepare-old` → `update` → `run-suite` all pass end to end, without a real `pg_upgrade` (this container's PG12/PG17 clusters are persistent shared dev infra, not disposable, so - same reasoning as the earlier pg-tle-test work - the actual binary `pg_upgrade` leg is left for CI's ephemeral containers to exercise).