Skip to content

Cross extension-update-test/pg-upgrade-test with TEST_SCHEMA - #32

Draft
jnasbyupgrade wants to merge 1 commit into
phase4-pg-upgradefrom
phase5-cross-schema
Draft

Cross extension-update-test/pg-upgrade-test with TEST_SCHEMA#32
jnasbyupgrade wants to merge 1 commit into
phase4-pg-upgradefrom
phase5-cross-schema

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Stacked on #31 (phase 4: real pg_upgrade support). This is the novel enhancement the whole redesign was building toward.

Why this is novel

Checked directly: nobody in the org currently tests update/upgrade crossed with schema scenarios. `cat_tools`' own `extension-update-test`/`pg-upgrade-test` matrices are PG-version-only (no schema axis at all - checked its actual `ci.yml`). `extension_tools` has no U&U testing whatsoever. So this is genuinely new coverage, not something to copy from a reference implementation.

What changed

  • `extension-update-test`: added `schema: ["", Quoted]` to the matrix + a `TEST_SCHEMA` env var - the job's own `make verify-results TEST_LOAD_SOURCE=update` picks it up automatically (Make auto-imports matching-named environment variables).
  • `pg-upgrade-test`: added the same schema axis. `old_pg`/`new_pg` were already plain matrix dimensions (not an `include:` list), so adding a third axis cross-products cleanly into 4 legs (2 old_pg values × 2 schema values). Threaded `matrix.schema` through to `bin/test_existing`'s `prepare-old`/`run-suite` calls, previously hardcoded to `""`.

Why this is "free": phase 2's schema-invariant assertion descriptions mean crossing either job with `TEST_SCHEMA` needs zero new expected-output files - every leg of every job (fresh, update, real pg_upgrade) × (no schema, Quoted schema) passes against the exact same `test/expected/extension_tests.out` (+ the one genuine alternate from phase 2).

Verification

Locally against PG17: `prepare-old` → `update` → `run-suite` passes end to end with `TEST_SCHEMA=Quoted` (previously only verified with an untargeted schema in phase 4).

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 41ec0a8c-c695-4380-9909-cad25235e13b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@jnasbyupgrade jnasbyupgrade changed the title Phase 5: cross extension-update-test/pg-upgrade-test with TEST_SCHEMA Cross extension-update-test/pg-upgrade-test with TEST_SCHEMA Aug 4, 2026
@jnasbyupgrade
jnasbyupgrade marked this pull request as draft August 4, 2026 21:11
…/shell loops, not a matrix

Redesign of the original approach (which crossed TEST_SCHEMA into both
jobs' CI matrices) per the same reasoning as the `test` job's collapse: a
schema name is just an input the same assertions run against, not a real
environment difference.

- extension-update-test: added `make test-update-schema-all` (Makefile),
  the same TEST_SCHEMA loop as test-schema-all but with
  TEST_LOAD_SOURCE=update. Job step calls it instead of crossing schema
  into the matrix.
- pg-upgrade-test: no make-level loop is possible here (bin/test_existing's
  steps are shell, not `make test`), so instead prepares TWO databases -
  count_nulls_upgrade_none and count_nulls_upgrade_quoted, one per TEST_SCHEMA
  value - before the SINGLE pg_upgrade call, which migrates the whole
  cluster (every database in it) in one pass. This is strictly better than
  a doubled matrix would have been: it also halves the number of actual
  pg_upgrade binary invocations (the single most expensive operation in
  this job), not just container/checkout overhead.

Verified locally against PG17: prepare-old -> update -> run-suite passes
for both databases in the same cluster/session (no real pg_upgrade run,
same reasoning as prior phases - this container's clusters are persistent
shared infra); make test-update-schema-all passes both TEST_SCHEMA legs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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