-
Notifications
You must be signed in to change notification settings - Fork 59
drop node 12 / matrix against current
, and latest 3 LTS
node versions
#369
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
Conversation
Co-authored-by: Nick Schonning <nschonni@gmail.com>
latest
, and latest 3 LTS
node versions
@@ -12,7 +12,11 @@ jobs: | |||
|
|||
strategy: | |||
matrix: | |||
node-version: [12.x, 14.x, 16.x] | |||
node-version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we'll get confused / have some unexpected behavior when these things turn over.
Like, the day that a new version gets added, what if CI starts failing? That would be annoying to fix without a hardcoded list. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected behavior when these things turn over
Because the matrix includes latest
, when lts/*
begins pointing to a new version, no failures should occur, because that new version would have already been tested, back when it was latest
. So floating version (viz. lts/-2
, lts/-1
, lts/*
) values ought to be safe.
That said, when latest
itself begins pointing to a new version, failures might occur. But if we remove latest
, then lts/*
loses the safety described above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when
latest
itself begins pointing to a new version, failures might occur
Here’s one workaround: For latest
(and only latest
), if any step of the job fails (failure()
), open an issue, then exit 0
, so the overall workflow run is still green.
So, we’d still be notified of failures, but they wouldn’t block PRs (unless another version is also failing), etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay! cool. I got this working!
Here's a sample failed run: https://github.com/github/eslint-plugin-github/actions/runs/3884555154, and the issue it created: #378
To test this I created a failing test 20e83a5 which I will now delete.
ad3520f
to
22e58b4
Compare
You seem to be going to a lot of effort just to avoid using the version numbers in the matrix. Those changes happen infrequentely and are also a good time to evaluated if major versions of things like ESLint need to change. They usually have a major bump when version support changes |
latest
, and latest 3 LTS
node versionscurrent
, and latest 3 LTS
node versions
8b73ee5
to
4f9be41
Compare
I'd suggest taking a look at what some of the community supported extensions do like https://github.com/eslint-community/eslint-plugin-promise/blob/main/.github/workflows/CI.yml |
Yeah maybe but it was a fun to work on little challenge and I learned some stuff 🤷
Note that |
Yeah, but that support likely needs to come from ESLint first. Their matrix is also explicit, and is used to test their supported versions https://github.com/eslint/eslint/blob/2952d6ed95811ce0971b6855d66fb7a9767a7b72/package.json#L168-L170 |
Anyway, I'm going to unsubscribe from this as I think we're bikeshedding at this point, and it's not worth either of our time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question not blocking.
run: npm test | ||
continue-on-error: ${{ matrix.node-version == 'current' }} | ||
- name: Create Issue on Fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to create a new issue on every failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will. Can you think of a way to improve that?
Maybe this is all too much. Dropping this dynamic approach in favour of #380 It was still a fun little project. |
I noticed in this PR that tests are failing in node 12 but running successfully in node 14, 16, and 18.
Given that node 12 is End-of-Life while 18 is LTS, I think we should just drop testing again 12.
I also changed the matrix to dynamically test against:
latest
current
† (v19),lts/*
(v18 is current LTS),lts/-1
(v16), andlts/-2
(v14). See node release schedule. This way these will update as node versions roll along.There was concern that the dynamic nature would cause confusion when node versions rolled over. To counter-act this, @smockle had the great idea to create an issue when tests start failing on
current
. So I've set that up:When tests fail on
current
, wecontinue-on-error
(meaning the job stays green). Instead we create an issue. Here's an example of that: #378† Note: I was originally using
latest
but switched tocurrent
. These are aliases, but I switched tocurrent
as that's the word used in the node release schedule.