Skip to content

CI: docs-only gate, all-checks-passed, single-source PG list - #30

Merged
jnasbyupgrade merged 2 commits into
masterfrom
phase3.5-ci-hygiene
Aug 6, 2026
Merged

CI: docs-only gate, all-checks-passed, single-source PG list#30
jnasbyupgrade merged 2 commits into
masterfrom
phase3.5-ci-hygiene

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Stacked on #29 (phase 3: load-mode switching). General CI infrastructure, independent of U&U testing itself - split out as its own step rather than folded into whichever phase happened to add a new job, per the "one step at a time" approach for this whole series. Landing it here (before the next phase adds the most expensive job, a real pg_upgrade matrix) is when the docs-only skip starts actually paying for itself.

What changed

  • changes job: computes the real per-push diff (handles both branch pushes and PR synchronize events, fails safe to "not docs-only" on any ambiguity) and exposes docs_only; test (which covers both the fresh-install matrix and, in the same job, the in-place update path - there's no separate extension-update-test job) and pg-tle-test both gate on it. Always triggers itself unconditionally (no workflow-level paths-ignore, which would leave a required all-checks-passed check stuck Pending on doc-only pushes).
  • Same job derives the supported-PostgreSQL-major list from a single NEWEST/FLOOR pair, consumed by both test and pg-tle-test via fromJSON - they read the same list and can't silently drift apart; a new major is now a one-line change instead of an edit in both matrices.
  • all-checks-passed: one stable required-status-check name (matrix jobs produce names like "🐘 PostgreSQL 14 (schema none)" that change with the matrix), with a self-check that its own needs list can't silently omit a newly-added job.

No functional test changes - CI-only.

@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: fe4ebaf2-661f-4d91-b27f-10bf460c1be2

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.

@jnasbyupgrade jnasbyupgrade changed the title Phase 3.5: CI hygiene - docs-only gate, all-checks-passed, single-source PG list CI hygiene: docs-only gate, all-checks-passed, single-source PG list Aug 4, 2026
@jnasbyupgrade
jnasbyupgrade marked this pull request as draft August 4, 2026 21:11
@jnasbyupgrade
jnasbyupgrade force-pushed the phase3.5-ci-hygiene branch 2 times, most recently from 6a9f1ec to 6932d1e Compare August 5, 2026 19:40
@jnasbyupgrade jnasbyupgrade changed the title CI hygiene: docs-only gate, all-checks-passed, single-source PG list CI: docs-only gate, all-checks-passed, single-source PG list Aug 5, 2026
@jnasbyupgrade
jnasbyupgrade force-pushed the phase3.5-ci-hygiene branch 3 times, most recently from 844e840 to 602e042 Compare August 6, 2026 18:05
@jnasbyupgrade
jnasbyupgrade force-pushed the phase3.5-ci-hygiene branch 3 times, most recently from dccc188 to 5f7bc82 Compare August 6, 2026 19:16
@jnasbyupgrade
jnasbyupgrade marked this pull request as ready for review August 6, 2026 21:29
Base automatically changed from phase3-load-mode to master August 6, 2026 22:56
jnasbyupgrade and others added 2 commits August 6, 2026 17:56
…rce PG list

Independent of the U&U testing work itself, but best done now that
multiple CI jobs exist and before the next phase adds the most expensive
one (a real pg_upgrade job):

- `changes` job: computes the actual per-push diff and skips test/
  extension-update-test/pg-tle-test entirely on doc-only pushes, always
  triggering itself (no workflow-level paths-ignore, which would leave
  all-checks-passed stuck Pending on doc-only pushes in branch protection).
- Derives the supported-PostgreSQL-major list from ONE set of constants
  (NEWEST/FLOOR) in that same job, consumed by both the `test` and
  `extension-update-test` matrices via fromJSON - they can't silently drift
  onto different lists, and a new major is a one-line change.
- `all-checks-passed`: single stable required-status-check name, with a
  self-check that its own needs list can't silently omit a newly-added job.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The org-wide Actions runner queue backs up easily; a draft PR being
actively iterated on doesn't need the full PG matrix or the heavy
pg-tle-test job re-run on every push. Add a newest_pg scalar output
(single source alongside supported_pg) and reduce the test job's
matrix to just that value on a draft PR, while skipping pg-tle-test
(and any later heavy job following the same needs:[changes]/if:
docs_only pattern) outright. Non-draft PRs and push events (e.g.
post-merge on master) are unaffected.
@jnasbyupgrade

Copy link
Copy Markdown
Contributor Author

Closing/reopening to force a fresh CI dispatch - the current head commit never got a workflow run triggered at all (checked via the Actions API, not just slow queueing).

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude Code is working…

I'll analyze this and get back to you.

View job run

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 3m 33s —— View job


Claude's Review

  • Gather context (PR body, diff, changed files)
  • Read full .github/workflows/ci.yml and trace the new gating/matrix logic
  • Cross-check actual CI run for this commit
  • Post review feedback

Summary

This is a well-reasoned, heavily-commented CI change, and it's already been exercised end-to-end: run 31130839307 on the current head commit is green, including all-checks-passed and its self-check step that verifies its own needs: list stays in sync with the job list.

I traced through the trickier parts by hand and didn't find a correctness bug:

  • The changes job's BASE/HEAD selection (synchronize vs. opened/reopened vs. push) and its fail-safe-to-docs_only=false defaults look correct for every branch, including the all-zeros-SHA new-branch case and a failed git diff.
  • The pg: ${{ github.event.pull_request.draft && ... || ... }} matrix expression correctly falls through to the full supported_pg list for both non-draft PRs and plain push events (where github.event.pull_request is absent/null), and reduces to [newest_pg] only for a draft PR — verified against GitHub Actions' JS-like truthy &&/|| short-circuit semantics.
  • all-checks-passed's pass/fail check correctly treats skipped as OK and only fails on failure/cancelled.

Two minor, non-blocking observations:

  1. PR description vs. diff mismatch: the description says test/extension-update-test/pg-tle-test all gate on docs_only, but there's no extension-update-test job in this diff — the update-path assertions live inside test's own "Update 0.9.6 -> current and run the suite" step (.github/workflows/ci.yml:239-240), matching the job's own comment block. Likely just stale wording from planning; worth a quick tweak to the PR body so it doesn't confuse future readers of the merge commit message.
  2. Untested code paths: the run that just went green exercised the "non-draft PR, full base...head diff" path only. The docs_only=true skip path, the synchronize before/after diff path, and the draft-PR matrix reduction haven't been exercised by an actual workflow run yet. Since all-checks-passed is meant to become a required status check, it'd be worth deliberately triggering each of those once (e.g. a docs-only commit, and toggling draft) before leaning on it in branch protection — a subtle miss in any of those would otherwise show up as a stuck-Pending or incorrectly-passing required check rather than a loud failure.

No functional/application code changed (CI-only, as stated), so no test suite implications beyond the workflow itself.

@jnasbyupgrade
jnasbyupgrade merged commit 3c74100 into master Aug 6, 2026
40 of 41 checks passed
@jnasbyupgrade
jnasbyupgrade deleted the phase3.5-ci-hygiene branch August 6, 2026 23:52
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