From 89b763a4996afcf380fb68f345ca6da3f08669ba Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 22 Jan 2025 12:00:14 -0600 Subject: [PATCH] Upgrade Node.js to 20.18.2 (#207431) https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md --- .../kibana-pointer-compression.yml | 4 ---- .node-version | 2 +- .nvmrc | 2 +- WORKSPACE.bazel | 12 ++++++------ package.json | 2 +- .../tasks/nodejs/extract_node_builds_task.test.ts | 14 -------------- src/dev/build/tasks/nodejs/node_download_info.ts | 3 ++- .../server/services/files/client_to_host.test.ts | 4 ++-- 8 files changed, 13 insertions(+), 30 deletions(-) diff --git a/.buildkite/pipeline-resource-definitions/kibana-pointer-compression.yml b/.buildkite/pipeline-resource-definitions/kibana-pointer-compression.yml index bcc94453b14e..6c14fec4b4bc 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-pointer-compression.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-pointer-compression.yml @@ -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 diff --git a/.node-version b/.node-version index b8e593f5210c..0254b1e633c7 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.15.1 +20.18.2 diff --git a/.nvmrc b/.nvmrc index b8e593f5210c..0254b1e633c7 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.15.1 +20.18.2 diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index c1bae6c549f5..4c347d053640 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -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}", ], diff --git a/package.json b/package.json index 1837ffa5535d..b7371cdf3e67 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts index 82a46f6aab62..b58076dde734 100644 --- a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts +++ b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts @@ -143,20 +143,6 @@ it('runs expected fs operations', async () => { "strip": 1, }, ], - Array [ - /.node_binaries///linux-x64/download/node-v-linux-x64.tar.gz, - /.node_binaries///linux-x64/extract, - Object { - "strip": 1, - }, - ], - Array [ - /.node_binaries///linux-arm64/download/node-v-linux-arm64.tar.gz, - /.node_binaries///linux-arm64/extract, - Object { - "strip": 1, - }, - ], Array [ /.node_binaries///linux-arm64/download/node-v-linux-arm64.tar.gz, /.node_binaries///linux-arm64/extract, diff --git a/src/dev/build/tasks/nodejs/node_download_info.ts b/src/dev/build/tasks/nodejs/node_download_info.ts index c9bda93e21c5..95ea818e3911 100644 --- a/src/dev/build/tasks/nodejs/node_download_info.ts +++ b/src/dev/build/tasks/nodejs/node_download_info.ts @@ -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) => { diff --git a/x-pack/platform/plugins/shared/fleet/server/services/files/client_to_host.test.ts b/x-pack/platform/plugins/shared/fleet/server/services/files/client_to_host.test.ts index 1068f3436697..7f864a2536a4 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/files/client_to_host.test.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/files/client_to_host.test.ts @@ -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!' ); }); });