GrabJia Yee ChongProblem & solution
Scaling out Distroless adoption With AI
Summary
Grab is migrating from heavy base images to Distroless images to reduce security risks, despite runtime failures caused by missing shared objects, utilities, or expected directory structures. Its medium tests run services in Docker, leave internal dependencies unmocked through Testcontainers, mock external dependencies with a network proxy, and execute in CI to catch Dockerfile regressions before deployment. For services without this setup, an agentic workflow detects candidates, scaffolds tests, fixes repository-specific failures, raises GitLab merge requests, and monitors CI while processing batches in parallel. Claude Code uses MCP integrations for GitLab, Glean, and Sourcegraph, with guardrails limiting changes to test files and CI configuration and humans reviewing every draft merge request. In roughly 1.5 months, the agent raised more than 100 medium-test merge requests and reduced work for 400 services from 400–1,200 engineer-days to approximately 0.1 days per service; Distroless adoption also grew substantially.
Context
Grab’s migration from heavy base images to Distroless images created a runtime-failure risk: services could pass CI but fail after deployment when shared libraries, system utilities, or expected directory structures were unavailable. Scaling medium-test coverage manually was also blocked by roughly 400 services without existing medium-test setups.
Approach / What changed
Grab uses an agentic workflow with Claude Code to detect eligible services, scaffold medium tests, resolve repository-specific failures, create GitLab merge requests, and monitor CI in batches. MCP integrations provide access to GitLab, Glean, and Sourcegraph, while guardrails restrict modifications and humans review proposed merges.
Takeaways
Distroless images can build successfully in CI yet fail at deployment when required .so files, utilities, or directory structures are absent.
Medium tests combine Testcontainers for internal dependencies, a WireMock-like network proxy for external dependencies, and containerized endpoint checks in CI.
The agent retries persistent CI failures only twice before flagging a service for human review, while engineers make the final merge decision.
Source and freshness
- Source
- engineering.grab.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.