question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reduce latency when new node versions are released

See original GitHub issue

Hi there:

Thanks for this library. Just found that the node-version option is not downloading the latest node release.

v10.21.0 release notes: https://nodejs.org/en/blog/vulnerability/june-2020-security-releases/

Our setup:

- uses: actions/setup-node@v1
  with:
    node-version: 10.x
    registry-url: "https://registry.npmjs.org"

Logs:

Run actions/setup-node@v1
/usr/bin/docker exec  be3164773b20b9e565b79dfa087a0d06395e9681e0de57453920d34a25c07234 sh -c "cat /etc/*release | grep ^ID"
/__t/node/10.20.1/x64/bin/node --version
v10.20.1
/__t/node/10.20.1/x64/bin/npm --version
6.14.4

Update: seems related to this change: https://github.com/actions/setup-node/pull/147

Regards Ken

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
maxim-lobanovcommented, Jun 11, 2020

Hello everyone, just to clarify how it works:

  1. actions/setup-node is trying to find version that satisfy your version spec on image
  2. If it is found - it is applied (to avoid spending time for downloading).
  3. If it is not found, it downloads latest satisfied version and install it in runtime.

Unfortunately, pre-cached versions are updated with small delay (usually, not longer than 1-1.5 weeks because images rollout takes much effort) so if you specify full version, action doesn’t find it on image and downloads and installs it in runtime. If you just specify 10.x, it resolves to pre-cached version that can be outdated due to image.

@bryanmacfarlane , may be some flag similar to checkLatest in Azure DevOps UseNode task can be implemented to fix this problem. If checkLatest flag is true, we determine latest version firstly, search it on image and download if it is not found. It will help in cases where 1-2 weeks delay is not acceptable.

0reactions
dmitry-shibanovcommented, Nov 1, 2021

Hello everyone. The check-latest input was added. By default it has false value. When it’s true first of all it will try to find the latest in node-versions repository. If it’s not found it’ll fall back to the previous logic.

Related pull request: https://github.com/actions/setup-node/pull/165

For now I’m closing the issue. If you have any concerns feel free to ping us.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Tips and Techniques to Speed Up and Improve Your Node ...
6 Tips and Techniques to Speed Up and Improve Your Node.js Performance · 1. Caching Your App with Redis · 2. Make sure...
Read more >
7 Ways to Improve Node.js Performance at Scale
Read some practical tips to help you scale your Node.js application to handle more traffic. ... Reduce Latency Through Caching.
Read more >
Monitoring Node.js: Watch Your Event Loop Lag! - David Hettler
Event loop lag is an essential, but often overlooked performance metric for Node.js applications. What is it and why does it matter?
Read more >
Node.js 15: What's new and how the developer experience ...
Read what JavaScript language features, improvements, and changes are new in Node.js 15 that help improve the developer experience.
Read more >
Using shared memory for low-latency, intra-node ...
Using shared memory for low-latency, intra-node communication in AWS Batch ... Shared memory support is a new feature that can help improve ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found