Skip to content

ci: DRY the supported-PostgreSQL-major list to a single source#48

Merged
jnasbyupgrade merged 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:ci-pg-version-dry
Jul 22, 2026
Merged

ci: DRY the supported-PostgreSQL-major list to a single source#48
jnasbyupgrade merged 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:ci-pg-version-dry

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The supported PostgreSQL-major list was embedded in three places in ci.yml -- the test job matrix (12..18), the extension-update-test matrix (10 + 12..18) and the pg-upgrade-stepwise climb loop (11..18) -- so adding a future major meant editing all three. This centralizes it to ONE source: the changes job now derives all three lists from a single set of constants (NEWEST, CURRENT_FLOOR, LEGACY_FLOOR) and emits them as job outputs. The test and extension-update-test matrices consume them via matrix: pg: ${{ fromJSON(needs.changes.outputs.<...>) }}, and the stepwise loop iterates the derived climb list passed through env:. Adding the newest major is now a one-line NEWEST bump; the legacy PG10 floor is defined once (LEGACY_FLOOR) and reused by both the update matrix and the stepwise loop start.

Pure refactor: the three consumers resolve to the same major sets as before (test=12..18, extension-update=10+12..18, stepwise climb=11..18). No new job is added -- the derivation rides on the existing changes job, which every heavy job already needs -- so all-checks-passed's self-check (asserting every defined job is in its needs) still passes unchanged, and the docs-only gate still composes (changes always runs and emits the lists; heavy jobs stay gated on needs.changes.outputs.docs_only != 'true').

@coderabbitai

coderabbitai Bot commented Jul 22, 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: 5665bd94-304b-4bd7-89a9-a39c959d7fb4

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@jnasbyupgrade jnasbyupgrade reopened this Jul 22, 2026
@jnasbyupgrade
jnasbyupgrade force-pushed the ci-pg-version-dry branch 3 times, most recently from 6d7ea48 to 2f9b090 Compare July 22, 2026 23:11
The supported PostgreSQL-major list was embedded in three places in
ci.yml -- the test job matrix (12..18), the extension-update-test matrix
(10 + 12..18) and the pg-upgrade-stepwise climb loop (11..18) -- so adding
a future major meant editing all three. Centralize it: the changes job now
derives all three lists from a single set of constants (NEWEST,
CURRENT_FLOOR, LEGACY_FLOOR) and emits them as job outputs; the test and
extension-update-test matrices consume them via fromJSON, and the stepwise
loop iterates the derived climb list passed through env. Adding the newest
major is now a one-line NEWEST bump.

Pure refactor: the three consumers resolve to the same major sets as before
(test=12..18, extension-update=10+12..18, stepwise climb=11..18). No new job
is added, so all-checks-passed needs is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jnasbyupgrade
jnasbyupgrade merged commit 05e96a5 into Postgres-Extensions:master Jul 22, 2026
25 checks passed
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