ci: stable required-checks gate for branch protection#2518
Merged
Conversation
Matrix test jobs embed the Borg version in their auto-generated check names (e.g. "test-unit (3.12, ubuntu-24.04, 1.4.4)"), so requiring them in branch protection breaks on every version bump. Add a single aggregate gate job with a fixed name that depends on lint, test-unit and test-integration. Branch protection can then require the stable "required-checks" context instead of version-bearing names.
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 on
masterrequires status checks by exact name. Thetest-unit/test-integrationmatrix jobs auto-generate names that embed the Borg version, e.g.test-unit (3.12, ubuntu-24.04, 1.4.4). There is no way to give a matrix job a fully static per-entry name.So protection currently still pins stale contexts (
...1.4.2,...1.4.3) while the matrix runs1.4.4. Those checks never report under the old names and sit pending forever — PRs like #2517 can't satisfy protection without an admin override. Every Borg bump silently re-breaks the gate.Fix
Add a single aggregate gate job,
required-checks, with a fixed name thatneedslint + test-unit + test-integration. Branch protection can then require only the stable contexts (lint,required-checks), fully decoupling protection from the matrix. Future Borg bumps need no protection changes.Inline bash decides pass/fail (no third-party action).
if: always()ensures the gate reports even when a matrix job fails.Follow-up (admin, after this merges)
Once
required-checkshas reported once onmaster, update protection contexts to["lint", "required-checks"].