CI: skip the container jobs on docs-only diffs, not just pg-upgrade-test - #49
Draft
jnasbyupgrade wants to merge 2 commits into
Draft
CI: skip the container jobs on docs-only diffs, not just pg-upgrade-test#49jnasbyupgrade wants to merge 2 commits into
jnasbyupgrade wants to merge 2 commits into
Conversation
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>
|
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: Advanced 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 |
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A docs-only push ran 12 real PostgreSQL-container jobs. Only
pg-upgrade-testwas gated onchanges.outputs.docs_only; the six-legtestmatrix and the six-legpg-tle-testmatrix — 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_onlyis true only when every changed path matches\.(md|asc)$, so no file thattestorpg-tle-testbuilds, installs or exercises can appear in such a diff: notsql/,extension_drop.control,META.json, theMakefile,bin/,test/,pgxntool/or.github/, and not a submodule bump either, since a gitlink is recorded on the submodule's own extensionless path.lintandrelease-safetystay ungated — both are cheap, andrelease-safetyis precisely the job that must fire whenHISTORY.ascchanges.pg-tle-testrestates the condition rather than inheriting the skip fromtest. At job levelsuccess()evaluates false when a needed job merely skipped rather than failed, so a skippedtestdoes 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-testalready stated the condition itself for the same reason.testgains achangesdependency in order to read that output. This does not cost the linter its priority:changesis a checkout plus agit diff, with no database and no container, so it runs alongsidelintrather than ahead of it, and no container job starts until both cheap jobs have finished.lintremains a hard gate on the matrix.all-checks-passedneeded no change. Itsif: always()plus thecontains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')test already treats a skipped dependency as a pass, and it is the only required status check onmaster, so skipping the per-matrix-cell checks cannot strand branch protection.Verification
This PR's first commit changes
ci.ymland so is not itself docs-only; the second touches onlyREADME.md, which exercises the new skip path directly. Both paths were observed on this branch.Code-push path — run 34272087919, green: all six
testlegs ran, and both downstream matrices still launched (threepg-upgrade-testlegs, sixpg-tle-testlegs), confirming the addedchangesdependency and restated condition don't wrongly skip anything.That second commit is a real fix, not a throwaway: the README advertised a
cat_toolsfloor of 0.2.1, butsql/extension_drop.sqlcallscat_tools.routine__parse_arg_types_text(), whichMETA.in.jsonrecords 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.
changesresolved the per-push range, reportedchanged files: README.mdand setdocs_only=true;test,pg-upgrade-testandpg-tle-testall reportedskipped;lint,release-safetyandchangesran;all-checks-passedsucceeded in 2s. Fifteen container jobs became three cheap ones.