I noticed that some of the default language versions in Focal's included software list are EOL. I think it's great to provide ways for users to run/install older versions to help ease migration from Trusty and Xenial, but it would be great to get new sites started with current supported versions.
Here are a few that I've noted:
In some cases, it may be that the included software list is just out of sync with the actual behavior, in which case we can just update the doc. In others, I think we'll want to update the build script, too. Let me know if I'm missing something!
Imma reassign this to myself when i actually start working on it, just in case someone else might wanna do it
@ingride @verythorough how do you feel about splitting this into separate issues, one for each of the dependencies?
I don't mind, you might wanna do them all at once tho because the build image takes so long to build, test, and release that multiple PRs are actually a disadvantage here.
Ruby 2.6 is still supported, but our default version is 2.6.2, while the latest patch is 2.6.7. Is it possible/advisable to pin Ruby to minor versions instead of a specific patch?
In the Dockerfile we specify that we kept 2.6.2 because many customers are pinned to it. We should check this is still true. But for the purpose of this, which is new sites before defaulting for everyone, we can prolly move to a patch, and it should be ok for people to move from 2.6.2 to this version by changing their env vars. But we might wanna keep a 2.6.x along with 2.7.x rather than removing 2.6.x altogether.
Go 1.12 hit EOL in Feb 2019.
We actually have Go 1.14.4 https://github.com/netlify/build-image/blob/focal/Dockerfile#L390 . We'd probably be ok going to latest.
Python 2.7
Python is hard to migrate from 2.x to 3.x but maybe that's ok that we don't support it anymore.
To be clear, my priority with this issue is for the _defaults_, which only apply to new sites, and can be overridden with env vars, etc. if other versions are available.
As for whether we keep older versions available for easier migration of existing sites, I'm cool with y'all making the cost-benefit analysis of weighing that against the risk of a sudden upstream support change upending our ability to deploy the image.
In the Dockerfile we specify that we kept 2.6.2 because many customers are pinned to it. We should check this is still true. But for the purpose of this, which is new sites before defaulting for everyone, we can prolly move to a patch, and it should be ok for people to move from 2.6.2 to this version by changing their env vars. But we might wanna keep a 2.6.x along with 2.7.x rather than removing 2.6.x altogether.
@ingride are you suggesting we install all of 2.6.2, 2.6.x, and 2.7.x in the Dockerfile? This makes sense to me because of the number of sites pinned to 2.6.2 which would get an upgrade path to 2.6.x that won't slow down their builds. What do you think about also installing 3.0.x? That seems unnecessary to me but perhaps we'd want it preinstalled to encourage people to use it if they can.
the latest [Ruby] patch is 2.6.7
For some reason, the latest version that is seen by rvm is 2.6.6. I'm not sure why this is, because 2.6.7 was released on April 5. See rvm list known and rvm strings 2.6. If we decide to start defaulting to 2.6.x instead of a particular patch version this shouldn't be an issue.
Regarding Node, I think we should install and default to 14.17.x. Node 14 is the current LTS release and does not reach EOL until 2023-04-30. We may want to also install 16.3.x, since 16 will become the LTS release in October. The best-supported solution would be to default to 14.x.x but I worry that this presents a small risk of builds breaking without changes to the build or pinned versions.
Regarding Python, I agree that we should start defaulting to 3. If we're already changing the defaults, I feel like we should consider using 3.9.x, which is supported thru October 2025.
Regarding Go, I think we should update the default to 1.16.x, the newest version. Go is remarkably backwards compatible and, as @verythorough pointed out, most people using Go in their build aren't even going to use the Go compiler that's installed by us, since things like Hugo typically come as a pre-compiled binary. EDIT: the primary use of our installed Go runtime is likely to be building people's Go functions, though this is a pretty small set of users compared to those using JS functions.
I don't have any particular preferences on Elixir support. We're not actually pinning the Elixir version in any way or supporting the user pinning it - all we do is install esl-erlang (this is the "complete installation" of erlang) and elixir using apt-get. For example, when building the build-image locally just now, the version of Elixir I ended up with was 1.12.0 using Erlang/OTP 24 and erts 12.0.2. I would be fine with continuing the current behavior of using the Erlang and Elixir versions that happened to be available thru apt-get at the time the build image was last built. I suspect the number of users using Elixir is pretty low, or we would likely have had someone complaining about a build breaking due to the unpinned version by now. I'll update the list of included software to note that the version of Elixir contained is whatever was in apt-get when the build-image was built.
This might be more work than we want to do right now, but I imagine it could be somewhat useful to replace the included_software.md file with a site that calls the various pre-installed language runtimes to get the actual current versions of all these languages in the build-image. This would prevent the list of included software from getting out of sync with the build image or out of date.
@ingride @vbrown608 @ehmicky do you have any thoughts on my suggestions here?
Regarding Node, ... The best-supported solution would be to default to
14.x.xbut I worry that this presents a small risk of builds breaking without changes to the build or pinned versions.
We pinned/installed Node at the major level for most of Netlify's history, only switching to a specific patch version 14 months ago. I can't find the reasoning for switching to a specific patch version, but it seems that based on our previous history, the failure risk is low? Curious what folks like @ehmicky think about this.
This might be more work than we want to do right now, but I imagine it could be somewhat useful to replace the
included_software.mdfile with a site that calls the various pre-installed language runtimes to get the _actual_ current versions of all these languages in thebuild-image. This would prevent the list of included software from getting out of sync with the build image or out of date.
That would be cool indeed! Every time I look at those files I find a new discrepancy. Agreed that it might not be worth the effort right now, though. For a short-term/low-effort alternative, perhaps we add something about updating that file to the PR template?
We pinned/installed Node at the major level for most of Netlify's history, only switching to a specific patch version 14 months ago. I can't find the reasoning for switching to a specific patch version, but it seems that based on our previous history, the failure risk is low? Curious what folks like @ehmicky think about this.
Yes, I think the risk of not pinning the minor version is very low compared to the benefits of it. Node.js is pretty good about semver. Also, bug fixes and security fixes might come in a later minor version of the current major release, so pinning the minor version might prevent from getting those. Based on this, in my opinion, we might prefer defaulting to 14.x.x instead of 14.17.x.
@Benaiah, by 2.6.x I meant only having one 2.6 version, not all of them, but definitely at least one, along with the 2.7 versions. I think 3.0 could be nice to have, but could also be done at a later stage.
No strong opinion on 2.6.6 vs 2.6.7, theoretically rvm knows how to install from source even if the binary is not available - I did that locally, but it's probably too slow to consider, so 2.6.6 sounds good to me.
rvm install 2.6.7
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/11.2/x86_64/ruby-2.6.7.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system......
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libksba, zlib............
Certificates bundle '/usr/local/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/ingride/.rvm/rubies/ruby-2.6.7, this may take a while depending on your cpu(s)...
ruby-2.6.7 - #downloading ruby-2.6.7, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13.4M 100 13.4M 0 0 28.5M 0 --:--:-- --:--:-- --:--:-- 28.4M
ruby-2.6.7 - #extracting ruby-2.6.7 to /Users/ingride/.rvm/src/ruby-2.6.7.....
ruby-2.6.7 - #configuring.............
@Benaiah is there a draft PR for the changes?
@ingride I'll have one up later today.
I have a draft PR up at https://github.com/netlify/build-image/pull/588 now. To summarize the changes:
pipenv (instead of 2.7).I'm going to investigate what will happen if we specify some of these versions at a level higher than the patch version. The existing PR pins to the current patches for each version instead of not specifying them - I don't think we reached a conclusion on which we want to do moving forward.
Most helpful comment
To be clear, my priority with this issue is for the _defaults_, which only apply to new sites, and can be overridden with env vars, etc. if other versions are available.
As for whether we keep older versions available for easier migration of existing sites, I'm cool with y'all making the cost-benefit analysis of weighing that against the risk of a sudden upstream support change upending our ability to deploy the image.