Skip to content

CI: skip the container jobs on docs-only diffs, not just pg-upgrade-test - #49

Draft
jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:ci-gate-test-docs-only
Draft

CI: skip the container jobs on docs-only diffs, not just pg-upgrade-test#49
jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:ci-gate-test-docs-only

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

A docs-only push ran 12 real PostgreSQL-container jobs. Only pg-upgrade-test was gated on changes.outputs.docs_only; the six-leg test matrix and the six-leg pg-tle-test matrix — the latter compiling pg_tle from source on every leg — were not, so between them they were the bulk of the waste the gate exists to avoid. Both are now gated on it too.

docs_only is true only when every changed path matches \.(md|asc)$, so no file that test or pg-tle-test builds, installs or exercises can appear in such a diff: not sql/, extension_drop.control, META.json, the Makefile, bin/, test/, pgxntool/ or .github/, and not a submodule bump either, since a gitlink is recorded on the submodule's own extensionless path. lint and release-safety stay ungated — both are cheap, and release-safety is precisely the job that must fire when HISTORY.asc changes.

pg-tle-test restates the condition rather than inheriting the skip from test. At job level success() evaluates false when a needed job merely skipped rather than failed, so a skipped test does cascade a skip today — but GitHub calls that a bug and has it on the backlog (community discussion 45058), and inheriting the behavior would silently put this matrix back on every docs-only push if that fix ever lands. pg-upgrade-test already stated the condition itself for the same reason.

test gains a changes dependency in order to read that output. This does not cost the linter its priority: changes is a checkout plus a git diff, with no database and no container, so it runs alongside lint rather than ahead of it, and no container job starts until both cheap jobs have finished. lint remains a hard gate on the matrix.

all-checks-passed needed no change. Its if: always() plus the contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') test already treats a skipped dependency as a pass, and it is the only required status check on master, so skipping the per-matrix-cell checks cannot strand branch protection.

Verification

This PR's first commit changes ci.yml and so is not itself docs-only; the second touches only README.md, which exercises the new skip path directly. Both paths were observed on this branch.

Code-push path — run 34272087919, green: all six test legs ran, and both downstream matrices still launched (three pg-upgrade-test legs, six pg-tle-test legs), confirming the added changes dependency and restated condition don't wrongly skip anything.

That second commit is a real fix, not a throwaway: the README advertised a cat_tools floor of 0.2.1, but sql/extension_drop.sql calls cat_tools.routine__parse_arg_types_text(), which META.in.json records as new in 0.3.0 and declares as the build prereq. Say the word if you'd rather it landed separately.

Docs-only path — run 34272449886, green. changes resolved the per-push range, reported changed files: README.md and set docs_only=true; test, pg-upgrade-test and pg-tle-test all reported skipped; lint, release-safety and changes ran; all-checks-passed succeeded in 2s. Fifteen container jobs became three cheap ones.

A docs-only push ran 12 real PostgreSQL-container jobs: the six-leg `test`
matrix and the six-leg `pg-tle-test` matrix, which additionally compiles
pg_tle from source per leg. Only `pg-upgrade-test` was gated on
`changes.outputs.docs_only`, so the two larger matrices were the bulk of
the waste the gate was added to avoid.

Gate both on it as well. `docs_only` is true only when every changed path
matches `\.(md|asc)$`, so no file that `test` or `pg-tle-test` builds,
installs or exercises can be present in such a diff -- including a
submodule bump, which is recorded as a gitlink on the submodule's own
extensionless path.

`pg-tle-test` restates the condition instead of inheriting the skip from
`test`. At job level `success()` is false when a needed job merely skipped
rather than failed, so the skip does cascade today, but GitHub treats that
as a bug pending a fix; inheriting it would silently restore the old
behavior if that ever lands.

`test` gains a `changes` dependency to read the output. This keeps lint's
priority intact: `changes` is a checkout plus a `git diff`, with no
database and no container, so it runs alongside `lint` rather than ahead
of it, and no container job starts until both cheap jobs finish.

`all-checks-passed` needs no change -- `if: always()` plus its
failure/cancelled test already treats a skip as a pass, and it is the only
required status check on master, so no per-matrix-cell check name can get
stranded.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 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: Advanced

Run ID: 36c9da8c-ccf1-4eb3-b790-4b96dcbf5e4c

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.

`sql/extension_drop.sql` calls `cat_tools.routine__parse_arg_types_text()`,
which META.in.json records as new in 0.3.0 and declares as the build
prereq. The README still advertised 0.2.1, on which the install fails.

Co-Authored-By: Claude <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