Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hmm, can we go the other way? Changing
node-version
to be 16 and the pinned primary node version?According to https://github.com/orgs/community/discussions/26388 and https://stackoverflow.com/questions/74072206/github-actions-use-variables-in-matrix-definition it's not a straightforward [
16, ${{ env.PRIMARY_NODE_VERSION }}
] 🙃 ...[16, "$PRIMARY_NODE_VERSION"]
might not work either then. I haven't tried it.So maybe a
startsWith
kind of check is necessary?I'd rather not unpin a version and introduce unexpected version changes if we can avoid it.
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 looks like we can't use
env
context in matrix definition :(^ Ref: GitHub docs
On
main
branch (with pinnedPRIMARY_NODE_VERSION: '>=20.6.1'
)actions/setup-node@v3
action downloadsv20.10.0
So I think it's safe to unpin it!
It was pinned in this commit 2a03e44 only two days later when
v20.6.1
was released https://github.com/nodejs/node/releases/tag/v20.6.1. I guess it was the only way to force it to be higher thanv20.6.0
(For some reason website tests were failing without Node.js being pinned (workflow runs))But now the latest
v20.x.x
version of Node.js is used, whetherPRIMARY_NODE_VERSION
is pinned or notIf we decide to leave it pinned and not touch it (I'd rather change it 😄), then we should use something scary like
So, what do you think? Leaving it pinned makes sense to me as well, so if you decide to leave it pinned, I'll change all comparison expressions to
startsWith
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.
Yeah that makes sense. My hesitation around unpinning is that I don't like "surprise" Node version bumps... ideally we'd have an exact version that gets updated over time the way Renovate bumps our versions of dependencies.
...but since we're already not doing that I think this is a straightforward bug fix. 😂