From be48d788fb68a2fdee19c4b6ff99d09cecbc421e Mon Sep 17 00:00:00 2001 From: Louis Parkin Date: Tue, 15 Sep 2026 12:12:58 +0200 Subject: [PATCH] Use the populated Go module cache for Omnibus packaging The DEB workflow passed vendor as OMNIBUS_GOMODCACHE. Omnibus forwards this as GOMODCACHE while agent.build uses -mod=readonly, so it redownloaded dependencies into vendor instead of reusing the cache image. The spike merge build failed during one of those redundant downloads. Resolve the module cache before Omnibus changes GOPATH. Offline reproduction with checksum verification retained fails with the old path and passes with the populated cache. Parsed workflow comparison and offline Zizmor passed. Tracks StackVista/stackstate#561. --- .github/workflows/build-deb.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index 9b85a450f8e..efa32cab3a8 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -157,11 +157,6 @@ jobs: # built-in that is unset here); pass the checkout root explicitly. ./fix_branding.sh "${GITHUB_WORKSPACE}" - # GOMODCACHE is pre-warmed by the godeps-cache image (STAC-25429), keyed - # to the module-graph hash, so there is no `go clean -modcache` and no - # per-job `inv deps` (go mod download + tidy) reconcile. Materialise - # vendor/ for this checkout against the warm cache (offline; no download). - # omnibus.build is handed this vendor/ as its --go-mod-cache below. go work sync go work vendor # version.txt is consumed by the packaging/image phases. deps_deb produced @@ -179,7 +174,7 @@ jobs: inv -e omnibus.build \ --gem-path "${GITHUB_WORKSPACE}/.gems" \ --base-dir "${OMNIBUS_BASE_DIR}" \ - --go-mod-cache "${GITHUB_WORKSPACE}/vendor" \ + --go-mod-cache "$(go env GOMODCACHE)" \ --skip-deps \ --skip-sign \ --install-directory /opt/stackstate-agent