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

node_modules caching in GitHub Actions often fails #8014

Closed
peterbe opened this issue Aug 17, 2021 · 1 comment · Fixed by #8012
Closed

node_modules caching in GitHub Actions often fails #8014

peterbe opened this issue Aug 17, 2021 · 1 comment · Fixed by #8012
Assignees

Comments

@peterbe
Copy link
Contributor

peterbe commented Aug 17, 2021

I noticed something strange. A lot of times, when .github/workflows/pr-test.yml runs it's unable to benefit from caching the whole ./node_modules directory between caches. That's strange. I would expect the cache to be constantly busted when the yarn.lock changes on all those Dependabot upgrades of @mdn/yari. But that was not the case.

You often see this:
Screen Shot 2021-08-17 at 10 21 40 AM

By hopeful intuition and skimming a lot of the threads in this issue: actions/toolkit#658
It seems that it's failing because the cache key is not unique between workflows. E.g. pr-test.yml and pr-check_redirects.yml share the same cache key.

@peterbe
Copy link
Contributor Author

peterbe commented Aug 17, 2021

Ah! Much better!
Screen Shot 2021-08-17 at 10 29 57 AM

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant