-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 8 installs different versions depending on system #27
Comments
So I think what is happening here is that its pulling from our image's pre-loaded tool-cache. We look for a matching node version in the cache before downloading, and just use that if its there. So for some reason, we have 8.16 installed in the tool-cache for Linux/Mac, but only 8.10 installed for Windows. We should probably update that to install 8.16 in the Windows cache as well. With that said, a more scalable solution to this problem is coming in #26 which I think is the right solution to this problem. When that is resolved, you'll be able to specify something like |
I think this problem will be solved as you said, caching Node 8.16 for Windows like in Linux and MacOS, as is the latest release below 8.x branch. How can we know which versions are cached at any moment? Using the names instead of explicit version for better scalability is a good improvement, but I think is better use |
The easiest way is probably to run EDIT: used the wrong variable name, should be
Makes sense, we're planning on supporting those as well! |
I'm trying to look content of Also, I don't know which relation are between GitHub Actions and Azure DevOps Pipelines, but in Azure we are taking the same |
Whoops, used the wrong variable name, should be |
Perfect, I'll hear you when the cache is updated 😉 |
@damccorm, is there any update on this? |
No, there was a bit of a mixup on our end on what exactly should be fixed - we're working towards a solution now though. Note that to get a consistent latest version of 8.x you can also specify |
Could we get this sorted? It's pretty non-standard to ship different Node.js versions based on the OS and this breaks due to 8.10.0 having an old npm which doesn't has the |
@damccorm can we get some movement on this? It's a pretty important issue. |
I also just hit this problem when migrating :/ |
I will look into this today |
With approximately weekly updates to the various images and node releasing versions independently, it means the images can have different versions. See: https://github.com/actions/virtual-environments#updates-to-the-virtual-environments Right now, we match 8 and 8.x to mean give me any version of 8. Issue #26 is related but still doesn't provide the fine grained control of "give me the latest 8" Options:
Either option will still not guarentee a consistent version as the variable job start times could cross a node release but it does narrow the window significantly. The only way to guarantee a consistent version would be to have one job that queries and resolves the version, sets an output is some fashion and a matrix of jobs that depend on that one (which all happen on different machines of different OSes). I think we're going with the second option. |
But this is only observed with 8.x on Windows. Every other OS and Node.js version follows the latest release, which IMO is what I'd expect. |
@XhmikosR - yes, that's why I created actions/runner-images#42 (that repo tracks issues with the VM images created for the hosted pools) But note, they release approximately weekly and not synchronized on cadence so it can and will occur again even if they update that image. The only option that drives a more recent and consistent toolset is the second option I outlined ☝️ |
From an outside view this seems like a bug. All my builds are green, just the one that's stuck on the old node version is not. |
Yes, actions/runner-images#42 is a bug with the image gen that has an old version cached. This actions just uses that. But the enhancement noted above will allow you to optionally bypass what's cached/installed and check for latest @ https://nodejs.org/dist/index.json (that's how azure pipelines solves the problem). |
^ I'll label it as both ;) |
This is pretty easy to workaround. The setup-node action uses |
According to actions/setup-node#27, we have to use semver format to install correct version.
Just hit this problem and was scratching my head for an hour. From the docs it seems like |
Can we really get this fixed? It's been so long since this inconsistency has been reported. |
|
Hello everyone. Thank you all for your response. Sorry for the late reply. I think the issue should be resolved according to this issue. If you have any concerns, feel free to ping us. |
Feature/Devpops-789
When setting up Node with the next strategy matrix and action from
v1
ormaster
:With Node 10 and 12, it works like a charm, installing
10.16.2
and12.8.0
respectively, using10
or'10.x'
and12
or'12.x'
, but with Node 8 using8
or8.x
it will not install the latest version in Windows. I made a table with the versions installed depending on the base system and the value in thenode_version
array specified:Windows is installing
8.10
when Ubuntu and MacOS install8.16
. If we force8.16
it will install it, but this is not scaling.The text was updated successfully, but these errors were encountered: