Add aggregate CI/Packaging gate jobs for branch protection - #8815
Open
ibrahim halatci (ihalatci) wants to merge 2 commits into
Open
Add aggregate CI/Packaging gate jobs for branch protection#8815ibrahim halatci (ihalatci) wants to merge 2 commits into
ibrahim halatci (ihalatci) wants to merge 2 commits into
Conversation
Required status checks currently enumerate every matrix leg by name
(e.g. "Test Citus / PG18 - check-multi"), so the list is a function of
each branch's Postgres matrix. That makes homogeneous protection across
main and the release branches impossible to maintain: main requires 111
contexts, release-13.2 89, release-12.1 108, and release-14.0 had none.
Add a single aggregate gate job to each workflow ("CI" and "Packaging")
that depends on the blocking jobs and fails if any of them did not
succeed. Their names are constant across branches, so branch protection
can require just these two contexts and never needs updating when the
Postgres matrix changes.
Advisory jobs are deliberately excluded from the gates so they keep
running and stay visible without blocking a merge: flakyness detection,
the CH/TPCC benchmarks, and (on release branches) the N-1 suites.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: efb25be2-5642-4485-ad0c-fe162a1e4410
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8815 +/- ##
=======================================
Coverage 88.74% 88.74%
=======================================
Files 289 289
Lines 64992 64992
Branches 8200 8199 -1
=======================================
+ Hits 57676 57678 +2
+ Misses 4950 4949 -1
+ Partials 2366 2365 -1 🚀 New features to boost your workflow:
|
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.
Problem
Branch protection today enumerates every individual CI leg as a required status
check. Almost all of those names embed the Postgres major, e.g.
Test Citus / PG18 - check-multi. That makes the required-check list a functionof each branch's PG matrix, so it can never be homogeneous across
mainand therelease branches, and it silently rots whenever the matrix changes.
Two concrete symptoms:
release-14.0had no protection at all until it was added manually thisweek. Nothing detects that state.
Drop PG16 support (#8757)just invalidated everyPG16 - *required contexton
main. Required checks that no longer exist are simply never reported, sothe gap is invisible rather than loud.
Counts as of today:
main111 required contexts,release-13.289,release-12.1108 — all different, all hand-maintained.Change
Adds one aggregate gate job per workflow whose name is constant and does not
mention any Postgres version:
ci-gateCIbuild_and_test.ymlpackaging-gatePackagingpackaging-test-pipelines.ymlEach gate is
if: always(),needs:the blocking jobs, and fails if any of themreports
failure,cancelled, orskipped. Branch protection can then requirejust
CI+Packagingand never be touched again when the matrix moves.This is additive only — no existing line is modified, and no job's behavior
changes. +54 lines total.
Gated (blocking)
build_and_test.yml:params,check-sql-snapshots,check-style,build,test-citus,test-citus-failure,test-citus-cdc,test-arbitrary-configs,test-pg-upgrade,test-citus-upgrade.packaging-test-pipelines.yml:get_postgres_versions_from_file,rpm_build_tests,deb_build_tests.Not gated (advisory — still run, still visible)
test-flakyness-pre,test-flakyness,ch_benchmark,tpcc_benchmark,prepare_parallelization_matrix_32, and the N-1 suites. These are deliberatelynon-blocking.
Notes for reviewers
needsis unconditional, which is what makes treatingskippedas a failure safe. The conditional jobs (benchmarks, flakyness) are exactly the
ones left out. If a conditional job is ever added to
needs, that logic mustbe revisited.
it. A
CODEOWNERSentry for/.github/workflows/is the intended mitigationand will follow separately.
license/cla,get_postgres_versions_from_fileand all 21deb_build_tests/rpm_build_testslegs only run onpull_request.Rollout
CIandPackagingappear and go green.release-14.0andrelease-13.2(job IDs are identical tomain, so it applies verbatim).main+ maintained release branches, usingnumeric ref patterns so future branches such as
release-15.0are protectedautomatically instead of starting out unprotected.
evaluate, then switch toactiveand retire theper-branch classic protections.
release-12.1keeps its existing classic protection and is intentionally out ofscope here.
Backporting to
release-13.2will newly enforcecheck-stylethere, since thatbranch currently requires only
check-sql-snapshotsamong the generic checks.That is an intended homogenization, called out here so it is not a surprise.