Skip to content
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

chore: unpin primary node version in ci #8167

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

auvred
Copy link
Member

@auvred auvred commented Jan 2, 2024

PR Checklist

Overview

Sendind as draft to see if this solves the issue

UPD: marking as ready for review (I hope issue will get accepting prs label soon)


Currently CI fails because of #8164 and #8131, so we can't check if codecov report will be uploaded or not :(

UPD: it works: https://github.com/typescript-eslint/typescript-eslint/actions/runs/7412569798/job/20170379090

Codecov bot is not sending a coverage report to this PR because it can't find previous report from main (I assume this is because the last report was uploaded in september):

https://app.codecov.io/gh/typescript-eslint/typescript-eslint/pull/8167

why codecov isn't uploading report

Ohh, 729 commits on main without coverage reports

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @auvred!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Jan 2, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 0812265
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/659b8d017444f40008faba92
😎 Deploy Preview https://deploy-preview-8167--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 90 (🔴 down 9 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@auvred auvred marked this pull request as ready for review January 5, 2024 12:16
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for hopping onto this! I think I'd rather a more pin-oriented fix direction if we can make it?

@@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

env:
PRIMARY_NODE_VERSION: '>=20.6.1'
PRIMARY_NODE_VERSION: 20
Copy link
Member

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.

Copy link
Member Author

@auvred auvred Jan 13, 2024

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 :(

You can use the env context in any key in a workflow step except for the id and uses keys.

^ Ref: GitHub docs


I'd rather not unpin a version and introduce unexpected version changes if we can avoid it.

On main branch (with pinned PRIMARY_NODE_VERSION: '>=20.6.1') actions/setup-node@v3 action downloads v20.10.0

Run actions/setup-node@v3
  with:
    node-version: >=20.6.1
    always-auth: false
    check-latest: false
    token: ***
  env:
    PRIMARY_NODE_VERSION: >=20.6.1
    NX_CLOUD_ACCESS_TOKEN: ***
Found in cache @ /opt/hostedtoolcache/node/20.10.0/x64
Environment details
  node: v20.10.0
  npm: 10.2.3
  yarn: 3.7.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 than v20.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, whether PRIMARY_NODE_VERSION is pinned or not


If we decide to leave it pinned and not touch it (I'd rather change it 😄), then we should use something scary like

startsWith(env.PRIMARY_NODE_VERSION, format('>={0}', matrix.node-version))

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

Copy link
Member

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. 😂

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Jan 11, 2024
@github-actions github-actions bot removed the awaiting response Issues waiting for a reply from the OP or another party label Jan 13, 2024
@bradzacher bradzacher added the repo maintenance things to do with maintenance of the repo, and not with code/docs label Jan 28, 2024
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! 🚀

@JoshuaKGoldberg JoshuaKGoldberg merged commit b37f9da into typescript-eslint:main Jan 30, 2024
63 of 64 checks passed
danvk pushed a commit to danvk/typescript-eslint that referenced this pull request Feb 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo: codecov coverage reports are not longer uploaded
3 participants