Rollback to nvm 0.33.11 and specify default Node version (16) #732
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
nvm
version 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:
CODE
How 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
nvm
anyway.We expect most builds to be specifying their own Node version (via
.nvmrc
or similar) anyway, so I don't think that hardcoding the default version here matters too much.