Repository navigation
ci: runner-built image, concurrency, scoped jobs and packages, and the merge push reuses the PR's checks - #19
Merged
Merged
Conversation
ci.yml had no concurrency block, so every push to a pull request queued another full run behind the one in progress on a single-runner set. A newer push now cancels a pull request's run in progress; master runs each finish, since each one publishes :edge.
The docker job compiled gitstead inside dind at two CPUs, throttled in 40-60% of CFS periods, without the shared Go build cache, and paid for the buildkit-cache-dance post step and a mode=max GHA cache export. The binaries are now cross-compiled on the runner through go-ci-actions, with its remote build cache (scripts/build-binaries.sh), and the image build only copies them. One Dockerfile does that for CI, local builds and GoReleaser's dockers_v2, which already laid binaries out the same way, so Dockerfile.goreleaser is gone. Pull requests build linux/amd64 only, without provenance or an SBOM; master builds both platforms and pushes :edge.
The push to master re-ran build, vet, tests, e2e, govulncheck and lint over the tree the pull request had just tested. A pull request's run now ends by recording a receipt of the tested merge tree (go-ci-actions acceptance), and the push that merges it skips those checks when its merge commit carries that tree and the pull request run passed within six hours; it still builds and pushes :edge.
The record job's default success() also looks at the skipped acceptance job upstream of every need, so it never ran on a pull request. It now checks its needs' results explicitly.
CI ran build, vet, race tests, e2e, govulncheck, lint and the image on every change. A scope job (go-ci-actions scope) now selects the jobs a change needs and the packages they check, the changed packages and those that import one; e2e and the image run when the binary's package graph or their own files change. internal/config's tests read examples/*.yaml and config.example.yaml, which go-owners declares. A pull request is measured from its base, a push from the last green run on master; ci.yml, go.mod, go.sum and the full-ci label run everything, and a nightly schedule is the full run, skipped when master has not moved. The merge push reuses the pull request's receipt for its own scope and still publishes :edge when the image's inputs changed; e2e no longer reruns on it. Only a push or a manual run on master pushes :edge. The artifact storage contract no longer repeats on the merge push what its pull request checked. Part of ashtonian/home-ops-private#731.
go-ci-actions acceptance now reuses a receipt only when the commit the merge sits on has a green run, and job by job: verify's remaining lists the scoped jobs the pull request did not pass, and the push runs only those. The scope job's jobs output is remaining, falling back to the scope's own jobs on pull requests. The CI docs say so. Part of ashtonian/home-ops-private#731.
Every go-ci-actions use moves from the go-ci-actions#18 candidate to the v1.8.0 release (08c90cf). Part of ashtonian/home-ops-private#731.
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 gitstead push took 22.6 min wall on the one-runner set, for 9.4 runner-min. The docker job compiled inside dind at two CPUs, throttled in 40-60% of CFS periods and without the shared Go build cache. The push then re-ran every check the PR had just passed,
ci.ymlhad noconcurrency:block, and every PR ran every job.concurrency: ci-${{ github.ref }}, cancelling in progress for PRs only.scripts/build-binaries.shcross-compiles through go-ci-actions with.goreleaser.yaml's flags into<os>/<arch>/gitstead.Dockerfilecopies the platform's binary onto Alpine with git and openssh-client, for CI, local builds and GoReleaser'sdockers_v2.:edge.scopejob (go-ci-actionsscope) selects the jobs and packages: the changed packages and those that import one.test,vulnandlintcheck the affected packages.e2eanddockerrun when the binary's package graph or their own files (e2e/,Dockerfile,scripts/build-binaries.sh) change.examples/*.yamlandconfig.example.yaml, whichgo-ownersdeclares.ci.yml, go.mod, go.sum and thefull-cilabel run everything.acceptancereceipt job by job for its own scope, on a green parent, soe2eno longer reruns on it either. It still publishes:edgewhen the image's inputs changed.:edge; the nightly and dispatch from other branches don't.SPEC.md, docs/RELEASING.md and CONTRIBUTING are updated. The release path (
goreleaserwith the one Dockerfile) first runs on the next tag.goreleaser release --snapshot --clean --skip=homebrew,publishchecks it before then.Pinned to go-ci-actions v1.8.0 (
08c90cf).Part of ashtonian/home-ops-private#731.