ci(drift): run the git-touching tests on a git version matrix #531
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!531
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-525-git-version-matrix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #525. Phase 2 of the git-currency work, after #524 pinned the output contract and the 2.38.0 floor.
The gap
CI runs one container image, pinned by digest, so every test runs against one git version.
git --versionis logged atci.yml:125and:219, but nothing asserts on it. Users run Homebrew, Xcode, Alpine, RHEL and Windows builds. A git change cannot fail CI today, by construction.What this adds
A cron-only
git-matrixjob indrift.yml, with three legs:It sits on the cron for the same reason
govulncheckdoes: it answers a question that changes while the tree stays fixed. A PR never changes that answer, so it stays off the PR path.Why a source build
I compared the two ways to get several git versions. A git 2.38.0 source build takes 117 s with
make -j2and the tarball is 7.1 MB. A secondgolangimage variant is 296.8 MB. Adebian:*-slimbase is not a candidate, because the job needs the Go toolchain. The source build is also the only way to test the 2.38.0 floor exactly, because no current distro ships it.The floor is static until ADR 0038 moves it, so the built binaries are cached in a runner-local named volume, keyed by version. The floor build is paid once and reused. The distro leg costs nothing. Only the latest leg rebuilds, when git releases.
Trust anchor
Every other artifact in this CI is digest-pinned, so the new download is pinned too. A hardcoded hash per version cannot cover a leg that moves, so the anchor is a key, not a hash:
B8868C80BA62A1FFFAF5FDA9632D3A06589DA6B1and embeds that public key.sha256sums.asc.A bad signature or a missing row fails the job before any build runs. This key is kernel.org's checksum autosigner, not the git maintainer's own release key. The workflow comment says so, so a later reader knows exactly what the anchor is.
Verification
I checked the parts that would otherwise fail unattended at 04:17 UTC:
sha256sums.asc.923eade2....latestresolves to 2.55.0 against the live listing, and it has a verified row. The release-candidate tarballs do not contaminate the result.For the second acceptance criterion I broke
conflictLineReon purpose, ran the test, and got a failure naming git 2.47.3. I then reverted the break. The tree carries no deliberate break.The new test
TestParseMergeTreeConflicts_RealGitruns the realgit merge-tree --write-treeand parses its true output. The existing test pins the parser against fixed strings; this one pins it against the git binary on PATH. ADR 0038 names that parse as the reason for the 2.38 floor, so it is the right thing to exercise on every leg. Without it the matrix would mostly re-run tests that stub git, and could not detect a rewordedCONFLICTline.The test skips, and names the git it found, on a git too old for
merge-tree --write-tree.Before this can run
The docker backend refuses any volume mount that is not allowlisted. The runner VM must add
madtea-gitcachetovalid_volumesand restart, or the job fails to start.docs/contributing/ci.mdnow records this, and corrects the line that said the allowlist needs no change.Known limits
latestbuilds accumulate in the volume.internal/cmd/gitparses git stderr too, but its tests stub the runner, so the matrix cannot reach that code. A real-git test there is the way to add it.Closes #525