-
Notifications
You must be signed in to change notification settings - Fork 274
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
Migrate to Node 20 #962
base: releases/5.x
Are you sure you want to change the base?
Migrate to Node 20 #962
Conversation
@@ -30,6 +30,8 @@ Use the details below to determine when specific agent features were added: | |||
- Added in 2.144.0. Used node v10.x | |||
* `node16` handler | |||
- Added in 2.206.1. Used node v16.x | |||
* `node20` handler | |||
- Added in 3.225.0. Used node v20.x |
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.
We supported node20 handler in this PR, and it's published in release 3.224.0, not sure if here we will require minimum agent version to be >= 3.224.0 to enable node20 support.
cc: @DmitriiBobreshev
node/mock-test.ts
Outdated
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.
Should we make node20 the default node version in this file? The default is node 16.
azure-pipelines-task-lib/node/mock-test.ts
Line 177 in 49efa4e
console.warn('Unable to find task.json, defaulting to use Node 16'); |
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, we should since 5.x version uses for node20, if users needs only node16 support and below they can use 4.x version
node/package.json
Outdated
"@types/q": "^1.5.4", | ||
"@types/semver": "^7.3.4", | ||
"@types/shelljs": "^0.8.8", |
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.
How to ensure that the devDependencies in package.json are bumped up as needed? Node20 required typescript version upgrade, we update typescript version to latest 5.1.6 in node 20 tasks, I put same version here and then run 'npm update' command. But I'm not sure if any other dev dependencies require updates.
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.
you could use some third-party tools like npm-check to validate that everything is fine
@qianz2 how were these changes tested? |
Hi @max-zaytsev, I didn't see ways to test these changes other than the existing check azure-pipelines-task-lib. I think we'll use this new release preview version in tasks, then running task tests to ensure they'll work with node20 tasks. |
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "azure-pipelines-task-lib", | |||
"version": "4.4.0", | |||
"version": "5.4.0", |
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 believe we should start from the preview version as we did with the node16 migration
important notice - node20 isn't supported on Ubuntu 18.04 - see nodesource When you setup node20 as default runner, it crashes all current production environments with Ubuntu 18.04. |
The changes in this PR is tentative, all migrated tasks are working well without bumping and upgrading this task-lib, same as for the tool-lib PR that I initiated, we've planned to create release branches and check changes to master, but they're not blocking the migration as far as I know. So I will hold it for now, eventually we'll check it in. |
@@ -429,6 +435,9 @@ | |||
"additionalProperties": false, | |||
"description": "Execution options for this task (on Post-Job stage)", | |||
"properties": { | |||
"Node20": { | |||
"$ref": "#/definitions/executionObject" | |||
}, | |||
"Node16": { | |||
"$ref": "#/definitions/executionObject" |
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.
[not related to this line] releases/5.x is used for other changes - we'll need to re-target these changes
Hi @merlynomsft @qianz2, is it possible to have a status update for this PR? |
e3fb712
to
90caa3f
Compare
59c04b5
to
8b3f34d
Compare
Task description
In order to migrate tasks to the Node20 execution handler, we have to update the pipelines-task-lib itself to support the Node20 runtime.
Changelog