Upgrade Node.js to 20.11.1 (#177042)

This commit is contained in:
Jon 2024-02-20 14:01:23 -06:00 committed by GitHub
parent d37909ca07
commit 37ae67a0a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 28 additions and 17 deletions

View file

@ -1 +1 @@
20.10.0 20.11.1

2
.nvmrc
View file

@ -1 +1 @@
20.10.0 20.11.1

View file

@ -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 # Setup the Node.js toolchain for the architectures we want to support
node_repositories( node_repositories(
node_repositories = { node_repositories = {
"20.10.0-darwin_amd64": ("node-v20.10.0-darwin-x64.tar.gz", "node-v20.10.0-darwin-x64", "5ff5e8abd3eea6e5f507eb6677554f5b2188eedef654096aa4168a9941e91a32"), "20.11.1-darwin_amd64": ("node-v20.11.1-darwin-x64.tar.gz", "node-v20.11.1-darwin-x64", "c52e7fb0709dbe63a4cbe08ac8af3479188692937a7bd8e776e0eedfa33bb848"),
"20.10.0-darwin_arm64": ("node-v20.10.0-darwin-arm64.tar.gz", "node-v20.10.0-darwin-arm64", "68b93099451d77aac116cf8fce179cabcf53fec079508dc6b39d3a086fb461a8"), "20.11.1-darwin_arm64": ("node-v20.11.1-darwin-arm64.tar.gz", "node-v20.11.1-darwin-arm64", "e0065c61f340e85106a99c4b54746c5cee09d59b08c5712f67f99e92aa44995d"),
"20.10.0-linux_arm64": ("node-v20.10.0-linux-arm64.tar.xz", "node-v20.10.0-linux-arm64", "a5c22683890d5d244f3afd488ef44e573b5b8287f8911b9a1b061ed3f20a5e6d"), "20.11.1-linux_arm64": ("node-v20.11.1-linux-arm64.tar.xz", "node-v20.11.1-linux-arm64", "36bac185164aa11940715425da1db2ec46e3354325bda9ee0b98b4a607aa0d8b"),
"20.10.0-linux_amd64": ("node-v20.10.0-linux-x64.tar.xz", "node-v20.10.0-linux-x64", "9c0fbc8cc7be9a6543af4b9afb05759c538c0f81015c388d63277b0158507697"), "20.11.1-linux_amd64": ("node-v20.11.1-linux-x64.tar.xz", "node-v20.11.1-linux-x64", "e2c39cb70b9ff79575a02747dd1e89917817cce05da21bef6b94eb9e92442024"),
"20.10.0-windows_amd64": ("node-v20.10.0-win-x64.zip", "node-v20.10.0-win-x64", "e5b861814a97e28ae7ac06a34e88fd5e0565b447d270c26e20b5ef60bf0aaaf9"), "20.11.1-windows_amd64": ("node-v20.11.1-win-x64.zip", "node-v20.11.1-win-x64", "bc032628d77d206ffa7f133518a6225a9c5d6d9210ead30d67e294ff37044bda"),
}, },
node_version = "20.10.0", node_version = "20.11.1",
node_urls = [ node_urls = [
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}", "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}",
], ],

View file

@ -19,7 +19,7 @@ These files must be updated when upgrading Node.js:
- {kib-repo}blob/{branch}/WORKSPACE.bazel[`WORKSPACE.bazel`] - The version is specified in the `node_version` property. - {kib-repo}blob/{branch}/WORKSPACE.bazel[`WORKSPACE.bazel`] - The version is specified in the `node_version` property.
Besides this property, the list of files under `node_repositories` must be updated along with their respective SHA256 hashes. Besides this property, the list of files under `node_repositories` must be updated along with their respective SHA256 hashes.
These can be found in the `SHASUMS256.txt` file inside the public `kibana-custom-node-artifacts` GCP bucket. These can be found in the `SHASUMS256.txt` file inside the public `kibana-custom-node-artifacts` GCP bucket.
Example for Node.js v18.18.2: https://storage.googleapis.com/kibana-custom-node-artifacts/node-glibc-217/dist/v18.18.2/SHASUMS256.txt[kibana-custom-node-artifacts/node-glibc-217/dist/v18.18.2/SHASUMS256.txt] Example for Node.js v20.11.1: https://storage.googleapis.com/kibana-custom-node-artifacts/node-glibc-217/dist/v20.11.1/SHASUMS256.txt[kibana-custom-node-artifacts/node-glibc-217/dist/v20.11.1/SHASUMS256.txt]
See PR {kib-repo}pull/128123[#128123] for an example of how the Node.js version has been upgraded previously. See PR {kib-repo}pull/128123[#128123] for an example of how the Node.js version has been upgraded previously.
@ -43,7 +43,7 @@ The only difference between the offical Node.js build and our custom build, is t
==== How to start a new build ==== How to start a new build
To generate a new custom Node.js build, https://buildkite.com/elastic/kibana-custom-node-dot-js-builds#new[start a new build] on our dedicated Buildkite pipeline (requires Elastic employee permissions). To generate a new custom Node.js build, https://buildkite.com/elastic/kibana-custom-node-dot-js-builds#new[start a new build] on our dedicated Buildkite pipeline (requires Elastic employee permissions).
Give it a clear name (e.g. `Node 18.18.2`) and remember so set the custom `OVERRIDE_TARGET_VERSION` environment variable to the desired Node.js version - e.g. `OVERRIDE_TARGET_VERSION=18.18.2`. Give it a clear name (e.g. `Node 20.11.1`) and remember so set the custom `OVERRIDE_TARGET_VERSION` environment variable to the desired Node.js version - e.g. `OVERRIDE_TARGET_VERSION=20.11.1`.
You find the "Environment Variables" field by expanding "Options >" in the "New Build" dialog. You find the "Environment Variables" field by expanding "Options >" in the "New Build" dialog.
=== Backporting === Backporting

View file

@ -74,7 +74,7 @@
"url": "https://github.com/elastic/kibana.git" "url": "https://github.com/elastic/kibana.git"
}, },
"engines": { "engines": {
"node": "20.10.0", "node": "20.11.1",
"yarn": "^1.22.19" "yarn": "^1.22.19"
}, },
"resolutions": { "resolutions": {

View file

@ -23,9 +23,9 @@ describe('reduceStream', () => {
}, 0), }, 0),
]); ]);
expect(stub).toHaveBeenCalledTimes(3); expect(stub).toHaveBeenCalledTimes(3);
expect(stub.mock.calls[0]).toEqual([0, 1, 'utf8']); expect(stub.mock.calls[0]).toEqual([0, 1]);
expect(stub.mock.calls[1]).toEqual([1, 2, 'utf8']); expect(stub.mock.calls[1]).toEqual([1, 2]);
expect(stub.mock.calls[2]).toEqual([2, 3, 'utf8']); expect(stub.mock.calls[2]).toEqual([2, 3]);
}); });
test('provides the return value of the last iteration of the reducer', async () => { test('provides the return value of the last iteration of the reducer', async () => {

View file

@ -148,6 +148,7 @@ exports[`Inspector Data View component should render loading state 1`] = `
"_eventsCount": 0, "_eventsCount": 0,
"_maxListeners": undefined, "_maxListeners": undefined,
"_tables": Object {}, "_tables": Object {},
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
} }

View file

@ -132,6 +132,7 @@ describe('useStateProps', () => {
"_eventsCount": 0, "_eventsCount": 0,
"_maxListeners": undefined, "_maxListeners": undefined,
"requests": Map {}, "requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"searchSessionId": "123", "searchSessionId": "123",
@ -212,6 +213,7 @@ describe('useStateProps', () => {
"_eventsCount": 0, "_eventsCount": 0,
"_maxListeners": undefined, "_maxListeners": undefined,
"requests": Map {}, "requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"searchSessionId": "123", "searchSessionId": "123",
@ -313,6 +315,7 @@ describe('useStateProps', () => {
"_eventsCount": 0, "_eventsCount": 0,
"_maxListeners": undefined, "_maxListeners": undefined,
"requests": Map {}, "requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"searchSessionId": "123", "searchSessionId": "123",
@ -390,6 +393,7 @@ describe('useStateProps', () => {
"_eventsCount": 0, "_eventsCount": 0,
"_maxListeners": undefined, "_maxListeners": undefined,
"requests": Map {}, "requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"searchSessionId": "123", "searchSessionId": "123",

View file

@ -83,6 +83,7 @@ describe('requestOAuthClientCredentialsToken', () => {
"scheduling": "lifo", "scheduling": "lifo",
"sockets": Object {}, "sockets": Object {},
"totalSocketCount": 0, "totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"maxContentLength": 1000000, "maxContentLength": 1000000,

View file

@ -84,6 +84,7 @@ describe('requestOAuthJWTToken', () => {
"scheduling": "lifo", "scheduling": "lifo",
"sockets": Object {}, "sockets": Object {},
"totalSocketCount": 0, "totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"maxContentLength": 1000000, "maxContentLength": 1000000,

View file

@ -91,6 +91,7 @@ describe('requestOAuthToken', () => {
"scheduling": "lifo", "scheduling": "lifo",
"sockets": Object {}, "sockets": Object {},
"totalSocketCount": 0, "totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"maxContentLength": 1000000, "maxContentLength": 1000000,

View file

@ -104,6 +104,7 @@ describe('sendEmailGraphApi', () => {
"scheduling": "lifo", "scheduling": "lifo",
"sockets": Object {}, "sockets": Object {},
"totalSocketCount": 0, "totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"maxContentLength": 1000000, "maxContentLength": 1000000,
@ -113,7 +114,7 @@ describe('sendEmailGraphApi', () => {
"validateStatus": [Function], "validateStatus": [Function],
}, },
] ]
`); `);
}); });
test('email was sent on behalf of the user "from" mailbox', async () => { test('email was sent on behalf of the user "from" mailbox', async () => {
@ -195,6 +196,7 @@ describe('sendEmailGraphApi', () => {
"scheduling": "lifo", "scheduling": "lifo",
"sockets": Object {}, "sockets": Object {},
"totalSocketCount": 0, "totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"maxContentLength": 1000000, "maxContentLength": 1000000,
@ -204,7 +206,7 @@ describe('sendEmailGraphApi', () => {
"validateStatus": [Function], "validateStatus": [Function],
}, },
] ]
`); `);
}); });
test('sendMail request was sent to the custom configured Graph API URL', async () => { test('sendMail request was sent to the custom configured Graph API URL', async () => {
@ -285,6 +287,7 @@ describe('sendEmailGraphApi', () => {
"scheduling": "lifo", "scheduling": "lifo",
"sockets": Object {}, "sockets": Object {},
"totalSocketCount": 0, "totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false, Symbol(kCapture): false,
}, },
"maxContentLength": 1000000, "maxContentLength": 1000000,
@ -294,7 +297,7 @@ describe('sendEmailGraphApi', () => {
"validateStatus": [Function], "validateStatus": [Function],
}, },
] ]
`); `);
}); });
test('throw the exception and log the proper error if message was not sent successfuly', async () => { test('throw the exception and log the proper error if message was not sent successfuly', async () => {