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

Don't populate the Go cache from the license check job #1222

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

blampe
Copy link
Contributor

@blampe blampe commented Dec 12, 2024

GitHub cache artifacts are immutable, so the first job to write to the cache "wins" in the sense that all subsequent jobs will start with whatever that job happened to cache.

We currently use setup-go in the license check action, but this job is very quick (typically a couple minutes) and doesn't really build any artifacts or download modules. Subsequent jobs then need to re-download and re-compile all the provider's modules.

This PR disables caching for the license check job. This gives the prerequisites job an opportunity to more fully populate the cache.

Ideally we would only disable writing to the cache, but there isn't an official way to do that yet (actions/setup-go#316) and manually restoring the cache is fragile.

@blampe blampe added this pull request to the merge queue Dec 12, 2024
@t0yv0
Copy link
Member

t0yv0 commented Dec 12, 2024

Cool! I think it's possible to have separate named caches in the repo, but I've not looked in a bit.

Merged via the queue into master with commit aa1f6b5 Dec 12, 2024
6 checks passed
@blampe blampe deleted the blampe/go-caching branch December 12, 2024 20:05
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.

3 participants