Skip to content
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

Rollback to nvm 0.33.11 and specify default Node version (16) #732

Merged
merged 4 commits into from
May 16, 2022

Conversation

akash1810
Copy link
Member

@akash1810 akash1810 commented May 10, 2022

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:

image

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:

How can we measure success?

  • Bakes should start working again, so we can pick up OS updates (and meet our SLO!)
  • Builds should continue working as normal

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.

akash1810 and others added 4 commits May 10, 2022 16:15
`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 jacobwinch changed the title Nvm things Rollback to nvm 0.33.11 and fix bakes May 16, 2022
@jacobwinch jacobwinch marked this pull request as ready for review May 16, 2022 13:02
@jacobwinch jacobwinch requested a review from a team as a code owner May 16, 2022 13:02
@jacobwinch jacobwinch changed the title Rollback to nvm 0.33.11 and fix bakes Rollback to nvm 0.33.11 and specify default Node version (16) May 16, 2022
@jacobwinch jacobwinch merged commit 31e20fe into main May 16, 2022
@jacobwinch jacobwinch deleted the nvm-things branch May 16, 2022 13:54
@jacobwinch
Copy link
Contributor

I've baked an AMI which includes this change:

image

TeamCity builds (including a dotcom-rendering build) seem to be working as expected 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants