Skip to content

Commit

Permalink
Merge branch 'main' into im-events-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Jan 26, 2023
2 parents 07e933a + 7facd3b commit 3102896
Show file tree
Hide file tree
Showing 140 changed files with 2,712 additions and 1,766 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ enabled:
- x-pack/test/examples/config.ts
- x-pack/test/fleet_api_integration/config.ts
- x-pack/test/fleet_functional/config.ts
- x-pack/test/ftr_apis/security_and_spaces/config.ts
- x-pack/test/functional_basic/config.ts
- x-pack/test/functional_cors/config.ts
- x-pack/test/functional_embedded/config.ts
Expand Down
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=18.13.0
ARG NODE_VERSION=16.19.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 @@
18.13.0
16.19.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.13.0
16.19.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 = {
"18.13.0-darwin_amd64": ("node-v18.13.0-darwin-x64.tar.gz", "node-v18.13.0-darwin-x64", "8b57c4da4ff6cca19d5ef7953f8816e3406d1508a2e4ee7f997984b3b1d11b77"),
"18.13.0-darwin_arm64": ("node-v18.13.0-darwin-arm64.tar.gz", "node-v18.13.0-darwin-arm64", "418d535e64dbcbd628715180c2de4ffcecb8a84b81f233c60e6ab9f0d795c249"),
"18.13.0-linux_arm64": ("node-v18.13.0-linux-arm64.tar.xz", "node-v18.13.0-linux-arm64", "5b338667822341d1ea3b18d5b37d442a655829b9eafdc5f9008f00b8451ac148"),
"18.13.0-linux_amd64": ("node-v18.13.0-linux-x64.tar.xz", "node-v18.13.0-linux-x64", "7f5d6922a91986ef059ba8a4396aa435440adacfe6fc6fab60a857c8f2cf5e7a"),
"18.13.0-windows_amd64": ("node-v18.13.0-win-x64.zip", "node-v18.13.0-win-x64", "29c99ad1167ddbd72f2b15e91b560e36ac785b1873ba6791ab50d9d62f1957e2"),
"16.19.0-darwin_amd64": ("node-v16.19.0-darwin-x64.tar.gz", "node-v16.19.0-darwin-x64", "491e5a5592eca1961dcbb1fae28567428ce56ce9cc7977b04041e163e0c1670c"),
"16.19.0-darwin_arm64": ("node-v16.19.0-darwin-arm64.tar.gz", "node-v16.19.0-darwin-arm64", "5c9434fbb0f323fecf3d261b23a2e544919380c5043d0046d9745682fefd9cde"),
"16.19.0-linux_arm64": ("node-v16.19.0-linux-arm64.tar.xz", "node-v16.19.0-linux-arm64", "9072c995052f832678fe8fab18e960bd9853f30e481787e53f8dd1ec8aaa3bb6"),
"16.19.0-linux_amd64": ("node-v16.19.0-linux-x64.tar.xz", "node-v16.19.0-linux-x64", "c88b52497ab38a3ddf526e5b46a41270320409109c3f74171b241132984fd08f"),
"16.19.0-windows_amd64": ("node-v16.19.0-win-x64.zip", "node-v16.19.0-win-x64", "534ca7a24e999c81cec847a498cc43d47e2bb158f6edf639e5297f2718350e96"),
},
node_version = "18.13.0",
node_version = "16.19.0",
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 v18.13.0: https://nodejs.org/dist/v18.13.0/SHASUMS256.txt.asc
Example for Node.js v16.19.0: https://nodejs.org/dist/v16.19.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 Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ for use in their own application.
|Minimal interface for admins to manage files in Kibana.
|{kib-repo}blob/{branch}/src/plugins/ftr_apis/README.md[ftrApis]
|This plugin exposes a set of APIs used internally during functional tests by the FTR.
|{kib-repo}blob/{branch}/src/plugins/guided_onboarding/README.md[guidedOnboarding]
|This plugin contains the code for the Guided Onboarding project. Guided onboarding consists of guides for Solutions (Enterprise Search, Observability, Security) that can be completed as a checklist of steps. The guides help users to ingest their data and to navigate to the correct Solutions pages.
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"makelogs": "node scripts/makelogs",
"spec_to_console": "node scripts/spec_to_console",
"start": "node scripts/kibana --dev",
"storybook": "node --openssl-legacy-provider scripts/storybook",
"storybook": "node 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 @@ -68,11 +68,11 @@
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "18.13.0",
"node": "16.19.0",
"yarn": "^1.22.19"
},
"resolutions": {
"**/@types/node": "18.11.18",
"**/@types/node": "16.11.68",
"**/chokidar": "^3.5.3",
"**/deepmerge": "^4.2.2",
"**/fast-deep-equal": "^3.1.1",
Expand Down Expand Up @@ -622,7 +622,7 @@
"query-string": "^6.13.2",
"rbush": "^3.0.1",
"re-resizable": "^6.1.1",
"re2": "1.17.7",
"re2": "1.17.4",
"react": "^17.0.2",
"react-ace": "^7.0.5",
"react-beautiful-dnd": "^13.1.0",
Expand Down Expand Up @@ -937,7 +937,7 @@
"@types/multistream": "^4.1.0",
"@types/mustache": "^0.8.31",
"@types/nock": "^10.0.3",
"@types/node": "18.11.18",
"@types/node": "16.11.68",
"@types/node-fetch": "^2.6.0",
"@types/node-forge": "^1.3.1",
"@types/nodemailer": "^6.4.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/kbn-i18n/src/core/i18n.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,13 @@ describe('I18n engine', () => {
i18n.translate('a.short', {
values: { expires: new Date(2018, 5, 20, 18, 40, 30, 50) },
} as any)
).toBe('Coupon expires at 6:40PM');
).toBe('Coupon expires at 6:40 PM');

