Skip to content

Reuse the Go module cache during DEB packaging - #518

Merged
LouisParkin merged 1 commit into
STAC-25490-otel-spikefrom
fix-spike-module-cache
Sep 15, 2026
Merged

LouisParkin merged 1 commit into
STAC-25490-otel-spikefrom
fix-spike-module-cache

Conversation

@LouisParkin

Copy link
Copy Markdown

DEB packaging passed vendor/ as GOMODCACHE, so Omnibus redownloaded modules despite the populated CI cache. Use go env GOMODCACHE before Omnibus changes GOPATH. This removes the redundant downloads that exposed the spike build to a Go proxy failure.

Validation: offline reproduction fails with the old path and passes with the corrected cache; parsed workflow comparison and offline Zizmor passed. Full packaging CI remains required.

Tracks https://github.com/StackVista/stackstate/issues/561.

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.

@LouisParkin LouisParkin left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed be48d78 against STAC-25490-otel-spike: no blocking findings.

Traced the argument through tasks/omnibus.py into the installer/agent recipes. Resolving GOMODCACHE before Omnibus overrides GOPATH correctly preserves the populated cache; vendor/ cannot substitute for it when agent.build uses -mod=readonly.

Validation:

  • Independent offline reproduction with a ZIP-only module cache and a changed GOPATH: the old path fails, the corrected path builds; go mod verify passes.
  • Parsed workflow comparison confirms only the cache argument changes executable behavior. Offline Zizmor reports no findings under the existing configuration.
  • CI run 34956835540 built both DEBs, passed branding checks, and built/smoke-tested both container architectures. Logs show /go/pkg/mod in the Omnibus recipes and no subsequent Go download messages. Lint/unit and binary workflows also passed.

The earlier workspace preparation still downloads some modules, so this fixes redundant Omnibus downloads rather than making the whole build offline. PR signing/publication jobs were correctly skipped.

@LouisParkin
LouisParkin merged commit 770022d into STAC-25490-otel-spike Sep 15, 2026
42 checks passed
@LouisParkin
LouisParkin deleted the fix-spike-module-cache branch September 15, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants