Skip to content
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

[Ops] Bump Node.js to version 18 #160289

Merged
merged 27 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ef3056c
feat: bump node.js to version 18.16.1
delanni Jun 22, 2023
9b1f6cd
Set --openssl-legacy-provider for canvas runtime compilation
delanni Jun 23, 2023
2eba4d5
feat: fix tests and types
delanni Jun 23, 2023
16c32b8
feat: remove abort-controller, it's not compliant with the new node t…
delanni Jun 23, 2023
4e42210
feat: Fix more type issues
delanni Jun 26, 2023
d4a66db
feat: set --openssl-legacy-provider as a default in the env setup
delanni Jun 26, 2023
20eb469
feat: fix a few more tests related to the node bump
delanni Jun 26, 2023
cbb722d
Revert "feat: set --openssl-legacy-provider as a default in the env s…
delanni Jun 27, 2023
147f4ed
feat: Fix last weird test error
delanni Jun 27, 2023
1705f9f
feat: fix build integration test
delanni Jun 27, 2023
3780e7f
docs: Add mentions for the custom node.js builds in the docs, add NOD…
delanni Jul 7, 2023
a49a631
chore: set resolutions for @types/node to a bit more strict version
delanni Jul 7, 2023
2508c7f
Merge branch 'main' into bump-node-18
delanni Jul 7, 2023
76a3eb9
Merge branch 'main' into bump-node-18
kibanamachine Jul 7, 2023
f335573
Merge branch 'main' into bump-node-18
kibanamachine Jul 10, 2023
6c5026e
Merge branch 'main' into bump-node-18
mistic Jul 12, 2023
fe9654b
docs: Apply suggestions for docs
delanni Jul 18, 2023
8ffbc3d
chore: remove debug option from bazel build
delanni Jul 18, 2023
d744829
feat: bump node's types to their latest
delanni Jul 18, 2023
71e61b0
docs: remove NODE_BINARIES
delanni Jul 18, 2023
be95475
Remove duplicate reference to custom build
delanni Jul 19, 2023
9519e2f
Merge branch 'main' into bump-node-18
kibanamachine Jul 19, 2023
9b3dbca
Merge branch 'main' into bump-node-18
delanni Jul 19, 2023
d399a8e
Merge branch 'main' into bump-node-18
delanni Jul 26, 2023
4b18fc3
feat: bump node.js to 18.17.0 and adjust types/docs
delanni Jul 26, 2023
c8f6be2
Merge branch 'main' into bump-node-18
kibanamachine Jul 26, 2023
04072ea
feat: update sha hashes to glibc217 built resource hashes
delanni Jul 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=16.20.1
ARG NODE_VERSION=18.16.1

FROM node:${NODE_VERSION} AS base

Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20.1
18.16.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20.1
18.16.1
12 changes: 6 additions & 6 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
"16.20.1-darwin_amd64": ("node-v16.20.1-darwin-x64.tar.gz", "node-v16.20.1-darwin-x64", "d1f9c2a7c3a0fe09860f701af5fb8ff9ac72d72faa7ebabfeb5794503e79f955"),
"16.20.1-darwin_arm64": ("node-v16.20.1-darwin-arm64.tar.gz", "node-v16.20.1-darwin-arm64", "5f6b31c5a75567d382ba67220f3d7a2d9bb0c03d8af9307cd35a9cb32a6fde9d"),
"16.20.1-linux_arm64": ("node-v16.20.1-linux-arm64.tar.xz", "node-v16.20.1-linux-arm64", "7fce19f3d1c2952599a0b47f9f5d8f497265ad577f37f256a8c6a03be6353234"),
"16.20.1-linux_amd64": ("node-v16.20.1-linux-x64.tar.xz", "node-v16.20.1-linux-x64", "b6c60e1e106ad7d8881e83945a5208c1b1d1b63e6901c04b9dafa607aff3a154"),
"16.20.1-windows_amd64": ("node-v16.20.1-win-x64.zip", "node-v16.20.1-win-x64", "2a7fde996c57a969f0498742f99385a520eb14aac864e0eff9c32e3f3633ff0a"),
"18.16.1-darwin_amd64": ("node-v18.16.1-darwin-x64.tar.gz", "node-v18.16.1-darwin-x64", "3040210287a0b8d05af49f57de191afa783e497abbb10c340bae9158cb51fdd4"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hashes we give here belong to the official node.js distros, which I assume is fine, because these are binaries related to development, and not the ones we bundle with, right?

I wonder if we should change this bit to also load these files from our mirror, and use the custom-built variants on linux (for less hidden differences) - also using the proxy-cache mirror from line:32 might do away with a few of the Bazel cache warming job failures.

@elastic/kibana-operations - What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea, it could help us catch issues earlier.

Do we know if native binaries on the node distribution we're building are compatible with official distributions? Will a developer with a global, official installation of node and a bazel sandbox build with our glibc compatible version of something like node-sass work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to worry about this tbh. Bazel should be short lived and its for development only. In addition to that Bazel has local caches so after fetching once it won't download the binaries again from the nodejs official mirror. Having that said I'm not opposed to change those lines to use our proxy cache links but I think there was something in the version of the bazel js rules we are in that was preventing us from doing that (not completely sure about this at the moment) and, again, as Bazel will be short lived I think we can avoid touching this for now 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbudz had a different concern though, whether the binaries are glibc compatible or whether that compatibility issue can happen with these binaries.

For now, we're not using a custom build pipeline to also build those binaries. We've just pre-built them for the missing platforms (modules version 108 for linux-arm64) and getting those from our proxy.

Would it be a good way of testing this, if we use the artifacts from a successful "Build Kibana Distribution and Plugins" step, and use that to set up a CentOS7 image? Maybe node-sass is not used at the runtime but node-re2 should be.

Copy link
Contributor Author

@delanni delanni Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems it's a good catch, @jbudz - I got kibana startup issues, then I tried requiring manually:

[root@a63630b977b7 kibana]# ./node/bin/node 
Welcome to Node.js v18.16.1.
Type ".help" for more information.
> require('re2')
Uncaught:
Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/kibana/node_modules/re2/build/Release/re2.node)

When using a re2 binary that was built with glibc2.17 (from earlier versions of the custom build pipeline), it can be imported, kibana works.

I tried the other way around, it seems the glibc217 built artifacts are going to be usable by other linux platforms too.

Copy link
Member

@mistic mistic Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm reading this correctly, does it means we will have to build and push node-sass and re2 native modules as part of our custom node js build pipeline to make sure we are always building those using glibc2.17? Otherwise they will fail in the machines consuming our custom node images. Is that what you were trying to mention here @delanni ? If thats the case we will probably have to recover your previous work for node-sass and re2 in the custom nodejs pipeline or document a way to build node-sass and node-re2 using glibc2.17 as needed and push those into ci-proxy-cache

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think. This is my impression from the tests. We'll need the libraries compiled using the custom node builds.

However, they're not exactly bound to the specific node.js version we're compiling them with, but the ones we have now will probably work for the whole Node 18.x.x family - so long as the modules versions (and apparently other native lib versions) don't change. We could probably live with the few pre-compiled binaries we have produced earlier, but for the long game, it's probably best to build them periodically.

"18.16.1-darwin_arm64": ("node-v18.16.1-darwin-arm64.tar.gz", "node-v18.16.1-darwin-arm64", "2ccb24e9211f4d17d8d8cfc0ea521198bb6a54e2f779f8feda952dbd3bb651ac"),
"18.16.1-linux_arm64": ("node-v18.16.1-linux-arm64.tar.xz", "node-v18.16.1-linux-arm64", "144eb4103e0193de8a41187817261d35970f1a13a11e779e16a4f1d9c99bcc82"),
"18.16.1-linux_amd64": ("node-v18.16.1-linux-x64.tar.xz", "node-v18.16.1-linux-x64", "ecfe263dbd9c239f37b5adca823b60be1bb57feabbccd25db785e647ebc5ff5e"),
"18.16.1-windows_amd64": ("node-v18.16.1-win-x64.zip", "node-v18.16.1-win-x64", "145bd2f79eaa50b76559bd78266f4585e57b88dbb94613698a9514a601f84e7f"),
},
node_version = "16.20.1",
node_version = "18.16.1",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/advanced/upgrading-nodejs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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.
Besides this property, the list of files under `node_repositories` must be updated along with their respective SHA256 hashes.
These can be found on the https://nodejs.org[nodejs.org] website.
Example for Node.js v16.20.1: https://nodejs.org/dist/v16.20.1/SHASUMS256.txt.asc
Example for Node.js v18.16.1: https://nodejs.org/dist/v18.16.1/SHASUMS256.txt.asc

See PR {kib-repo}pull/128123[#128123] for an example of how the Node.js version has been upgraded previously.

Expand Down
2 changes: 1 addition & 1 deletion kbn_pm/src/lib/bazel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export async function installYarnDeps(log, opts = undefined) {
* @param {{ offline?: boolean, quiet?: boolean } | undefined} opts
*/
export async function buildWebpackBundles(log, opts = undefined) {
await runBazel(log, ['build', ...BAZEL_TARGETS, '--show_result=1'], {
await runBazel(log, ['build', ...BAZEL_TARGETS, '--show_result=1', '--sandbox_debug=true'], {
delanni marked this conversation as resolved.
Show resolved Hide resolved
offline: opts?.offline,
quiet: opts?.quiet,
});
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"serverless-security": "node scripts/kibana --dev --serverless=security",
"spec_to_console": "node scripts/spec_to_console",
"start": "node scripts/kibana --dev",
"storybook": "node scripts/storybook",
"storybook": "node --openssl-legacy-provider scripts/storybook",
jbudz marked this conversation as resolved.
Show resolved Hide resolved
"test:ftr": "node scripts/functional_tests",
"test:ftr:runner": "node scripts/functional_test_runner",
"test:ftr:server": "node scripts/functional_tests_server",
Expand All @@ -73,11 +73,11 @@
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "16.20.1",
"node": "18.16.1",
"yarn": "^1.22.19"
},
"resolutions": {
"**/@types/node": "16.11.68",
"**/@types/node": "18",
"**/chokidar": "^3.5.3",
"**/globule/minimatch": "^3.1.2",
"**/hoist-non-react-statics": "^3.3.2",
Expand Down Expand Up @@ -775,7 +775,6 @@
"@turf/length": "^6.0.2",
"@xstate/react": "^3.2.2",
"JSONStream": "1.3.5",
"abort-controller": "^3.0.0",
"adm-zip": "^0.5.9",
"ajv": "^8.12.0",
"antlr4ts": "^0.5.0-alpha.3",
Expand Down Expand Up @@ -916,7 +915,7 @@
"query-string": "^6.13.2",
"rbush": "^3.0.1",
"re-resizable": "^6.9.9",
"re2": "1.17.4",
"re2": "1.17.7",
"react": "^17.0.2",
"react-ace": "^7.0.5",
"react-beautiful-dnd": "^13.1.0",
Expand Down Expand Up @@ -1285,8 +1284,8 @@
"@types/multistream": "^4.1.0",
"@types/mustache": "^0.8.31",
"@types/nock": "^10.0.3",
"@types/node": "16.11.68",
"@types/node-fetch": "^2.6.0",
"@types/node": "18.16.18",
delanni marked this conversation as resolved.
Show resolved Hide resolved
"@types/node-fetch": "2.6.4",
"@types/node-forge": "^1.3.1",
"@types/nodemailer": "^6.4.0",
"@types/normalize-path": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ class FakeApp implements App {
const store = new Map();
const originalLocalStorage = window.localStorage;

(window as any).localStorage = {
setItem: (key: string, value: string) => store.set(String(key), String(value)),
getItem: (key: string) => store.get(String(key)),
removeItem: (key: string) => store.delete(String(key)),
};
Object.defineProperty(window, 'localStorage', {
value: {
setItem: (key: string, value: string) => store.set(String(key), String(value)),
getItem: (key: string) => store.get(String(key)),
removeItem: (key: string) => store.delete(String(key)),
},
writable: true,
});

function defaultStartDeps(availableApps?: App[]) {
const deps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ describe('RecentlyAccessed#start()', () => {
let originalLocalStorage: Storage;
beforeAll(() => {
originalLocalStorage = window.localStorage;
window.localStorage = new LocalStorageMock();
Object.defineProperty(window, 'localStorage', {
value: new LocalStorageMock(),
writable: true,
});
});
beforeEach(() => localStorage.clear());
afterAll(() => (window.localStorage = originalLocalStorage));
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-es/src/artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { pipeline, Transform } from 'stream';
import { setTimeout } from 'timers/promises';

import fetch, { Headers } from 'node-fetch';
import AbortController from 'abort-controller';
import chalk from 'chalk';
import { ToolingLog } from '@kbn/tooling-log';

Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-monaco/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ webpack_cli(
env = select({
"//:dist": {
"NODE_ENV": "production",
"NODE_OPTIONS": "--openssl-legacy-provider",
},
"//conditions:default": {
"NODE_ENV": "development",
"NODE_OPTIONS": "--openssl-legacy-provider",
},
}),
visibility = ["//visibility:public"],
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-optimizer/src/optimizer/observe_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function usingWorkerProc<T>(config: OptimizerConfig, fn: (proc: ChildProcess) =>
const proc = fork(require.resolve('../worker/run_worker'), [], {
execArgv: [
`--require=@kbn/babel-register/install`,
'--openssl-legacy-provider',
...(inspectFlag && config.inspectWorkers
? [`${inspectFlag}=${inspectPortCounter++}`]
: []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ it('builds a generated plugin into a viable archive', async () => {
process.execPath,
['scripts/generate_plugin', '-y', '--name', 'fooTestPlugin'],
{
env: {
NODE_OPTIONS: '--openssl-legacy-provider',
},
watson marked this conversation as resolved.
Show resolved Hide resolved
cwd: REPO_ROOT,
all: true,
}
Expand All @@ -61,6 +64,9 @@ it('builds a generated plugin into a viable archive', async () => {
process.execPath,
['../../scripts/plugin_helpers', 'build', '--kibana-version', '7.5.0'],
{
env: {
NODE_OPTIONS: '--openssl-legacy-provider',
},
cwd: PLUGIN_DIR,
all: true,
}
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-ui-shared-deps-npm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ webpack_cli(
env = select({
"//:dist": {
"NODE_ENV": "production",
"NODE_OPTIONS": "--openssl-legacy-provider",
},
"//conditions:default": {
"NODE_ENV": "development",
"NODE_OPTIONS": "--openssl-legacy-provider",
},
})
)
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-ui-shared-deps-src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ webpack_cli(
env = select({
"//:dist": {
"NODE_ENV": "production",
"NODE_OPTIONS": "--openssl-legacy-provider",
},
"//conditions:default": {
"NODE_ENV": "development",
"NODE_OPTIONS": "--openssl-legacy-provider",
},
}),
visibility = ["//visibility:public"],
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/lib/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export async function downloadToDisk({
const downloadedSha = hash.digest('hex');
if (downloadedSha !== shaChecksum) {
throw new Error(
`Downloaded checksum ${downloadedSha} does not match the expected ${shaAlgorithm} checksum.`
`Downloaded checksum ${downloadedSha} does not match the expected (${shaAlgorithm}) checksum ${shaChecksum}, for file: ${url}.`
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/dev/build/lib/integration_tests/download.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('downloadToDisk', () => {
shaAlgorithm: 'sha256',
});
await expect(promise).rejects.toMatchInlineSnapshot(
`[Error: Downloaded checksum 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae does not match the expected sha256 checksum.]`
`[Error: Downloaded checksum ${FOO_SHA256} does not match the expected (sha256) checksum bar, for file: ${serverUrl}.]`
);

try {
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('downloadToDisk', () => {
" info Retrying in 0.1 seconds",
" debg [2/3] Attempting download of TEST_SERVER_URL sha256",
" debg Downloaded 3 bytes to TMP_DIR/__tmp_download_js_test_file__",
" debg Download failed: Downloaded checksum fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9 does not match the expected sha256 checksum.",
" debg Download failed: Downloaded checksum fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9 does not match the expected (sha256) checksum 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae, for file: TEST_SERVER_URL.",
" debg Deleting downloaded data at TMP_DIR/__tmp_download_js_test_file__",
" info Retrying in 0.2 seconds",
" debg [3/3] Attempting download of TEST_SERVER_URL sha256",
Expand Down
27 changes: 14 additions & 13 deletions src/dev/build/tasks/patch_native_modules_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ interface Package {
const packages: Package[] = [
{
name: 're2',
version: '1.17.4',
version: '1.17.7',
destinationPath: 'node_modules/re2/build/Release/re2.node',
extractMethod: 'gunzip',
archives: {
'darwin-x64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/darwin-x64-93.gz',
sha256: '9558c5cb39622e9b3653203e772b129d6c634e7dbd7af1b244352fc1d704601f',
},
'linux-x64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/linux-x64-93.gz',
sha256: '4d06747b266c75b6f7ced93977692c0586ce6a52924cabb569bd966378941aa1',
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/linux-x64-108.gz',
sha256: '197a617ca2965f220848561afed71ff6df653f6d79910cf38e866c84ab38a236',
},

// ARM builds are currently done manually as Github Actions used in upstream project
Expand All @@ -67,8 +63,13 @@ const packages: Package[] = [
// * capture the sha256 with: `shasum -a 256 linux-arm64-*`
// * upload the `linux-arm64-*.gz` artifact to the `yarn-prebuilt-artifacts` bucket in GCS using the correct version number
'linux-arm64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/linux-arm64-93.gz',
sha256: '25409584f76f3d6ed85463d84adf094eb6e256ed1cb0b754b95bcbda6691fc26',
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/linux-arm64-108.gz',
sha256: 'a690087a1a1fd9887aac1abdab68d1992600e218be10783da6d3381cca950c1a',
},

'darwin-x64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/darwin-x64-108.gz',
sha256: '4ed378c5a7fe6134b717afe7642254aff1ed7a881cbcaa53a012ac3efab49f99',
},

// A similar process is necessary for building on ARM macs:
Expand All @@ -78,13 +79,13 @@ const packages: Package[] = [
// * capture the sha256 with: `shasum -a 256 darwin-arm64-*`
// * upload the `darwin-arm64-*.gz` artifact to the `yarn-prebuilt-artifacts` bucket in GCS using the correct version number
'darwin-arm64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/darwin-arm64-93.gz',
sha256: 'd4b708749ddef1c87019f6b80e051ed0c29ccd1de34f233c47d8dcaddf803872',
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/darwin-arm64-108.gz',
sha256: '42afc32137ff5c5bebae5d68347a9786906748c2f28e06194d8950707f2ae90e',
},

'win32-x64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/win32-x64-93.gz',
sha256: '0320d0c0385432944c6fb3c8c8fcd78d440ce5626f7618f9ec71d88e44820674',
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/win32-x64-108.gz',
sha256: 'ff72fe02de652262659c8e17e44a932f3c873362233756b40d1a97538d05de92',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ describe('Editor', () => {
oldUrl = global.URL;
olldWindow = { ...global.window };
global.URL = URL;
global.window = Object.create(window);
Object.defineProperty(global, 'window', {
value: Object.create(window),
writable: true,
});
Object.defineProperty(window, 'location', {
value: {
origin: 'http://localhost:5620',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import { firstValueFrom, type Observable } from 'rxjs';
import AbortController from 'abort-controller';
import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server';
import { CloudDetector } from './detector';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import { readFile } from 'fs/promises';
import { get, omit } from 'lodash';
import fetch from 'node-fetch';
import { AbortSignal } from 'abort-controller';
import { CloudService } from './cloud_service';
import { CloudServiceResponse } from './cloud_response';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import { get, omit } from 'lodash';
import fetch from 'node-fetch';
import { AbortSignal } from 'abort-controller';
import { CloudService } from './cloud_service';
import { CloudServiceResponse } from './cloud_response';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Side Public License, v 1.
*/

import { AbortSignal } from 'abort-controller';
import type { CloudService } from './cloud_service';
import type { CloudServiceResponseJson } from './cloud_response';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Side Public License, v 1.
*/

import { AbortSignal } from 'abort-controller';
import { isObject, isPlainObject } from 'lodash';
import { CloudServiceResponse } from './cloud_response';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import fetch, { Response } from 'node-fetch';
import { AbortSignal } from 'abort-controller';
import { CloudService } from './cloud_service';
import { CloudServiceResponse } from './cloud_response';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('requestOAuthClientCredentialsToken', () => {
"maxSockets": Infinity,
"maxTotalSockets": Infinity,
"options": Object {
"noDelay": true,
"path": null,
"rejectUnauthorized": true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('requestOAuthJWTToken', () => {
"maxSockets": Infinity,
"maxTotalSockets": Infinity,
"options": Object {
"noDelay": true,
"path": null,
"rejectUnauthorized": true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ describe('requestOAuthToken', () => {
"maxSockets": Infinity,
"maxTotalSockets": Infinity,
"options": Object {
"noDelay": true,
"path": null,
"rejectUnauthorized": true,
},
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/canvas/scripts/shareable_runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ run(
execa.sync(
process.execPath,
[
'--openssl-legacy-provider',
watson marked this conversation as resolved.
Show resolved Hide resolved
require.resolve('webpack-dev-server/bin/webpack-dev-server'),
'--config',
webpackConfig,
Expand Down Expand Up @@ -88,6 +89,7 @@ run(
execa.sync(
process.execPath,
[
'--openssl-legacy-provider',
require.resolve('webpack/bin/webpack'),
'--config',
webpackConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

import AbortController from 'abort-controller';
import fetch from 'node-fetch';

import { KibanaRequest, Logger } from '@kbn/core/server';
Expand Down
Loading