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

Workaround delays in ~/.npm cache restore time #4558

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Conversation

colinrotherham
Copy link
Contributor

We've seen 5+ minutes for Windows ~/.npm cache restore since #4494 was merged

This PR rolls back to actions/setup-node@v4.0.0 actions/setup-node@v3.8.2 to avoid it:

Windows cache restore time

Node.js keepAlive default

The issue is caused by Node.js and fixed in actions/cache but needs an actions/setup-node bump

There was a similar fix for ruby/setup-ruby for more information

Downgrades to v3 to avoid a bug in GitHub actions/cache
actions/cache#810

Cache restore times for ~/.npm going over 5 minutes
@colinrotherham colinrotherham added 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) github_actions Pull requests that update GitHub Actions code labels Dec 12, 2023
@colinrotherham colinrotherham requested a review from a team as a code owner December 12, 2023 09:39
Copy link

github-actions bot commented Dec 12, 2023

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.72 KiB
dist/govuk-frontend-development.min.js 38.54 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 78.3 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 73.58 KiB
packages/govuk-frontend/dist/govuk/all.mjs 3.86 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.7 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 38.53 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.38 KiB

Modules

File Size
all.mjs 69.9 KiB
components/accordion/accordion.mjs 21.67 KiB
components/button/button.mjs 4.7 KiB
components/character-count/character-count.mjs 21.24 KiB
components/checkboxes/checkboxes.mjs 5.83 KiB
components/error-summary/error-summary.mjs 6.09 KiB
components/exit-this-page/exit-this-page.mjs 16.08 KiB
components/header/header.mjs 3.9 KiB
components/notification-banner/notification-banner.mjs 4.54 KiB
components/radios/radios.mjs 4.83 KiB
components/skip-link/skip-link.mjs 4.3 KiB
components/tabs/tabs.mjs 9.66 KiB

View stats and visualisations on the review app


Action run for 900c112

@colinrotherham colinrotherham changed the title Fix delays in ~/.npm cache restore time Workaround delays in ~/.npm cache restore time Dec 12, 2023
Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Changes look good to solve the issue, with install running in a decent (for windows) time. 😄

It looks like we may be able to revert that PR at the next release of setup-node, though. I'll leave it with you to pick whether to merge then revert or hold for GitHub's next setup-node release (not sure of their lifecycle for that kind of things).

@colinrotherham
Copy link
Contributor Author

colinrotherham commented Dec 14, 2023

@romaricpascal Yeah spotted that today 🙌

After opening this PR I submitted feedback via a GitHub Actions survey and linked to a few issues

Hopefully it all helped with the fix. I'll drop the Dependabot ignore and merge

Update: I've confirmed the fix works via actions/setup-node#878 (comment)

Now that Node.js 20 is available to local runners, we no longer need to agressively download the latest version on every run
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4558 December 14, 2023 17:52 Inactive
@colinrotherham colinrotherham merged commit dd208e7 into main Dec 14, 2023
46 checks passed
@colinrotherham colinrotherham deleted the setup-node-delay branch December 14, 2023 18:04
owenatgov pushed a commit that referenced this pull request Jan 11, 2024
Workaround delays in `~/.npm` cache restore time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation) github_actions Pull requests that update GitHub Actions code
Projects
Development

Successfully merging this pull request may close these issues.

3 participants