ci: speed up PR feedback#4259
Open
reinkrul wants to merge 1 commit into
Open
Conversation
Three independent CI tweaks targeting the ~13 min PR wall-clock: 1. go-test.yaml: drop `-p 1`. Inherited from CircleCI per-shard config during PR #4250 migration; the new GHA pipeline isn't sharded so the flag just serialized 137 packages on a single 2-core runner. Audit shows no inter-package parallelism hazards in the current codebase (no fixed-port net.Listen, no os.Chdir, no TestMain, no shared on-disk paths). Local empirical: -p 1 takes 7m04s, -p 2 takes 3m31s, both pass. Expected CI: 12m15s -> ~6m. 2. e2e-tests.yaml: add gha cache to both Build and push steps. Dockerfile already orders go.mod/go.sum download before COPY ., so the cache is effective on PRs that don't touch go.sum. Saves ~1-2 min after warm-up. 3. build-images.yaml: build amd64 only on PRs, multi-arch on push/tag. arm64 under QEMU is ~5-8x slower; PRs are push: false anyway, so we only verify build doesn't break - arm64 adds no signal. Saves ~20 runner-min/PR (not on critical path but reduces resource use). Also: add .scratch/ and .claude/scheduled_tasks.lock to .gitignore (per global preference - keeps local agent state out of commits). Refs #4258. Assisted by AI
Contributor
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
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.

Summary
Implements findings 1, 2, 3 from #4258. Three independent CI tweaks targeting the ~13 min PR wall-clock:
go-test.yaml: drop-p 1. Inherited from CircleCI's per-shard config during PR ci: move Go test pipeline from CircleCI to GitHub Actions #4250 migration; the new GHA pipeline isn't sharded so the flag just serialized 137 packages on a single 2-core runner. Audit shows no inter-package parallelism hazards in the current codebase (no fixed-portnet.Listen, noos.Chdir, noTestMain, no shared on-disk paths). Local empirical:-p 1takes 7m04s,-p 2takes 3m31s, both pass. Expected CI: 12m15s → ~6m on PRs that bust the Go test cache.e2e-tests.yaml: add gha cache to bothBuild and pushsteps. Dockerfile already orders go.mod/go.sum download beforeCOPY ., so the cache is effective on PRs that don't touch go.sum. Saves ~1-2 min after warm-up.build-images.yaml: build amd64 only on PRs, multi-arch on push/tag. arm64 under QEMU is ~5-8x slower; PRs arepush: falseanyway, so we only verify build doesn't break - arm64 adds no signal. Saves ~20 runner-min/PR (not on critical path but reduces resource use).Drive-by: add
.scratch/and.claude/scheduled_tasks.lockto.gitignoreso local agent state doesn't land in commits.Measurement
Compared against #4254 (most recent docs-only PR before this change, same cache profile shape):
go-test-Teste2e-tests-Build and pushe2e-tests-Run E2E testsbuild-images-Build and pushVerdict per change:
-p 1- works as intended. The 1m 01s figure looks too good because Go's build/test cache is fully hot on this run (most packages show(cached)in the log). On a PR that does change Go code (the realistic case), expect the local empirical projection: ~6 min instead of ~12 min, based on the 7m04s → 3m31s drop measured locally on a 2-core-equivalent run.Run E2E testsstep itself is unaffected as designed (sharding from ci: speed up PR feedback (remove -p 1, shard e2e, cache, drop multi-arch on PR) #4258 finding 4 is a separate change).Combined PR wall-clock effect:
Before this PR (last comparable run #4254): max(go-test 12m, e2e 10m, build-images 23m) = ~23 min total elapsed. After: max(~6m worst-case go-test, ~11m e2e, ~2m build-images) = ~11 min elapsed.
build-imagesno longer the long pole on PRs.Test plan
Go testworkflow green;Teststep substantially faster.E2E testsworkflow green (no regression).Build Docker imagesworkflow green and ~93% faster.Refs #4258.
Assisted by AI