-
Notifications
You must be signed in to change notification settings - Fork 61
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: upgrade node version #14985
chore: upgrade node version #14985
Conversation
Co-authored-by: Jón Levy <levy@andes.is>
Co-authored-by: Jón Levy <levy@andes.is>
Co-authored-by: Jón Levy <levy@andes.is>
Co-authored-by: Jón Levy <levy@andes.is>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Jón Levy <levy@andes.is>
Co-authored-by: Jón Levy <levy@andes.is>
Co-authored-by: Jón Levy <levy@andes.is>
Datadog ReportAll test runs ✅ 101 Total Test Services: 0 Failed, 99 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (10)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14985 +/- ##
==========================================
+ Coverage 37.12% 37.13% +0.01%
==========================================
Files 6390 6390
Lines 130064 130002 -62
Branches 37107 37074 -33
==========================================
Hits 48282 48282
+ Misses 81782 81720 -62
Flags with carried forward coverage won't be shown. Click here to find out more. see 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Actionable comments posted: 2
Outside diff range and nitpick comments (2)
.github/actions/main.ts (2)
Line range hint
15-15
: Refactor to avoid non-null assertions to enhance code safety.- let git = new SimpleGit(process.env.REPO_ROOT!, process.env.SHELL!) + let git = new SimpleGit(process.env.REPO_ROOT, process.env.SHELL) + if (!process.env.REPO_ROOT || !process.env.SHELL) { + throw new Error('Required environment variables REPO_ROOT or SHELL are not set.'); + }Also applies to: 24-24, 25-25, 26-26, 27-27, 33-33, 34-34, 35-35
Line range hint
4-5
: Consider importing only the necessary parts of modules to optimize bundle size.- import { LocalRunner } from './ci-io' - import { findBestGoodRefBranch, findBestGoodRefPR } from './change-detection' - import { Octokit } from '@octokit/action' - import { SimpleGit } from './simple-git' - import { WorkflowID } from './git-action-status' + import type { LocalRunner } from './ci-io' + import type { findBestGoodRefBranch, findBestGoodRefPR } from './change-detection' + import type { Octokit } from '@octokit/action' + import type { SimpleGit } from './simple-git' + import type { WorkflowID } from './git-action-status'
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (6)
- .github/actions/change-detection.ts (1 hunks)
- .github/actions/dist/main.js (2 hunks)
- .github/actions/main.ts (1 hunks)
- .github/workflows/pullrequest.yml (8 hunks)
- .github/workflows/push.yml (14 hunks)
- scripts/ci/_nx-affected-targets.sh (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- .github/workflows/pullrequest.yml
- .github/workflows/push.yml
- scripts/ci/_nx-affected-targets.sh
Additional Context Used
Biome (21)
.github/actions/change-detection.ts (10)
77-77: This type annotation is trivially inferred from its initialization.
116-204: Promise executor functions should not be
async
.
139-139: Do not use template literals if interpolation and special-character handling are not needed.
141-141: Do not use template literals if interpolation and special-character handling are not needed.
191-191: Do not use template literals if interpolation and special-character handling are not needed.
193-193: Do not use template literals if interpolation and special-character handling are not needed.
202-202: Do not use template literals if interpolation and special-character handling are not needed.
1-1: All these imports are only used as types.
1-2: All these imports are only used as types.
174-174: This let declares a variable that is only assigned once.
.github/actions/main.ts (11)
15-15: Forbidden non-null assertion.
15-15: Forbidden non-null assertion.
24-24: Forbidden non-null assertion.
25-25: Forbidden non-null assertion.
26-26: Forbidden non-null assertion.
27-27: Forbidden non-null assertion.
33-33: Forbidden non-null assertion.
34-34: Forbidden non-null assertion.
35-35: Forbidden non-null assertion.
4-5: All these imports are only used as types.
15-15: This let declares a variable that is only assigned once.
Affected services are: air-discount-scheme-api,air-discount-scheme-backend,api,application-system-api,download-service,financial-aid-api,financial-aid-backend,financial-aid-open-api,github-actions-cache,icelandic-names-registry-backend,judicial-system-api,judicial-system-digital-mailbox-api,judicial-system-backend,judicial-system-message-handler,judicial-system-robot-api,judicial-system-scheduler,judicial-system-xrd-api,license-api,reference-backend,regulations-admin-backend,services-auth-admin-api,services-auth-delegation-api,services-auth-ids-api,services-auth-personal-representative,services-auth-personal-representative-public,services-auth-public-api,services-contentful-entry-tagger,services-documents,services-endorsements-api,services-search-indexer,services-sessions,services-university-gateway,services-user-notification,services-user-profile,services-xroad-collector,skilavottord-ws,air-discount-scheme-web,auth-admin-web,consultation-portal,contentful-apps,financial-aid-web-osk,financial-aid-web-veita,judicial-system-web,skilavottord-web,web,application-system-form,island-ui-storybook,portals-admin,service-portal,system-e2e,external-contracts-tests, |
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.
LGTM
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (3)
.github/actions/main.ts (3)
Line range hint
15-15
: Refactor to avoid non-null assertions and improve readability.- let git = new SimpleGit(process.env.REPO_ROOT!, process.env.SHELL!) + let git = new SimpleGit(process.env.REPO_ROOT, process.env.SHELL) + if (!process.env.REPO_ROOT || !process.env.SHELL) { + throw new Error('Required environment variables REPO_ROOT or SHELL are not set.'); + }
Line range hint
24-27
: Refactor to avoid non-null assertions infindBestGoodRefPR
andfindBestGoodRefBranch
calls.- `'${process.env.HEAD_REF!}'`, - `'${process.env.BASE_REF!}'`, - `'${process.env.PR_REF!}'`, - process.env.WORKFLOW_ID! as WorkflowID, + process.env.HEAD_REF ? `'${process.env.HEAD_REF}'` : throw new Error('HEAD_REF is not set'), + process.env.BASE_REF ? `'${process.ENV.BASE_REF}'` : throw new Error('BASE_REF is not set'), + process.env.PR_REF ? `'${process.env.PR_REF}'` : throw new Error('PR_REF is not set'), + process.env.WORKFLOW_ID ? process.env.WORKFLOW_ID as WorkflowID : throw new Error('WORKFLOW_ID is not set'),
Line range hint
33-35
: Refactor to avoid non-null assertions inrev.branch
andrev.ref
assignments.- rev.branch = rev.branch.replace(/'/g, '') - rev.ref = rev.ref.replace(/'/g, '') + if (rev && rev.branch && rev.ref) { + rev.branch = rev.branch.replace(/'/g, '') + rev.ref = rev.ref.replace(/'/g, '') + } else { + throw new Error('Revision data is incomplete or not set.'); + }
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- .github/actions/dist/main.js (2 hunks)
- .github/actions/main.ts (1 hunks)
- .github/workflows/push.yml (15 hunks)
- scripts/ci/_nx-affected-targets.sh (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- .github/workflows/push.yml
- scripts/ci/_nx-affected-targets.sh
Additional context used
Biome
.github/actions/main.ts
[error] 15-15: Forbidden non-null assertion.
[error] 15-15: Forbidden non-null assertion.
[error] 24-24: Forbidden non-null assertion.
[error] 25-25: Forbidden non-null assertion.
[error] 26-26: Forbidden non-null assertion.
[error] 27-27: Forbidden non-null assertion.
[error] 33-33: Forbidden non-null assertion.
[error] 34-34: Forbidden non-null assertion.
[error] 35-35: Forbidden non-null assertion.
[error] 4-5: All these imports are only used as types.
[error] 15-15: This let declares a variable that is only assigned once.
Additional comments not posted (1)
.github/actions/main.ts (1)
10-10
: Ensure that the environment variables are properly set before proceeding.Verification successful
The environment variables
NX_AFFECTED_ALL
andTEST_EVERYTHING
are properly set in the GitHub Actions workflow files (push.yml
andpullrequest.yml
). This ensures that the condition in the script at.github/actions/main.ts
will function as intended.
.github/workflows/push.yml
.github/workflows/pullrequest.yml
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the environment variables `NX_AFFECTED_ALL` and `TEST_EVERYTHING` are set in the GitHub Actions workflow files. # Test: Search for the environment variable setup in workflow files. Expect: Proper setup of these variables. rg --type yaml 'NX_AFFECTED_ALL|TEST_EVERYTHING' .github/workflows/Length of output: 942
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.
Actionable comments posted: 1
Outside diff range and nitpick comments (2)
.github/actions/main.ts (2)
Line range hint
18-18
: Refactor to avoid non-null assertions and improve code safety.- let git = new SimpleGit(process.env.REPO_ROOT!, process.env.SHELL!) + const git = new SimpleGit(process.env.REPO_ROOT, process.env.SHELL) + if (!process.env.REPO_ROOT || !process.env.SHELL) { + throw new Error('Required environment variables REPO_ROOT or SHELL are not set.'); + }Also applies to: 27-30, 36-38
Line range hint
36-38
: Optimize the replacement of single quotes inrev
object properties.- rev.branch = rev.branch.replace(/'/g, '') - rev.ref = rev.ref.replace(/'/g, '') + rev.branch = rev.branch.replaceAll("'", "") + rev.ref = rev.ref.replaceAll("'", "")
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- .github/actions/main.ts (1 hunks)
- .github/workflows/push.yml (14 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/push.yml
Additional context used
Biome
.github/actions/main.ts
[error] 18-18: Forbidden non-null assertion.
[error] 18-18: Forbidden non-null assertion.
[error] 27-27: Forbidden non-null assertion.
[error] 28-28: Forbidden non-null assertion.
[error] 29-29: Forbidden non-null assertion.
[error] 30-30: Forbidden non-null assertion.
[error] 36-36: Forbidden non-null assertion.
[error] 37-37: Forbidden non-null assertion.
[error] 38-38: Forbidden non-null assertion.
[error] 4-5: All these imports are only used as types.
[error] 18-18: This let declares a variable that is only assigned once.
Additional comments not posted (1)
.github/actions/main.ts (1)
10-13
: LGTM! Verify that the environment variablesNX_AFFECTED_ALL
andTEST_EVERYTHING
are correctly set in all deployment configurations.Verification successful
The environment variables
NX_AFFECTED_ALL
andTEST_EVERYTHING
are correctly set in the deployment configurations.
.github/workflows/push.yml
.github/workflows/pullrequest.yml
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the environment variables are set in all deployment configurations. # Test: Search for environment variable settings in deployment configurations. Expect: Proper settings in all configurations. rg --type yaml 'NX_AFFECTED_ALL|TEST_EVERYTHING' .github/workflows/Length of output: 942
...
Attach a link to issue if relevant
What
Specify what you're trying to achieve
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
New Features
NODE_IMAGE_TAG
for dynamic Node.js versioning in Docker builds.Updates
v4
for better compatibility.20.11.4
to20.12.12
.Improvements
Bug Fixes