-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Security: lts/*
installs old LTS versions up to 9 days after release
#1207
Comments
Hi @karlhorky, |
Hi @karlhorky, Thank you for reporting this issue. Based on your logs, it seems that although you have set check-latest: true in your YAML configuration, the logs show that the workflow is running with check-latest: false. This discrepancy has led to the installation of Node.js v22.13.0, the version cached on the virtual machine (VM), instead of the latest version, v22.13.1. Typically, the VM cache is up-to-date, and in the worst-case scenario, it can be 2-3 days old. When check-latest: true is passed, the action bypasses the VM cache and downloads the latest version directly from versions-manifest.json. Thus, using version: lts/* with check-latest: true should provide the exact behaviour you expect. We have tested the setup with check-latest: true, and it successfully picks up the latest LTS version. Additionally, with check-latest: false, the action now resolves to the latest LTS version as well, as the VM cache has been updated to include the latest release. For your reference, we have attached a screenshots. If you have any further questions or need additional support, please feel free to reach out to us. |
@gowridurgad Thanks for the answer.
This is incorrect - the bug also occurs with
logs:
To reproduce this, what you need is a stale, out-of-date cache and a new version that has been released.
This is also incorrect - I've observed delay times of up to 5 days.
Probably your tests are not reproducing the behavior correctly - you will require a stale, out-of-date cache and a new version that has been released in the last days. If you can provide steps on how we can reproduce such a situation (eg. what steps we need to perform to insert outdated information in |
Hi @karlhorky, Thank you for your response. When the check-latest: true option is passed, the action ensures it bypasses the VM cache and directly downloads the latest version from the versions-manifest.json. You can find more details in the setup-node documentation. Typically, the versions-manifest.json file is updated within 1–2 working days after a new version is released, provided there are no unforeseen issues or failures. This ensures timely access to new versions for users relying on the check-latest: true option. However, the hosted tool cache updates follow the image update schedule maintained in the runner-images repository. During this time, while the tool cache update is in progress, the check-latest: true option compensates by directly fetching the latest version from the manifest, enabling users to access the most recent version without waiting for the image update. |
This page is 404, did you mean to link something else?
This has been demonstrated to be incorrect, with delays of up to 4 or 5 days, which is not really timely anymore. Even 1 or 2 days is problematic. |
@gowridurgad what about offering a default-fresh option for users (as fast as nvm for new version updates), with the default configuration that is recommended to users? Eg. currently, the first "Basic" example in the readme is this: steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- run: npm test It would be great if the default settings of Good defaults out of the box with immediate access to security updates is something that I think is important to users. |
Hi @karlhorky, Thank you for pointing out the incorrect link in our previous comment. We’ve updated the comment with the correct link now. Apologies for the oversight. After the new version was released, we merged the corresponding PR #197 on the same day. Before the PR was merged, the check-latest: true option fetched Node.js version 20.18.2 as shown in screenshot 1. After the PR merge, it fetched the updated version 20.18.3 as shown in screenshot 2. This shows how the check-latest option dynamically picks up the latest version directly from the versions-manifest.json. Similarly, after the new version 22.14.0 was released, we merged PR #198 on the same day. Before the PR was merged, the check-latest: true option fetched Node.js version 22.13.1. After the PR merge, it fetched the updated version 22.14.0. These examples demonstrate that the check-latest option ensures it fetches the most recent version directly from the versions-manifest.json, even before the hosted tool cache reflects the update. This behaviour allows users to access the latest version without delay, regardless of the image update schedule. Please let me know if you have further questions or need additional details. We're here to help! Screenshot 1: ![]() Screenshot 2: ![]() |
Ok, then what you're proposing is that with fast enough merging of the PRs by the team, the What I have observed in the past is that Two ideas for making this more bulletproof out of the box for users, regardless of how fast the PRs get merged or whether there is a bug in the manifest system:
Maybe you can agree that users should be able to have a working, updated config out of the box for nvm aliases, with no extra delays introduced by slow PR merging. |
Hi @karlhorky, We are marking this issue as blocked for now as we are currently discussing it with our team. Thank you for your patience and understanding. |
Node.js v22.14.0 was released on Feb 11, 2025, which is now 9 days in the past. It should be updating much faster than this using default settings:
|
lts/*
installs old LTS versions up to 5 days after releaselts/*
installs old LTS versions up to 9 days after release
@MikeMcC399 thanks for the update! I've changed the title of the issue to include the "up to 9 days after release" metric. |
Description:
Using the
lts/*
alias withactions/setup-node
installed Node.js v22.13.0 as of 25 Jan 2025, an old version. Node.js v22.13.1 has been out since 21 Jan 2025.Workflow logs:
Longer update delays of over 5 days can be seen in #940
Action version:
actions/setup-node@v4
Platform:
Runner type:
Tools version:
Node.js lts/*
Repro steps:
Use the configuration above and observe the output above
Expected behavior:
Node.js latest LTS (20.11.0) is installed
Actual behavior:
Node.js older LTS (20.10.0) is installed
History:
Originally reported in #940, but closed without resolution, with @aparnajyothi-y saying that it should be handled on the runner side:
In speaking with the runner images team, @hemanthmanga mentioned it should not be handled on the runner side:
The text was updated successfully, but these errors were encountered: