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

Make setup-node faster and more reliable #160

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

mumoshu
Copy link
Contributor

@mumoshu mumoshu commented Oct 24, 2023

We have occasionally seen that setup-node actions failing due to intermittent connection failures between us and nodejs.org.

To alleviate the issue, we could cache our "most-widely-used" Node.js version inside the container image, enabling setup-node to skip access to nodejs.org.

This tries to implements that, in a way so that it becomes resilient to nodejs and tool-cache changes. Just keep updating NODE_VERSION defined in the dockerfile using dependabot or renovate- the rest of the change will just work regardless of the version you want.

Testing

To anyone interested, you can test this locally by building images using commands like:

docker build --platform linux/arm64 -t qar:test -f Dockerfile.ubuntu20 .

and deploying it using the gha-runner-scale-set chart.

@github-actions
Copy link

⚠️ If you need to release this change, create a next release after merge.

We have occasionally seen that setup-node actions failing due to intermittent connection failures between us and nodejs.org.

To alleviate the issue, we could cache our "most-widely-used" Node.js version inside the container image, enabling setup-node to skip access to nodejs.org.

This tries to implements that, in a way so that it becomes resilient to nodejs and tool-cache changes. Just keep updating NODE_VERSION defined in the dockerfile using dependabot or renovate- the rest of the change will just work regardless of the version you want.
@mumoshu mumoshu force-pushed the faster-more-reliable-setup-node branch from 4db6319 to fec78c1 Compare October 24, 2023 05:21
@github-actions
Copy link

⚠️ If you need to release this change, create a next release after merge.

@int128 int128 self-requested a review October 24, 2023 08:59
@int128 int128 mentioned this pull request Oct 25, 2023
* Refactor

* Fix

* Fix

* Fix

* Improve logs

* Refactor

* Fix script

* Set --strip-components=1
@int128 int128 requested a review from a team as a code owner October 26, 2023 00:03
@github-actions
Copy link

⚠️ If you need to release this change, create a next release after merge.

@int128
Copy link
Member

int128 commented Oct 26, 2023

@mumoshu Thank you so much for your contribution! I have added some refactoring.

@github-actions
Copy link

⚠️ If you need to release this change, create a next release after merge.

@int128 int128 merged commit 5e0c7e7 into main Oct 30, 2023
@int128 int128 deleted the faster-more-reliable-setup-node branch October 30, 2023 06:14
@int128 int128 mentioned this pull request Nov 8, 2023
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