Rollback to nvm 0.33.11 and specify default Node version (16)#732
Merged
jacobwinch merged 4 commits intomainfrom May 16, 2022
Merged
Rollback to nvm 0.33.11 and specify default Node version (16)#732jacobwinch merged 4 commits intomainfrom
jacobwinch merged 4 commits intomainfrom
Conversation
This reverts commit de105e1.
`nvm --lts` appears to be installing Node v18. Node 18 has switched the version of `glibc`, and the version it wants does not seem to be present on the AMI. Given Node 18 enters a formal LTS in Oct 2022, and builds should be individually managing their node version, this change removes any system wide install of node. See: nodejs/node#42659
We were getting errors when attempting to start TeamCity: N/A: version "N/A -> N/A" is not yet installed. teamcityagent.service: Control process exited, code=exited status=3 You need to run "nvm install N/A" to install it before using it. It looks like the default version is not wired up correctly: nvm ls v16.15.0 default -> lts/Gallium (-> N/A)
jacobwinch
approved these changes
May 16, 2022
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this change?
We recently attempted to upgrade
nvm(partly to keep things up to date and partly in an attempt to fix failing AMIgo bakes): #389.Although this fixed the AMIgo bakes, it caused unexpected problems with many of our builds.
This PR reverts to
nvmversion 0.33.11* and updates the way that we install the default version of Node to workaround the problems that we were seeing with our AMIgo bakes.The old method installed the 'current' (i.e. latest) version of Node and the latest version of Node under long-term-support. Recently, the 'current' version of Node has changed to Node 18:
The fact that we are now trying to install Node 18 seems to have caused the breakage with baking AMIs - see this similar issue. This non-deterministic approach can be a bit confusing; the AMIgo bakes just 'started failing', even though we didn't change anything deliberately on our side.
As a result, we now explicitly install Node 16 as the default version.
*We know that this version works with our builds and there are a few confusing factors at play here, so we're trying to eliminate some variables - we should update it later (via a separate PR)
How to test
We have:
CODEHow can we measure success?
Have we considered potential risks?
This should be pretty low risk; we have manually rolled back to an old AMI already, so none of our active agents are using the newer version of
nvmanyway.We expect most builds to be specifying their own Node version (via
.nvmrcor similar) anyway, so I don't think that hardcoding the default version here matters too much.