proomt

Search

Search posts, papers, and topics

All posts

Hacker News front pageLukas Schwab, Peter Downs9 min readintermediate

Scaling Golang CI by Replacing actions/setup-go

Summary

The default GitHub actions/setup-go action degrades parallel Go CI performance due to incomplete cache keys and stale writes. A new open-source action, cloudx-io/setup-go, resolves this with job-specific and run-ID-based keys, cutting test job runtimes by 69%.

  • actions/setup-go's broad cache key causes stale caches and unnecessary re-runs in parallel Go CI jobs.
  • Parallel jobs using actions/setup-go race to write incomplete cache states, slowing subsequent jobs.
  • Go's module, build, and test caches are highly optimized for persistent filesystems, using complete, minimal dependency keys.
  • cloudx-io/setup-go uses job identity and run ID in its cache key to ensure unique, fresh cache writes for each job.

Engineers managing moderately complex Go projects with parallel CI jobs can significantly reduce their CI runtimes and improve developer feedback loops by adopting this optimized caching strategy.

7/10

Related reading

  1. Size-Specialized Memory Allocation

    Go 1.27 adds a set of span‑class‑specific malloc functions for allocations ≤ 80 bytes. By generating a tiny, constant‑size allocator per span class the runtime can inline size‑dependent work (e.g. zero‑clear) and skip span‑class lookup, yielding 20‑30 % faster small allocations and ~1 % overall speed‑up for allocation‑heavy programs. The implementation is generated automatically via an AST inline…

    The Go Bloggo.dev7 minHN315
  2. Migrating the GitHub Copilot runtime to Rust, using Copilot

    The Copilot agent runtime was rewritten from a 130‑k‑line TypeScript/Node.js codebase into a native Rust library (~830 k lines of Rust) to reduce startup latency, memory use, and improve reliability. The migration was done incrementally (in‑place) across 128 PRs, with AI‑generated code handling most of the work. The new runtime exposes a C ABI for in‑process embedding by all six Copilot SDK langu…

    GitHub Oldgithub.blog65 minHN188
  3. What Go Taught Us About Java Garbage Collection

    ParparVM’s GC was tuned by lowering the allocation‑trigger floor, adding configurable thresholds, parallel marking, mutator assistance, and proper weak/soft reference handling. These changes cut RSS from 98 MB to 38 MB, reduced worst‑case GC pauses from seconds to sub‑second, and improved cache hit rates with a recency‑based eviction policy.

    CodeName Onecodenameone.com7 min
  4. GitHub Actions leaking secrets when Miri output is cached

    Miri writes all environment variables to the target/ directory, and when that directory is cached in GitHub Actions, secrets can be exposed to PRs. A short‑term patch now limits Miri to only preserve CARGO_* vars (excluding tokens) and OUT_DIR; until the fix lands, disable target caching or scope secrets away from Miri steps and clear existing caches.

    Rust Blogrust-lang.org3 min