Follow-up from "chore: Upgrade node.js from 16.15.0 to 18.19.0"
Description
The following discussion from !279 (merged) should be addressed:
-
@ealcantara started a discussion: (+3 comments) note We are basing the new vscode-build image on Docker's official nodejs image. We don't have to install node and yarn anymore
😄 . -
@cwoolley-gitlab responded: I know that there was a performance reason (albeit a sneaky hidden one) for this decision, but this makes sense. Since the vscode image already includes
node
andyarn
, we definitely don't want to do this twice😅 Whenever we have time to prioritize optimization, we can revisit it
👍 I think it was to ensure that we had complete control over the versions of node and yarn used, to prevent unexpected breakages if we just accept the versions on the images.
The general philosophy is that we want to lock down all the dependency versions that we can, otherwise you get unpredictably flaky builds due to floating dependency versions.
I would recommend that we add these lines back, and then reintroduce a custom
nodeless
version of the standard debian image that we are now using.Or alternately, ensure that we lock down the image we are using to a specific tag (gitlab-build-images!760 (diffs)).
But that is less preferable because then if there is a problem with the version in the image, we are still stuck and unable to have control to use a different one.
So I would suggest the former approach of maintaining a "nodeless" version of whatever upstream image we use and installing the ENV-var specified versions here (and caching them, as we already do).
Also from:
-
@ealcantara @pslaughter @vtak I think we should consider still maintaining a "nodeless" version of whatever upstream image we use. See more context here: