Skip to content

CI: Bazel caching, superseded-run cancellation, checkout@v7 - #32

Merged
aaylward merged 6 commits into
mainfrom
claude/jsonrpc-task-2v9quv
Jul 7, 2026
Merged

aaylward merged 6 commits into
mainfrom
claude/jsonrpc-task-2v9quv

Conversation

@aaylward

@aaylward aaylward commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

CI reliability/speed pass, patterned on muchq/MoonBase's branch builds:

Bazel caching — every job cold-built until now: each leg re-fetched all external modules and recompiled the runtime, googletest, and (benchmarks) all of BoringSSL + asio on every push. Adds bazel-contrib/setup-bazel@0.19.0 (version matching MoonBase) to each Bazel-running job with three caches:

  • bazelisk cache — the Bazel binary download.
  • repository cache — external module archives (Boost, BoringSSL, googletest, google_benchmark), so dependency fetches stop hitting the network.
  • disk cache — compiled action results, keyed per job config (linux-gcc, asan-ubsan, benchmarks-opt, …) since object files differ across compilers/configs. PR branches restore the caches main builds save, so a typical PR leg recompiles only what its diff dirties.

Not touched: the codegen job (already cached via setup-gradle) and lint (runs no Bazel). The action wires cache paths through the user-level bazelrc, so existing bazelisk invocations pick them up unchanged.

Superseded-run cancellationconcurrency group per ref with cancel-in-progress: true: a new push to a PR cancels the in-flight run for the old head. main builds get a per-run group (github.run_id) so every merge still completes and populates the caches.

actions/checkout v4 → v7 — clears the Node 20 deprecation warning emitted on every job.

lint hardening (picked up while iterating here): the runner image's packages.microsoft.com apt repos intermittently fail signature checks and aborted apt-get update; libboost-dev comes from the Ubuntu archive, so update now fails soft and the install step is the arbiter.

Known trade-offs: GitHub's 10 GB per-repo cache quota is shared across the disk caches (eviction means a slower run, not a failure), and toolchain-change PRs see near-cold builds since their diffs invalidate most action results.

Testing

  • This PR's own CI run exercises the action on all three OSes (first run populates the caches; the timing payoff shows on runs after this merges).
  • No build semantics changed — --config flags and test commands untouched; YAML-only.

Checklist

  • CI green on all legs
  • Caching/workflow-mechanics only; no build or test semantics changed

🤖 Generated with Claude Code

https://claude.ai/code/session_019ytv3VMrURFYP2mdWhk3un

claude added 4 commits July 7, 2026 20:44
Every job cold-built until now — each leg re-fetched external deps and
recompiled the runtime, googletest, and (benchmarks) BoringSSL + asio
from scratch on every push. Add bazel-contrib/setup-bazel to each
Bazel-running job with the bazelisk binary cache, the repository cache
(external module downloads), and a per-config disk cache (action
results), so branch builds restore from the caches main builds save.

The codegen job already caches through setup-gradle; lint runs no
Bazel.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ytv3VMrURFYP2mdWhk3un
Match the current release (as used by muchq/MoonBase's branch builds).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ytv3VMrURFYP2mdWhk3un
The runner image ships packages.microsoft.com repos that intermittently
fail signature checks and abort apt-get update; libboost-dev comes from
the Ubuntu archive, so let update fail soft and let install be the
arbiter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ytv3VMrURFYP2mdWhk3un
- concurrency: a new push to a PR cancels the in-flight run for the old
  head; main builds keep a per-run group so every merge still populates
  the bazel caches.
- actions/checkout v4 -> v7, clearing the Node 20 deprecation warnings
  on every job.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ytv3VMrURFYP2mdWhk3un
@aaylward aaylward changed the title CI: cache Bazel between runs CI: Bazel caching, superseded-run cancellation, checkout@v7 Jul 7, 2026
claude added 2 commits July 7, 2026 20:53
gcc sizes the snprintf against full int widths (73 bytes worst case);
give the buffer headroom for that instead of the real bounded output.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ytv3VMrURFYP2mdWhk3un
The asan CI leg caught //runtime:beast_transport_test dying with
"Broken pipe": in RejectsOversizedBodies the Beast server closes the
connection while SocketHttpClient is still streaming the request body,
and the client's next send() raised SIGPIPE, killing the process. The
race only fires when the close beats the remaining writes (sanitizer
slowdown made the server lose it), which is why the test usually
passes.

Suppress the signal at the transport layer so a peer disconnect always
surfaces as a write error: MSG_NOSIGNAL on send (Linux), SO_NOSIGPIPE
on the socket (macOS/BSD, which lack MSG_NOSIGNAL); Windows has no
SIGPIPE. Regression test drives a 64 MiB+ body into SocketHttpServer,
whose content-length rejection closes mid-send the same way.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ytv3VMrURFYP2mdWhk3un
@aaylward
aaylward merged commit d3902e8 into main Jul 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants