Skip to content

Commit f35bd4c

Browse files
Merge branch 'master' into feat/tagcloud_renderer
2 parents 5c72381 + 4d08763 commit f35bd4c

1,678 files changed

Lines changed: 77010 additions & 83117 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 9 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
const { readdirSync } = require('fs');
21-
const { resolve } = require('path');
22-
2320
const APACHE_2_0_LICENSE_HEADER = `
2421
/*
2522
* Licensed to Elasticsearch B.V. under one or more contributor
@@ -288,7 +285,7 @@ module.exports = {
288285
},
289286
{
290287
target: [
291-
'(src|x-pack)/legacy/**/*',
288+
'src/legacy/**/*',
292289
'(src|x-pack)/plugins/**/(public|server)/**/*',
293290
'examples/**/*',
294291
],
@@ -319,14 +316,11 @@ module.exports = {
319316
},
320317
{
321318
target: [
322-
'(src|x-pack)/legacy/**/*',
319+
'src/legacy/**/*',
323320
'(src|x-pack)/plugins/**/(public|server)/**/*',
324321
'examples/**/*',
325322
'!(src|x-pack)/**/*.test.*',
326323
'!(x-pack/)?test/**/*',
327-
// next folder contains legacy browser tests which can't be migrated to jest
328-
// which import np files
329-
'!src/legacy/core_plugins/kibana/public/__tests__/**/*',
330324
],
331325
from: [
332326
'(src|x-pack)/plugins/**/(public|server)/**/*',
@@ -341,14 +335,6 @@ module.exports = {
341335
'(src|x-pack)/plugins/**/*',
342336
'!(src|x-pack)/plugins/**/server/**/*',
343337

344-
'src/legacy/core_plugins/**/*',
345-
'!src/legacy/core_plugins/**/server/**/*',
346-
'!src/legacy/core_plugins/**/index.{js,mjs,ts,tsx}',
347-
348-
'x-pack/legacy/plugins/**/*',
349-
'!x-pack/legacy/plugins/**/server/**/*',
350-
'!x-pack/legacy/plugins/**/index.{js,mjs,ts,tsx}',
351-
352338
'examples/**/*',
353339
'!examples/**/server/**/*',
354340
],
@@ -370,12 +356,7 @@ module.exports = {
370356
},
371357
{
372358
target: ['src/core/**/*'],
373-
from: [
374-
'plugins/**/*',
375-
'src/plugins/**/*',
376-
'src/legacy/core_plugins/**/*',
377-
'src/legacy/ui/**/*',
378-
],
359+
from: ['plugins/**/*', 'src/plugins/**/*', 'src/legacy/ui/**/*'],
379360
errorMessage: 'The core cannot depend on any plugins.',
380361
},
381362
{
@@ -388,12 +369,6 @@ module.exports = {
388369
target: [
389370
'test/plugin_functional/plugins/**/public/np_ready/**/*',
390371
'test/plugin_functional/plugins/**/server/np_ready/**/*',
391-
'src/legacy/core_plugins/**/public/np_ready/**/*',
392-
'src/legacy/core_plugins/vis_type_*/public/**/*',
393-
'!src/legacy/core_plugins/vis_type_*/public/legacy*',
394-
'src/legacy/core_plugins/**/server/np_ready/**/*',
395-
'x-pack/legacy/plugins/**/public/np_ready/**/*',
396-
'x-pack/legacy/plugins/**/server/np_ready/**/*',
397372
],
398373
allowSameFolder: true,
399374
errorMessage:
@@ -443,22 +418,14 @@ module.exports = {
443418
settings: {
444419
// instructs import/no-extraneous-dependencies to treat certain modules
445420
// as core modules, even if they aren't listed in package.json
446-
'import/core-modules': ['plugins', 'legacy/ui'],
421+
'import/core-modules': ['plugins'],
447422

448423
'import/resolver': {
449424
'@kbn/eslint-import-resolver-kibana': {
450425
forceNode: false,
451426
rootPackageName: 'kibana',
452427
kibanaPath: '.',
453-
pluginMap: readdirSync(resolve(__dirname, 'x-pack/legacy/plugins')).reduce(
454-
(acc, name) => {
455-
if (!name.startsWith('_')) {
456-
acc[name] = `x-pack/legacy/plugins/${name}`;
457-
}
458-
return acc;
459-
},
460-
{}
461-
),
428+
pluginMap: {},
462429
},
463430
},
464431
},
@@ -764,16 +731,6 @@ module.exports = {
764731
},
765732
},
766733

767-
/**
768-
* GIS overrides
769-
*/
770-
{
771-
files: ['x-pack/legacy/plugins/maps/**/*.js'],
772-
rules: {
773-
'react/prefer-stateless-function': [0, { ignorePureComponents: false }],
774-
},
775-
},
776-
777734
/**
778735
* ML overrides
779736
*/
@@ -812,7 +769,7 @@ module.exports = {
812769
},
813770
{
814771
// typescript only for front and back end
815-
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{ts,tsx}'],
772+
files: ['x-pack/plugins/security_solution/**/*.{ts,tsx}'],
816773
rules: {
817774
// This will be turned on after bug fixes are complete
818775
// '@typescript-eslint/explicit-member-accessibility': 'warn',
@@ -858,7 +815,7 @@ module.exports = {
858815
// },
859816
{
860817
// typescript and javascript for front and back end
861-
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
818+
files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
862819
plugins: ['eslint-plugin-node', 'react'],
863820
env: {
864821
mocha: true,
@@ -1089,7 +1046,7 @@ module.exports = {
10891046
{
10901047
// typescript only for front and back end
10911048
files: [
1092-
'x-pack/{,legacy/}plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
1049+
'x-pack/plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
10931050
],
10941051
rules: {
10951052
'@typescript-eslint/no-explicit-any': 'error',
@@ -1238,10 +1195,7 @@ module.exports = {
12381195
* TSVB overrides
12391196
*/
12401197
{
1241-
files: [
1242-
'src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
1243-
'src/legacy/core_plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
1244-
],
1198+
files: ['src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}'],
12451199
rules: {
12461200
'import/no-default-export': 'error',
12471201
},

.github/CODEOWNERS

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
/x-pack/plugins/discover_enhanced/ @elastic/kibana-app
88
/x-pack/plugins/lens/ @elastic/kibana-app
99
/x-pack/plugins/graph/ @elastic/kibana-app
10+
/src/plugins/advanced_settings/ @elastic/kibana-app
1011
/src/plugins/charts/ @elastic/kibana-app
1112
/src/plugins/dashboard/ @elastic/kibana-app
1213
/src/plugins/discover/ @elastic/kibana-app
1314
/src/plugins/input_control_vis/ @elastic/kibana-app
15+
/src/plugins/management/ @elastic/kibana-app
1416
/src/plugins/kibana_legacy/ @elastic/kibana-app
1517
/src/plugins/vis_default_editor/ @elastic/kibana-app
1618
/src/plugins/vis_type_markdown/ @elastic/kibana-app
@@ -38,7 +40,6 @@
3840
/examples/url_generators_explorer/ @elastic/kibana-app-arch
3941
/packages/elastic-datemath/ @elastic/kibana-app-arch
4042
/packages/kbn-interpreter/ @elastic/kibana-app-arch
41-
/src/plugins/advanced_settings/ @elastic/kibana-app-arch
4243
/src/plugins/bfetch/ @elastic/kibana-app-arch
4344
/src/plugins/data/ @elastic/kibana-app-arch
4445
/src/plugins/embeddable/ @elastic/kibana-app-arch
@@ -47,7 +48,6 @@
4748
/src/plugins/kibana_react/ @elastic/kibana-app-arch
4849
/src/plugins/kibana_react/public/code_editor @elastic/kibana-canvas
4950
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
50-
/src/plugins/management/ @elastic/kibana-app-arch
5151
/src/plugins/navigation/ @elastic/kibana-app-arch
5252
/src/plugins/share/ @elastic/kibana-app-arch
5353
/src/plugins/ui_actions/ @elastic/kibana-app-arch
@@ -65,14 +65,15 @@
6565

6666
# Client Side Monitoring (lives in APM directories but owned by Uptime)
6767
/x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm @elastic/uptime
68+
/x-pack/plugins/apm/e2e/cypress/integration/csm_dashboard.feature @elastic/uptime
6869
/x-pack/plugins/apm/public/application/csmApp.tsx @elastic/uptime
6970
/x-pack/plugins/apm/public/components/app/RumDashboard @elastic/uptime
7071
/x-pack/plugins/apm/server/lib/rum_client @elastic/uptime
7172
/x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime
72-
/x-pack/plugins/apm/server/projections/rum_overview.ts @elastic/uptime
73+
/x-pack/plugins/apm/server/projections/rum_page_load_transactions.ts @elastic/uptime
7374

7475
# Beats
75-
/x-pack/legacy/plugins/beats_management/ @elastic/beats
76+
/x-pack/plugins/beats_management/ @elastic/beats
7677

7778
# Canvas
7879
/x-pack/plugins/canvas/ @elastic/kibana-canvas
@@ -86,16 +87,13 @@
8687
/x-pack/plugins/global_search_bar/ @elastic/kibana-core-ui
8788

8889
# Observability UIs
89-
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
9090
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
9191
/x-pack/plugins/ingest_manager/ @elastic/ingest-management
92-
/x-pack/legacy/plugins/ingest_manager/ @elastic/ingest-management
9392
/x-pack/plugins/observability/ @elastic/observability-ui
9493
/x-pack/plugins/monitoring/ @elastic/stack-monitoring-ui
9594
/x-pack/plugins/uptime @elastic/uptime
9695

9796
# Machine Learning
98-
/x-pack/legacy/plugins/ml/ @elastic/ml-ui
9997
/x-pack/plugins/ml/ @elastic/ml-ui
10098
/x-pack/test/functional/apps/machine_learning/ @elastic/ml-ui
10199
/x-pack/test/functional/services/machine_learning/ @elastic/ml-ui
@@ -107,7 +105,6 @@
107105
/x-pack/test/functional/services/transform.ts @elastic/ml-ui
108106

109107
# Maps
110-
/x-pack/legacy/plugins/maps/ @elastic/kibana-gis
111108
/x-pack/plugins/maps/ @elastic/kibana-gis
112109
/x-pack/test/api_integration/apis/maps/ @elastic/kibana-gis
113110
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
@@ -234,13 +231,8 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
234231
/src/plugins/dev_tools/ @elastic/es-ui
235232
/src/plugins/console/ @elastic/es-ui
236233
/src/plugins/es_ui_shared/ @elastic/es-ui
237-
/x-pack/legacy/plugins/cross_cluster_replication/ @elastic/es-ui
234+
/x-pack/plugins/cross_cluster_replication/ @elastic/es-ui
238235
/x-pack/plugins/index_lifecycle_management/ @elastic/es-ui
239-
/x-pack/legacy/plugins/index_management/ @elastic/es-ui
240-
/x-pack/legacy/plugins/license_management/ @elastic/es-ui
241-
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
242-
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
243-
/x-pack/legacy/plugins/upgrade_assistant/ @elastic/es-ui
244236
/x-pack/plugins/console_extensions/ @elastic/es-ui
245237
/x-pack/plugins/es_ui_shared/ @elastic/es-ui
246238
/x-pack/plugins/grokdebugger/ @elastic/es-ui

.telemetryrc.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"src/plugins/kibana_react/",
77
"src/plugins/testbed/",
88
"src/plugins/kibana_utils/",
9-
"src/plugins/kibana_usage_collection/server/collectors/kibana/kibana_usage_collector.ts",
109
"src/plugins/kibana_usage_collection/server/collectors/management/telemetry_management_collector.ts",
11-
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts",
12-
"src/plugins/telemetry/server/collectors/usage/telemetry_usage_collector.ts"
10+
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts"
1311
]
1412
}
1513
]

docs/apm/service-maps.asciidoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
[[service-maps]]
33
=== Service maps
44

5-
beta::[]
6-
7-
WARNING: Service map support for Internet Explorer 11 is extremely limited.
8-
Please use Chrome or Firefox if available.
9-
105
A service map is a real-time visual representation of the instrumented services in your application's architecture.
116
It shows you how these services are connected, along with high-level metrics like average transaction duration,
127
requests per minute, and errors per minute.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
[[ci-metrics]]
2+
== CI Metrics
3+
4+
In addition to running our tests, CI collects metrics about the Kibana build. These metrics are sent to an external service to track changes over time, and to provide PR authors insights into the impact of their changes.
5+
6+
7+
[[ci-metric-types]]
8+
=== Metric types
9+
10+
11+
[[ci-metric-types-bundle-size-metrics]]
12+
==== Bundle size
13+
14+
These metrics help contributors know how they are impacting the size of the bundles Kibana creates, and help make sure that Kibana loads as fast as possible.
15+
16+
[[ci-metric-page-load-bundle-size]] `page load bundle size` ::
17+
The size of the entry file produced for each bundle/plugin. This file is always loaded on every page load, so it should be as small as possible. To reduce this metric you can put any code that isn't necessary on every page load behind an https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports[`async import()`].
18+
+
19+
Code that is shared statically with other plugins will contribute to the `page load bundle size` of that plugin. This includes exports from the `public/index.ts` file and any file referenced by the `extraPublicDirs` manifest property.
20+
21+
[[ci-metric-async-chunks-size]] `async chunks size` ::
22+
An "async chunk" is created for the files imported by each https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports[`async import()`] statement. This metric tracks the sum size of these chunks, in bytes, broken down by plugin/bundle id. You can think of this as the amount of code users will have to download if they access all the components/applications within a bundle.
23+
24+
[[ci-metric-misc-asset-size]] `miscellaneous assets size` ::
25+
A "miscellaneous asset" is anything that isn't an async chunk or entry chunk, often images. This metric tracks the sum size of these assets, in bytes, broken down by plugin/bundle id.
26+
27+
[[ci-metric-bundle-module-count]] `@kbn/optimizer bundle module count` ::
28+
The number of separate modules included in each bundle/plugin. This is the best indicator we have for how long a specific bundle will take to be built by the `@kbn/optimizer`, so we report it to help people know when they've imported a module which might include a surprising number of sub-modules.
29+
30+
31+
[[ci-metric-types-distributable-size]]
32+
==== Distributable size
33+
34+
The size of the Kibana distributable is an essential metric as it not only contributes to the time it takes to download, but it also impacts time it takes to extract the archive once downloaded.
35+
36+
There are several metrics that we don't report on PRs because gzip-compression produces different file sizes even when provided the same input, so this metric would regularly show changes even though PR authors hadn't made any relevant changes.
37+
38+
All metrics are collected from the `tar.gz` archive produced for the linux platform.
39+
40+
[[ci-metric-distributable-file-count]] `distributable file count` ::
41+
The number of files included in the default distributable.
42+
43+
[[ci-metric-oss-distributable-file-count]] `oss distributable file count` ::
44+
The number of files included in the OSS distributable.
45+
46+
[[ci-metric-distributable-size]] `distributable size` ::
47+
The size, in bytes, of the default distributable. _(not reported on PRs)_
48+
49+
[[ci-metric-oss-distributable-size]] `oss distributable size` ::
50+
The size, in bytes, of the OSS distributable. _(not reported on PRs)_
51+
52+
53+
[[ci-metric-types-saved-object-field-counts]]
54+
==== Saved Object field counts
55+
56+
Elasticsearch limits the number of fields in an index to 1000 by default, and we want to avoid raising that limit.
57+
58+
[[ci-metric-saved-object-field-count]] `Saved Objects .kibana field count` ::
59+
The number of saved object fields broken down by saved object type.
60+
61+
62+
[[ci-metric-adding-new-metrics]]
63+
=== Adding new metrics
64+
65+
You can report new metrics by using the `CiStatsReporter` class provided by the `@kbn/dev-utils` package. This class is automatically configured on CI and its methods noop when running outside of CI. For more details checkout the {kib-repo}blob/{branch}/packages/kbn-dev-utils/src/ci_stats_reporter[`CiStatsReporter` readme].

docs/developer/contributing/index.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Read <<development-getting-started>> to get your environment up and running, the
99
* <<development-tests>>
1010
* <<development-github>>
1111
* <<interpreting-ci-failures>>
12+
* <<ci-metrics>>
1213
* <<development-documentation>>
1314
* <<development-pull-request>>
1415
* <<kibana-issue-reporting>>
@@ -78,6 +79,8 @@ include::development-tests.asciidoc[leveloffset=+1]
7879

7980
include::interpreting-ci-failures.asciidoc[leveloffset=+1]
8081

82+
include::development-ci-metrics.asciidoc[leveloffset=+1]
83+
8184
include::development-documentation.asciidoc[leveloffset=+1]
8285

8386
include::development-pull-request.asciidoc[leveloffset=+1]

docs/developer/plugin-list.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,10 @@ in their infrastructure.
504504
|Contains HTTP endpoints and UiSettings that are slated for removal.
505505
506506
507+
|{kib-repo}blob/{branch}/x-pack/plugins/drilldowns/url_drilldown/README.md[urlDrilldown]
508+
|NOTE: This plugin contains implementation of URL drilldown. For drilldowns infrastructure code refer to ui_actions_enhanced plugin.
509+
510+
507511
|===
508512
509513
include::{kibana-root}/src/plugins/dashboard/README.asciidoc[leveloffset=+1]

docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ export interface SavedObjectsFindOptions
2929
| [sortField](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | <code>string</code> | |
3030
| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | <code>string</code> | |
3131
| [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | <code>string &#124; string[]</code> | |
32+
| [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | <code>Map&lt;string, string[] &#124; undefined&gt;</code> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the <code>type</code> and <code>namespaces</code> fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |
3233

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsFindOptions](./kibana-plugin-core-public.savedobjectsfindoptions.md) &gt; [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md)
4+
5+
## SavedObjectsFindOptions.typeToNamespacesMap property
6+
7+
This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the `type` and `namespaces` fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
typeToNamespacesMap?: Map<string, string[] | undefined>;
13+
```

docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ export interface SavedObjectsFindOptions
2929
| [sortField](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | <code>string</code> | |
3030
| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | <code>string</code> | |
3131
| [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | <code>string &#124; string[]</code> | |
32+
| [typeToNamespacesMap](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | <code>Map&lt;string, string[] &#124; undefined&gt;</code> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the <code>type</code> and <code>namespaces</code> fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |
3233

0 commit comments

Comments
 (0)