CircleCI-Public / cimg-node

The CircleCI Node.js Docker Convenience Image.
https://circleci.com/developer/images/image/cimg/node
MIT License
41 stars 33 forks source link

major version tags #78

Closed ricoli closed 4 years ago

ricoli commented 4 years ago

Would it be possible to also publish tags just with the major version, as currently done in circleci/node? For example, cimg/node:10 and cimg/node:12.

nikolaik commented 4 years ago

Excellent suggestion. It makes sense to allow sticking to a major version with no breaking changes, but still get bugfixes and features/performance improvements

mikemaccana commented 4 years ago

Same here. We don't want lts since that would mean a 12-14 upgrade when lts changes, but we do want to test on the latest 12.

colinbjohnson commented 4 years ago

One of the companies I work with has node standards that define "always use the latest major version of node" as the feel comfortable having automatically incremented minor and patch versions but not major versions.

FelicianoTech commented 4 years ago

There's no current plans to do this. This is something we're aware of though and will be considering depending on future feedback.

There's two main reasons why don't have this currently:

  1. It would be expected that breaking changes etc could break our builds but believe it or not it's no always obvious. It's not always the case and we've had many complains with users of legacy images and other things where this occurs.
  2. There's a small technical challenge as to what is "latest". For many language projects including Node.js, they will publish patch releases for older series. For example, when Node.js v15.2, the major version tag request here would be 15 and would point to Node.js v15.2.0. If Node.js decided to do a patch release for the v15.0 series, that version would be v15.0.2. Our system, would then update the major tag 15 to point to that release, which isn't what you would want. When we support release candidate and beta versions in the future, it makes this issue more complicated.
colinbjohnson commented 4 years ago

In regards to item 2 - I think I could submit a PR for this that'd properly fetch the latest "minor.patch" for each "major" version. I think the logic would look like:

  1. List all node versions in https://nodejs.org/dist/latest-v14.x/ (or https://nodejs.org/dist/latest-v12.x/, etc)
  2. Identify the node version matching regex node-v.*-linux-x64.tar.xz
  3. Download that node version and install.

Two stumbling blocks, but otherwise I'd be good:

mvxt commented 4 years ago

Hi all, I've created an idea for this in the features suggestion portal for CircleCI. Please vote for this idea so that we can gauge what the demand is: https://ideas.circleci.com/images/p/re-introduce-latest-tags-for-next-gen-convenience-images