Skip to content

Commit

Permalink
[8.x] Upgrade Node.js to 20.18.2 (#207431) (#207894)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [Upgrade Node.js to 20.18.2
(#207431)](#207431)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Jon","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-22T18:00:14Z","message":"Upgrade
Node.js to 20.18.2
(#207431)\n\nhttps://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md","sha":"89b763a4996afcf380fb68f345ca6da3f08669ba","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","Team:Fleet","v9.0.0","backport:all-open"],"title":"Upgrade
Node.js to
20.18.2","number":207431,"url":"https://github.com/elastic/kibana/pull/207431","mergeCommit":{"message":"Upgrade
Node.js to 20.18.2
(#207431)\n\nhttps://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md","sha":"89b763a4996afcf380fb68f345ca6da3f08669ba"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207431","number":207431,"mergeCommit":{"message":"Upgrade
Node.js to 20.18.2
(#207431)\n\nhttps://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md","sha":"89b763a4996afcf380fb68f345ca6da3f08669ba"}}]}]
BACKPORT-->

Co-authored-by: Jon <[email protected]>
kibanamachine and jbudz authored Jan 22, 2025
1 parent 850785a commit d733fd6
Showing 8 changed files with 13 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -27,10 +27,6 @@ spec:
pipeline_file: ".buildkite/pipelines/pointer_compression.yml"
provider_settings:
trigger_mode: none
schedules:
Daily run:
branch: main
cronline: "@daily"
teams:
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15.1
20.18.2
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15.1
20.18.2
12 changes: 6 additions & 6 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -22,13 +22,13 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install
# Setup the Node.js toolchain for the architectures we want to support
node_repositories(
node_repositories = {
"20.15.1-darwin_amd64": ("node-v20.15.1-darwin-x64.tar.gz", "node-v20.15.1-darwin-x64", "f5379772ffae1404cfd1fcc8cf0c6c5971306b8fb2090d348019047306de39dc"),
"20.15.1-darwin_arm64": ("node-v20.15.1-darwin-arm64.tar.gz", "node-v20.15.1-darwin-arm64", "4743bc042f90ba5d9edf09403207290a9cdd2f6061bdccf7caaa0bbfd49f343e"),
"20.15.1-linux_arm64": ("node-v20.15.1-linux-arm64.tar.xz", "node-v20.15.1-linux-arm64", "c049d670df0c27ae2fd53446df79b6227ab23aff930e38daf0ab3da41c396db5"),
"20.15.1-linux_amd64": ("node-v20.15.1-linux-x64.tar.xz", "node-v20.15.1-linux-x64", "a854c291c7b775bedab54251e1e273cfee1adf1dba25435bc52305ef41f143ab"),
"20.15.1-windows_amd64": ("node-v20.15.1-win-x64.zip", "node-v20.15.1-win-x64", "ba6c3711e2c3d0638c5f7cea3c234553808a73c52a5962a6cdb47b5210b70b04"),
"20.18.2-darwin_amd64": ("node-v20.18.2-darwin-x64.tar.gz", "node-v20.18.2-darwin-x64", "00a16bb0a82a2ad5d00d66b466ae1afa678482283747c27e9bce96668f334744"),
"20.18.2-darwin_arm64": ("node-v20.18.2-darwin-arm64.tar.gz", "node-v20.18.2-darwin-arm64", "fa76d5b5340f14070ebaa88ef8faa28c1e9271502725e830cb52f0cf5b6493de"),
"20.18.2-linux_arm64": ("node-v20.18.2-linux-arm64.tar.xz", "node-v20.18.2-linux-arm64", "1b4b1745ef7b6d342ddf998352438cfc61dbfcdf0895c9db7e9f1d8a427815d2"),
"20.18.2-linux_amd64": ("node-v20.18.2-linux-x64.tar.xz", "node-v20.18.2-linux-x64", "1a6e1fbd768437e130eac1a54c5535736d6992df700c09a6ce58f22040d6a34c"),
"20.18.2-windows_amd64": ("node-v20.18.2-win-x64.zip", "node-v20.18.2-win-x64", "ed790b94570518a7dce67b62485e16bc4bffecee4ec3b6df35ed220ae91117a5"),
},
node_version = "20.15.1",
node_version = "20.18.2",
node_urls = [
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}",
],
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "20.15.1",
"node": "20.18.2",
"yarn": "^1.22.19"
},
"resolutions": {
14 changes: 0 additions & 14 deletions src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts
Original file line number Diff line number Diff line change
@@ -143,20 +143,6 @@ it('runs expected fs operations', async () => {
"strip": 1,
},
],
Array [
<absolute path>/.node_binaries/<node version>/<node variant>/linux-x64/download/node-v<node version>-linux-x64.tar.gz,
<absolute path>/.node_binaries/<node version>/<node variant>/linux-x64/extract,
Object {
"strip": 1,
},
],
Array [
<absolute path>/.node_binaries/<node version>/<node variant>/linux-arm64/download/node-v<node version>-linux-arm64.tar.gz,
<absolute path>/.node_binaries/<node version>/<node variant>/linux-arm64/extract,
Object {
"strip": 1,
},
],
Array [
<absolute path>/.node_binaries/<node version>/<node variant>/linux-arm64/download/node-v<node version>-linux-arm64.tar.gz,
<absolute path>/.node_binaries/<node version>/<node variant>/linux-arm64/extract,
3 changes: 2 additions & 1 deletion src/dev/build/tasks/nodejs/node_download_info.ts
Original file line number Diff line number Diff line change
@@ -22,7 +22,8 @@ export function getNodeDownloadInfo(config: Config, platform: Platform) {
} else {
variants = ['glibc-217'];
}
if (platform.isServerless()) variants.push('pointer-compression');
// disabled, see https://github.com/nodejs/node/issues/54531
// if (platform.isServerless()) variants.push('pointer-compression');
}

return variants.map((variant) => {
Original file line number Diff line number Diff line change
@@ -197,7 +197,7 @@ describe('FleetToHostFilesClient', () => {

it('should error if `agentIds` is empty', async () => {
await expect(getFleetFilesInstance().create(fileReadable, [])).rejects.toThrow(
'FleetFilesClientError: Missing agentIds!'
'Missing agentIds!'
);
});

@@ -218,7 +218,7 @@ describe('FleetToHostFilesClient', () => {
esFile.data.hash = undefined;

await expect(getFleetFilesInstance().create(fileReadable, ['123'])).rejects.toThrow(
'FleetFilesClientError: File hash was not generated!'
'File hash was not generated!'
);
});
});

0 comments on commit d733fd6

Please sign in to comment.