Skip to content

Commit

Permalink
Merge branch 'main' into eui-v85.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jul 27, 2023
2 parents 98f017c + 33195fb commit cb499fc
Show file tree
Hide file tree
Showing 84 changed files with 3,024 additions and 824 deletions.
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.17.0

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.17.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20.1
18.17.0
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.17.0-darwin_amd64": ("node-v18.17.0-darwin-x64.tar.gz", "node-v18.17.0-darwin-x64", "2f381442381f7fbde2ca644c3275bec9c9c2a8d361f467b40e39428acdd6ccff"),
"18.17.0-darwin_arm64": ("node-v18.17.0-darwin-arm64.tar.gz", "node-v18.17.0-darwin-arm64", "19731ef427e77ad9c5f476eb62bfb02a7f179d3012feed0bbded62e45f23e679"),
"18.17.0-linux_arm64": ("node-v18.17.0-linux-arm64.tar.xz", "node-v18.17.0-linux-arm64", "fbd2904178ee47da6e0386bc9704a12b1f613da6ad194878a517d4a69ba56544"),
"18.17.0-linux_amd64": ("node-v18.17.0-linux-x64.tar.xz", "node-v18.17.0-linux-x64", "f36facda28c4d5ce76b3a1b4344e688d29d9254943a47f2f1909b1a10acb1959"),
"18.17.0-windows_amd64": ("node-v18.17.0-win-x64.zip", "node-v18.17.0-win-x64", "06e30b4e70b18d794651ef132c39080e5eaaa1187f938721d57edae2824f4e96"),
},
node_version = "16.20.1",
node_version = "18.17.0",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
9 changes: 8 additions & 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.17.0: https://nodejs.org/dist/v18.17.0/SHASUMS256.txt.asc

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

Expand All @@ -30,6 +30,13 @@ When upgrading to a new major version of Node.js, the following extra steps must
You can change which Node.js major version to view, by changing the selected branch.
If Node.js has dropped support for platform still supported by Kibana, appropriate steps must be taken as soon as possible to deprecate support for this platform. This way support for it can be dropped before the currently used major version of Node.js https://github.com/nodejs/release#release-schedule[reaches End-of-Life].

[[custom-nodejs-builds]]
=== Custom builds of Node.js

Due to Node.js 16 coming to an https://nodejs.org/en/blog/announcements/nodejs16-eol[early End-of-Life] and Node.js 18 no longer supporting the same platforms that {kib} supports (most notably CentOS7/RHEL7), we cannot bundle the official Node.js binaries with the Linux distributable of {kib}.
To keep support for these older platforms, we're bundling the Linux distributable of {kib} with a https://github.com/elastic/kibana-custom-nodejs-builds[custom build of Node.js] with extended backwards compatibility.
The only difference between the offical Node.js build and our custom build, is the version of `glibc` that it's compiled against.

=== Backporting

The following rules are not set in stone.
Expand Down
4 changes: 4 additions & 0 deletions docs/user/setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Windows. Since Kibana runs on Node.js, we include the necessary Node.js
binaries for these platforms. Running Kibana against a separately maintained
version of Node.js is not supported.

To support certain older Linux platforms (most notably CentOS7/RHEL7), {kib}
for Linux ships with a custom build of Node.js with glibc 2.17 support. For
details, see <<custom-nodejs-builds>>.

[float]
[[elasticsearch-version]]
== Elasticsearch version
Expand Down
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
{
"name": "synthetics",
"version": "1.0.2"
"version": "1.0.3"
},
{
"name": "security_detection_engine",
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",
"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.17.0",
"yarn": "^1.22.19"
},
"resolutions": {
"**/@types/node": "16.11.68",
"**/@types/node": "18.17.1",
"**/chokidar": "^3.5.3",
"**/globule/minimatch": "^3.1.2",
"**/hoist-non-react-statics": "^3.3.2",
Expand Down Expand Up @@ -788,7 +788,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 @@ -929,7 +928,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 @@ -1298,8 +1297,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.17.1",
"@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
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { AgentManager } from './agent_manager';
jest.mock('http');
jest.mock('https');

const HttpAgentMock = HttpAgent as jest.Mock<HttpAgent>;
const HttpsAgentMock = HttpsAgent as jest.Mock<HttpsAgent>;
const HttpAgentMock = HttpAgent as unknown as jest.Mock<HttpAgent>;
const HttpsAgentMock = HttpsAgent as unknown as jest.Mock<HttpsAgent>;

describe('AgentManager', () => {
let logger: MockedLogger;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cb499fc

Please sign in to comment.