expect(
i18n.translate('a.medium', {
values: { expires: new Date(2018, 5, 20, 18, 40, 30, 50) },
} as any)
).toBe('Coupon expires at 6:40:30PM');
).toBe('Coupon expires at 6:40:30 PM');
});

test('should format default messages with time formatter', () => {
Expand All @@ -679,14 +679,14 @@ describe('I18n engine', () => {
defaultMessage: 'Coupon expires at {expires, time, short}',
values: { expires: new Date(2018, 5, 20, 18, 40, 30, 50) },
})
).toBe('Coupon expires at 6:40PM');
).toBe('Coupon expires at 6:40 PM');

expect(
i18n.translate('foo', {
defaultMessage: 'Coupon expires at {expires, time, medium}',
values: { expires: new Date(2018, 5, 20, 18, 40, 30, 50) },
})
).toBe('Coupon expires at 6:40:30PM');
).toBe('Coupon expires at 6:40:30 PM');
});

test('should format message with a custom format', () => {
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-monaco/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@ 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: 0 additions & 1 deletion packages/kbn-optimizer/src/optimizer/observe_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ function usingWorkerProc<T>(config: OptimizerConfig, fn: (proc: ChildProcess) =>
(): ProcResource => {
const proc = fork(require.resolve('../worker/run_worker'), [], {
execArgv: [
'--openssl-legacy-provider',
`--require=@kbn/babel-register/install`,
...(inspectFlag && config.inspectWorkers
? [`${inspectFlag}=${inspectPortCounter++}`]
Expand Down
28 changes: 16 additions & 12 deletions packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import { inspect } from 'util';

import * as Rx from 'rxjs';
import { mergeMap } from 'rxjs/operators';
import { isAxiosResponseError } from '@kbn/dev-utils';
Expand Down Expand Up @@ -90,6 +89,11 @@ async function concurrently<T>(maxConcurrency: number, arr: T[], fn: (item: T) =
}
}

/**
* SO client for FTR.
*
* @remarks: Leverage the `ftrApis` plugin under the hood.
*/
export class KbnClientSavedObjects {
constructor(private readonly log: ToolingLog, private readonly requester: KbnClientRequester) {}

Expand Down Expand Up @@ -117,8 +121,8 @@ export class KbnClientSavedObjects {
const { data } = await this.requester.request<SavedObjectResponse<Attributes>>({
description: 'get saved object',
path: options.space
? uriencode`/s/${options.space}/api/saved_objects/${options.type}/${options.id}`
: uriencode`/api/saved_objects/${options.type}/${options.id}`,
? uriencode`/s/${options.space}/internal/ftr/kbn_client_so/${options.type}/${options.id}`
: uriencode`/internal/ftr/kbn_client_so/${options.type}/${options.id}`,
method: 'GET',
});
return data;
Expand All @@ -133,8 +137,8 @@ export class KbnClientSavedObjects {
const { data } = await this.requester.request<SavedObjectResponse<Attributes>>({
description: 'update saved object',
path: options.id
? uriencode`/api/saved_objects/${options.type}/${options.id}`
: uriencode`/api/saved_objects/${options.type}`,
? uriencode`/internal/ftr/kbn_client_so/${options.type}/${options.id}`
: uriencode`/internal/ftr/kbn_client_so/${options.type}`,
query: {
overwrite: options.overwrite,
},
Expand All @@ -156,7 +160,7 @@ export class KbnClientSavedObjects {

const { data } = await this.requester.request<SavedObjectResponse<Attributes>>({
description: 'update saved object',
path: uriencode`/api/saved_objects/${options.type}/${options.id}`,
path: uriencode`/internal/ftr/kbn_client_so/${options.type}/${options.id}`,
query: {
overwrite: options.overwrite,
},
Expand All @@ -179,8 +183,8 @@ export class KbnClientSavedObjects {
const { data } = await this.requester.request({
description: 'delete saved object',
path: options.space
? uriencode`/s/${options.space}/api/saved_objects/${options.type}/${options.id}`
: uriencode`/api/saved_objects/${options.type}/${options.id}`,
? uriencode`/s/${options.space}/internal/ftr/kbn_client_so/${options.type}/${options.id}`
: uriencode`/internal/ftr/kbn_client_so/${options.type}/${options.id}`,
method: 'DELETE',
});

Expand All @@ -196,8 +200,8 @@ export class KbnClientSavedObjects {
const resp = await this.requester.request<FindApiResponse>({
method: 'GET',
path: options.space
? uriencode`/s/${options.space}/api/saved_objects/_find`
: '/api/saved_objects/_find',
? uriencode`/s/${options.space}/internal/ftr/kbn_client_so/_find`
: `/internal/ftr/kbn_client_so/_find`,
query: {
per_page: 1000,
type: options.types,
Expand Down Expand Up @@ -270,8 +274,8 @@ export class KbnClientSavedObjects {
await this.requester.request({
method: 'DELETE',
path: options.space
? uriencode`/s/${options.space}/api/saved_objects/${obj.type}/${obj.id}?force=true`
: uriencode`/api/saved_objects/${obj.type}/${obj.id}?force=true`,
? uriencode`/s/${options.space}/internal/ftr/kbn_client_so/${obj.type}/${obj.id}`
: uriencode`/internal/ftr/kbn_client_so/${obj.type}/${obj.id}`,
});
deleted++;
} catch (error) {
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-ui-shared-deps-npm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ 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: 0 additions & 2 deletions packages/kbn-ui-shared-deps-src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ 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
22 changes: 11 additions & 11 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,17 @@ interface Package {
const packages: Package[] = [
{
name: 're2',
version: '1.17.7',
version: '1.17.4',
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.7/darwin-x64-108.gz',
sha256: '4ed378c5a7fe6134b717afe7642254aff1ed7a881cbcaa53a012ac3efab49f99',
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.7/linux-x64-108.gz',
sha256: '197a617ca2965f220848561afed71ff6df653f6d79910cf38e866c84ab38a236',
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',
},

// ARM builds are currently done manually as Github Actions used in upstream project
Expand All @@ -67,8 +67,8 @@ 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.7/linux-arm64-108.gz',
sha256: 'a690087a1a1fd9887aac1abdab68d1992600e218be10783da6d3381cca950c1a',
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',
},

// A similar process is necessary for building on ARM macs:
Expand All @@ -78,13 +78,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.7/darwin-arm64-108.gz',
sha256: '42afc32137ff5c5bebae5d68347a9786906748c2f28e06194d8950707f2ae90e',
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',
},

'win32-x64': {
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',
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',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ discover-app {
overflow: hidden;
}

.dscPageBody__sidebar {
position: relative;
}

.dscPageContent__wrapper {
padding: $euiSizeS $euiSizeS $euiSizeS 0;
overflow: hidden; // Ensures horizontal scroll of table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export function DiscoverLayout({
history={history}
/>
<EuiFlexGroup className="dscPageBody__contents" gutterSize="s">
<EuiFlexItem grow={false} className="dscPageBody__sidebar">
<EuiFlexItem grow={false}>
<SidebarMemoized
documents$={stateContainer.dataState.data$.documents$}
onAddField={onAddColumn}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ import {
import { i18n } from '@kbn/i18n';
import { UiCounterMetricType } from '@kbn/analytics';
import classNames from 'classnames';
import { FieldButton, FieldIcon } from '@kbn/react-field';
import { FieldButton } from '@kbn/react-field';
import type { DataViewField, DataView } from '@kbn/data-views-plugin/public';
import {
FieldIcon,
FieldPopover,
FieldPopoverHeader,
FieldPopoverHeaderProps,
FieldPopoverVisualize,
getFieldIconProps,
wrapFieldNameOnDot,
} from '@kbn/unified-field-list-plugin/public';
import { DiscoverFieldStats } from './discover_field_stats';
import { getTypeForFieldIcon } from '../../../../utils/get_type_for_field_icon';
import { DiscoverFieldDetails } from './deprecated_stats/discover_field_details';
import { getFieldTypeName } from '../../../../utils/get_field_type_name';
import { useDiscoverServices } from '../../../../hooks/use_discover_services';
import { SHOW_LEGACY_FIELD_TOP_VALUES, PLUGIN_ID } from '../../../../../common';
import { getUiActions } from '../../../../kibana_services';
Expand All @@ -59,10 +59,7 @@ const FieldInfoIcon: React.FC = memo(() => (
));

const DiscoverFieldTypeIcon: React.FC<{ field: DataViewField }> = memo(({ field }) => {
const typeForIcon = getTypeForFieldIcon(field);
return (
<FieldIcon type={typeForIcon} label={getFieldTypeName(typeForIcon)} scripted={field.scripted} />
);
return <FieldIcon {...getFieldIconProps(field)} />;
});

const FieldName: React.FC<{ field: DataViewField; highlight?: string }> = memo(
Expand Down

This file was deleted.

0 comments on commit 3102896

Please sign in to comment.