Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: clean GOCACHE before build #17808

Merged
merged 1 commit into from
Jul 6, 2023
Merged

ci: clean GOCACHE before build #17808

merged 1 commit into from
Jul 6, 2023

Conversation

gulducat
Copy link
Member

@gulducat gulducat commented Jul 5, 2023

This is basically to avoid Fear/Uncertainty/Doubt.

The github action actions/setup-go (and, with a different chache key, hashicorp/setup-golang) caches both GOMODCACHE (go source files), which is good, and GOCACHE (build outputs), which might be bad, if the cache was built on an OS with an older glibc than we want to support. from go help cache:

[...] the build cache does not detect changes to C libraries imported with cgo.

I think we've been okay so far, because the cache has always(~?) been built on 20.04 machines, but to be safe, this wipes the build cache (leaving the mod cache alone) before building.

related PR that checks the build after the fact: #17706

this is basically to avoid Fear/Uncertainty/Doubt

the github action actions/setup-go
(and, with a different chache key, hashicorp/setup-golang)
caches both GOMODCACHE (go source files), which is good,
and GOCACHE (build outputs), which *might* be bad,
if the cache was built on an OS with an older glibc
than we want to support. from `go help cache`:
> [...] the build cache does not detect changes to
> C libraries imported with cgo.
@gulducat gulducat requested review from a team as code owners July 5, 2023 21:09
@gulducat gulducat added backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line backport/1.5.x backport to 1.5.x release line labels Jul 5, 2023
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line backport/1.5.x backport to 1.5.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants