Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

incident.io 9 min read Case study mediumAdept

The quest for the five minute deploy

incident.io cut CI/CD times by moving from a hosted provider, where a cold Go build cache made compiling 15,000+ tests across 350+ packages the bottleneck, to Buildkite running on three self-hosted 48-vCPU servers. Prebuilding Ginkgo test binaries and running them in batches on a single server, plus per-server Go build caches, per-yarn.lock Node module caches with pipeline fallback, and local Docker image caches, brought the test step to 2–4 minutes. Production deploys fell from 11.5 to 8.5 minutes, branch builds from 10 to 5.5, and hotfixes to 3.5. Remaining pain points include bin packing containers, under-provisioned disk IOPS, newly exposed flaky tests, cache poisoning, zombie containers, and a fast-growing cache that must be cleared wholesale.

Related posts

  • Deploying to production in <5m with our hosted container builder

    incident.io mediumAdept

    incident.io cut Docker image build times from an inconsistent 3–10+ minutes back to under 2 minutes by replacing CircleCI's remote Docker and Docker Layer Caching with a permanently running GCP c2-standard-8 builder with a 500GB SSD. The slow builds came from CircleCI's DLC attaching a cache disk only when one is free, so concurrent builds often started with a cold layer cache. Larger CircleCI resource classes added minutes of provisioning time. CircleCI jobs now reach the dedicated daemon over SSH via DOCKER_HOST. Measured builds take 20s with no changes and about 1m50s when both the Go backend and React frontend change, for roughly £350/month.

  • Counting to 3 with a new builder processing 50M+ monthly builds

    Railway mediumAdept

    Railway replaced its docker-buildx-on-GCP-VMs build system with Builder v3: 256-vCPU bare-metal hosts split into eight 32-vCPU microVM build cells running buildkitd, scheduled with a 1-of-3 ring to keep BuildKit caches warm, now peaking at 66,000 builds per hour. Collapsing a host/guest split (workflow → gRPC over vsock → guest handler) into one standalone builder process cut about 20 seconds from cached builds. Rollout problems included VM bridge networking failures that forced a rollback, unreliable DNS (fixed with embedded CoreDNS), clock drift breaking cert validation, and stuck builds from runc workers starving buildkitd, fixed with cgroup v2 slices. Reading layer metadata from OCI manifests instead of decompressing layers was about 15× faster and saved roughly 10 seconds per build.

  • AI coding has made CI a bottleneck, so we reworked ours to keep up

    Linear mediumAdept

    Linear cut pull request CI wait time from over 6 minutes to about 5 and halved runner time per test, even as its test suites nearly quadrupled. The biggest wins came from faster third-party runners (34% faster jobs), switching to tsgo (73% faster typecheck), and rewriting type-aware lint rules as pure AST checks so ESLint and later Oxlint could skip TypeScript. Further gains came from trimming critical-path gating jobs with shallow, sparse and blobless checkouts, a retrying checkout action with low-speed git timeouts, filtered pnpm installs instead of caching node_modules, schema snapshots instead of replaying migrations, and batching short checks, which saved about 87,000 runner-minutes a month. Splitting large Vitest files and moving to eight shards cut the slowest shard from 5.25 to 4.33 minutes.

  • Optimizing Our E2E Pipeline

    Slack Engineering mediumAdept

    Slack cut redundant frontend builds in its monorepo E2E pipeline by using `git diff` three-dot notation against `main` to detect whether a PR touches frontend code, and when it doesn't, serving a recent production frontend build from S3 through an internal CDN instead of rebuilding. The check and artifact lookup take under 3 seconds across 100,000+ tracked files. Frontend build frequency dropped 60%, average build time fell from ~5 to ~2 minutes (from ~10 minutes at the start of the year, counting an earlier Webpack upgrade), several terabytes of monthly S3 storage were saved, and E2E test flakiness reached its lowest measured level.

  • Mobile Developer Experience at Slack

    Slack Engineering mediumAdept

    A dedicated mobile Developer Experience team grew from 3 to 8 engineers and cut CI feedback time and failure rates by targeting the pain points that surveys, NPS and metrics like time to merge showed hurt developers most. iOS test time fell from about 50 minutes to an average of 9 by moving from Xcodebuild to Bazel with disk caching and bazel-diff, so only affected targets are tested. On Android, test sharding (in-house Fuel, later Flank) cut runs from 50+ minutes to under 20, and replacing Calabash with Espresso took suites from ~350 to ~60 minutes. Further gains came from auto-suppressing flaky tests (failure rate 57% to 4%), migrating from Jenkins to Buildkite (CI stability ~87% to 95%, TTM down 41%), generating Xcode projects with Xcodegen to avoid merge conflicts, and adopting a merge queue.

The quest for software engineering knowledge.

Look:
Layout: