Open Benaiah opened 3 years ago
I can see the motivation to remove older software versions, but Ruby 2.6 and Python 2.7 are the defaults in Trusty and Xenial, which means that nearly all existing sites are pinned to those versions, including, of course, sites that don't even use Ruby or Python. We don't have a way to install Python versions on demand, so if we removed 2.7, we would basically guarantee that nearly every upgrade to Focal would result in a failed build.
With this in mind, I don't think we can remove these versions until we change how versions are pinned. I'd like to prioritize doing https://github.com/netlify/pod-workflow/issues/255 as soon as possible as an initial improvement, and then we can consider other solutions as discussed in https://github.com/netlify/bitballoon/issues/9481.
On the other hand, I don't think we should consider this a blocker for defaulting new sites to using Focal. Xenial has been EOL for over 4 months, and customers are complaining that our only non-EOL image is still marked as "beta". Every new site that's created on Xenial now is another site that will have to be migrated to Focal when we deprecate Xenial later this year. A 4.5% larger build image is an acceptable tradeoff in the face of those issues.
Hm, perhaps there's one other alternative to reduce the image size without breaking so many builds. We could remove Python 3.9 and Ruby 2.7. The next highest versions on the image (Python 3.8 and Ruby 2.6) are supported, so it still meets the goal of defaulting to supported versions, while reducing the number of installed versions.
If the changes in https://github.com/netlify/build-image/pull/588 and https://github.com/netlify/bitballoon/pull/10222 had been released, this would be a breaking change for sites on Focal, but it seems they haven't been released yet, so we have a little window to make this change if image size reduction is a priority.
@verythorough I don't think we should remove ruby 2.7 because we don't have a recent 2.x alternative that is not too old so we would pay the install penalty for those sites on first run (2.6.7 is for supporting some customers that still need this version and can't update to 2.7). 3.x is still new enough, we don't even use it. if we wanna remove something, I vote for ruby 3.x and adding it at a later time, and zapping 2.6.x
cc @Benaiah
I'm ok with zapping python 3.9 tho.
I also think this is not the end of the world right this second. I would see adressing the image size by allowing customers to install more of their own dependencies and better understanding what is used and what is not.
I don't love the idea of removing ruby 3 and python 3.9, but I think it's the best opportunity for reducing the image size that we have available at the moment. I'll get a new PR up removing those two from the image, since I already merged the existing PR upgrading software versions
I also discussed with @ingride this morning the possibility of not preinstalling any version of node, because the likelihood of users actually using that preinstalled version instead of a cached version is quite low (this is because the preinstalled version of node is now dependent on when the build-image was built, and won't necessarily match the latest version of 16
which is what we will be specifying once https://github.com/netlify/bitballoon/pull/10222 is merged and released). That's not a breaking change, however, so we can do that at any time.
The PR updating software versions in focal (#588) increases the build image size by ~4.5%. We may want to consider dropping old software versions such as Python 2 or Ruby 2.6 to reduce the size of the build image. Ideally, these would still be installable at build time for customers who require them, just not included by default in the build image.