From 2577e0249fcee8404c769879b126bf0b57f55806 Mon Sep 17 00:00:00 2001 From: Manas Srivastava Date: Wed, 3 Jun 2026 23:49:18 +0530 Subject: [PATCH] ci(deploy): cache Go modules via api/go.sum (fix cold-download fragility) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deploy.yml checks the api repo out into ./api, so setup-go's default go.sum lookup at the checkout root misses → the module cache is never restored and every deploy cold-downloads the full dep tree (~2 min). On 2026-06-03 a cold-download run was SIGTERM'd by a transient runner blip and the deploy only landed on a warm re-run. Point cache-dependency-path at api/go.sum so deps restore from cache, shrinking the download window + the transient-failure exposure. (ci.yml checks api out at the root, so its cache already works — this is deploy.yml-specific.) No code/behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/deploy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c1421a15..b9b3fe87 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -135,6 +135,14 @@ jobs: uses: actions/setup-go@v6 with: go-version: '1.25' + # This workflow checks the api repo out into ./api (path: api above), + # so setup-go's default go.sum lookup at the checkout root misses and + # the module cache is never restored — every run cold-downloads the + # full dep tree (~2 min), leaving the test step exposed to transient + # runner blips (seen 2026-06-03: a cold-download run SIGTERM'd and the + # deploy only landed on a warm re-run). Point the cache key at the real + # go.sum so deps are restored from cache. + cache-dependency-path: api/go.sum - name: Stage sibling repos for go.mod replace (../common, ../proto) # The api repo's go.mod uses `replace instant.dev/common => ../common`