Skip to content

Commit a00bbbf

Browse files
Merge branch 'master' into graph/explorable-fields
2 parents ec41aee + 0bafcb9 commit a00bbbf

File tree

935 files changed

+25827
-9154
lines changed

Some content is hidden

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

935 files changed

+25827
-9154
lines changed

.ci/Jenkinsfile_coverage

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#!/bin/groovy
2+
3+
library 'kibana-pipeline-library'
4+
kibanaLibrary.load() // load from the Jenkins instance
5+
6+
stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a little bit
7+
timeout(time: 180, unit: 'MINUTES') {
8+
timestamps {
9+
ansiColor('xterm') {
10+
catchError {
11+
withEnv([
12+
'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
13+
]) {
14+
parallel([
15+
'kibana-intake-agent': {
16+
withEnv([
17+
'NODE_ENV=test' // Needed for jest tests only
18+
]) {
19+
kibanaPipeline.legacyJobRunner('kibana-intake')()
20+
}
21+
},
22+
'x-pack-intake-agent': {
23+
withEnv([
24+
'NODE_ENV=test' // Needed for jest tests only
25+
]) {
26+
kibanaPipeline.legacyJobRunner('x-pack-intake')()
27+
}
28+
},
29+
'kibana-oss-agent': kibanaPipeline.withWorkers('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
30+
'oss-ciGroup1': kibanaPipeline.getOssCiGroupWorker(1),
31+
'oss-ciGroup2': kibanaPipeline.getOssCiGroupWorker(2),
32+
'oss-ciGroup3': kibanaPipeline.getOssCiGroupWorker(3),
33+
'oss-ciGroup4': kibanaPipeline.getOssCiGroupWorker(4),
34+
'oss-ciGroup5': kibanaPipeline.getOssCiGroupWorker(5),
35+
'oss-ciGroup6': kibanaPipeline.getOssCiGroupWorker(6),
36+
'oss-ciGroup7': kibanaPipeline.getOssCiGroupWorker(7),
37+
'oss-ciGroup8': kibanaPipeline.getOssCiGroupWorker(8),
38+
'oss-ciGroup9': kibanaPipeline.getOssCiGroupWorker(9),
39+
'oss-ciGroup10': kibanaPipeline.getOssCiGroupWorker(10),
40+
'oss-ciGroup11': kibanaPipeline.getOssCiGroupWorker(11),
41+
'oss-ciGroup12': kibanaPipeline.getOssCiGroupWorker(12),
42+
]),
43+
'kibana-xpack-agent-1': kibanaPipeline.withWorkers('kibana-xpack-tests-1', { kibanaPipeline.buildXpack() }, [
44+
'xpack-ciGroup1': kibanaPipeline.getXpackCiGroupWorker(1),
45+
'xpack-ciGroup2': kibanaPipeline.getXpackCiGroupWorker(2),
46+
]),
47+
'kibana-xpack-agent-2': kibanaPipeline.withWorkers('kibana-xpack-tests-2', { kibanaPipeline.buildXpack() }, [
48+
'xpack-ciGroup3': kibanaPipeline.getXpackCiGroupWorker(3),
49+
'xpack-ciGroup4': kibanaPipeline.getXpackCiGroupWorker(4),
50+
]),
51+
52+
'kibana-xpack-agent-3': kibanaPipeline.withWorkers('kibana-xpack-tests-3', { kibanaPipeline.buildXpack() }, [
53+
'xpack-ciGroup5': kibanaPipeline.getXpackCiGroupWorker(5),
54+
'xpack-ciGroup6': kibanaPipeline.getXpackCiGroupWorker(6),
55+
'xpack-ciGroup7': kibanaPipeline.getXpackCiGroupWorker(7),
56+
'xpack-ciGroup8': kibanaPipeline.getXpackCiGroupWorker(8),
57+
'xpack-ciGroup9': kibanaPipeline.getXpackCiGroupWorker(9),
58+
'xpack-ciGroup10': kibanaPipeline.getXpackCiGroupWorker(10),
59+
]),
60+
])
61+
kibanaPipeline.jobRunner('tests-l', false) {
62+
kibanaPipeline.downloadCoverageArtifacts()
63+
kibanaPipeline.bash(
64+
'''
65+
# bootstrap from x-pack folder
66+
source src/dev/ci_setup/setup_env.sh
67+
cd x-pack
68+
yarn kbn bootstrap --prefer-offline
69+
cd ..
70+
# extract archives
71+
mkdir -p /tmp/extracted_coverage
72+
echo extracting intakes
73+
tar -xzf /tmp/downloaded_coverage/coverage/kibana-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
74+
tar -xzf /tmp/downloaded_coverage/coverage/x-pack-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
75+
echo extracting kibana-oss-tests
76+
tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
77+
echo extracting kibana-xpack-tests
78+
for i in {1..3}; do
79+
tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests-${i}/kibana-coverage.tar.gz -C /tmp/extracted_coverage
80+
done
81+
# replace path in json files to have valid html report
82+
pwd=$(pwd)
83+
du -sh /tmp/extracted_coverage/target/kibana-coverage/
84+
echo replacing path in json files
85+
for i in {1..9}; do
86+
sed -i "s|/dev/shm/workspace/kibana|$pwd|g" /tmp/extracted_coverage/target/kibana-coverage/functional/${i}*.json &
87+
done
88+
wait
89+
# merge oss & x-pack reports
90+
echo merging coverage reports
91+
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/jest --report-dir target/kibana-coverage/jest-combined --reporter=html --reporter=json-summary
92+
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/functional --report-dir target/kibana-coverage/functional-combined --reporter=html --reporter=json-summary
93+
echo copy mocha reports
94+
mkdir -p target/kibana-coverage/mocha-combined
95+
cp -r /tmp/extracted_coverage/target/kibana-coverage/mocha target/kibana-coverage/mocha-combined
96+
''',
97+
"run `yarn kbn bootstrap && merge coverage`"
98+
)
99+
sh 'tar -czf kibana-jest-coverage.tar.gz target/kibana-coverage/jest-combined/*'
100+
kibanaPipeline.uploadCoverageArtifacts("coverage/jest-combined", 'kibana-jest-coverage.tar.gz')
101+
sh 'tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/*'
102+
kibanaPipeline.uploadCoverageArtifacts("coverage/functional-combined", 'kibana-functional-coverage.tar.gz')
103+
sh 'tar -czf kibana-mocha-coverage.tar.gz target/kibana-coverage/mocha-combined/*'
104+
kibanaPipeline.uploadCoverageArtifacts("coverage/mocha-combined", 'kibana-mocha-coverage.tar.gz')
105+
}
106+
}
107+
}
108+
kibanaPipeline.sendMail()
109+
}
110+
}
111+
}
112+
}

.ci/Jenkinsfile_flaky

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def getWorkerMap(agentNumber, numberOfExecutions, worker, workerFailures, maxWor
9999
def numberOfWorkers = Math.min(numberOfExecutions, maxWorkerProcesses)
100100

101101
for(def i = 1; i <= numberOfWorkers; i++) {
102-
def workerExecutions = numberOfExecutions/numberOfWorkers + (i <= numberOfExecutions%numberOfWorkers ? 1 : 0)
102+
def workerExecutions = floor(numberOfExecutions/numberOfWorkers + (i <= numberOfExecutions%numberOfWorkers ? 1 : 0))
103103

104104
workerMap["agent-${agentNumber}-worker-${i}"] = { workerNumber ->
105105
for(def j = 0; j < workerExecutions; j++) {

.eslintrc.js

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -82,43 +82,18 @@ module.exports = {
8282
'react-hooks/exhaustive-deps': 'off',
8383
},
8484
},
85-
{
86-
files: ['src/legacy/core_plugins/kibana/**/*.{js,ts,tsx}'],
87-
rules: {
88-
'react-hooks/rules-of-hooks': 'off',
89-
'react-hooks/exhaustive-deps': 'off',
90-
},
91-
},
92-
{
93-
files: ['src/legacy/core_plugins/tile_map/**/*.{js,ts,tsx}'],
94-
rules: {
95-
'react-hooks/exhaustive-deps': 'off',
96-
},
97-
},
9885
{
9986
files: ['src/legacy/core_plugins/vis_type_markdown/**/*.{js,ts,tsx}'],
10087
rules: {
10188
'react-hooks/exhaustive-deps': 'off',
10289
},
10390
},
104-
{
105-
files: ['src/legacy/core_plugins/vis_type_metric/**/*.{js,ts,tsx}'],
106-
rules: {
107-
'jsx-a11y/click-events-have-key-events': 'off',
108-
},
109-
},
11091
{
11192
files: ['src/legacy/core_plugins/vis_type_table/**/*.{js,ts,tsx}'],
11293
rules: {
11394
'react-hooks/exhaustive-deps': 'off',
11495
},
11596
},
116-
{
117-
files: ['src/legacy/core_plugins/vis_type_vega/**/*.{js,ts,tsx}'],
118-
rules: {
119-
'react-hooks/exhaustive-deps': 'off',
120-
},
121-
},
12297
{
12398
files: ['src/legacy/ui/public/vis/**/*.{js,ts,tsx}'],
12499
rules: {
@@ -247,6 +222,7 @@ module.exports = {
247222
'!x-pack/test/**/*',
248223
'(src|x-pack)/plugins/**/(public|server)/**/*',
249224
'src/core/(public|server)/**/*',
225+
'examples/**/*',
250226
],
251227
from: [
252228
'src/core/public/**/*',
@@ -283,11 +259,15 @@ module.exports = {
283259
'x-pack/legacy/plugins/**/*',
284260
'!x-pack/legacy/plugins/*/server/**/*',
285261
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
262+
263+
'examples/**/*',
264+
'!examples/**/server/**/*',
286265
],
287266
from: [
288267
'src/core/server',
289268
'src/core/server/**/*',
290269
'(src|x-pack)/plugins/*/server/**/*',
270+
'examples/**/server/**/*',
291271
],
292272
errorMessage:
293273
'Server modules cannot be imported into client modules or shared modules.',

.github/CODEOWNERS

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
1515
/src/legacy/core_plugins/kibana/public/home/ @elastic/kibana-app
1616
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
17+
/src/legacy/core_plugins/metrics/ @elastic/kibana-app
1718
/src/plugins/home/ @elastic/kibana-app
1819
/src/plugins/kibana_legacy/ @elastic/kibana-app
1920
/src/plugins/timelion/ @elastic/kibana-app
@@ -30,6 +31,7 @@
3031
/src/plugins/visualizations/ @elastic/kibana-app-arch
3132
/x-pack/plugins/advanced_ui_actions/ @elastic/kibana-app-arch
3233
/src/legacy/core_plugins/data/ @elastic/kibana-app-arch
34+
/src/legacy/core_plugins/elasticsearch/lib/create_proxy.js @elastic/kibana-app-arch
3335
/src/legacy/core_plugins/embeddable_api/ @elastic/kibana-app-arch
3436
/src/legacy/core_plugins/interpreter/ @elastic/kibana-app-arch
3537
/src/legacy/core_plugins/kibana_react/ @elastic/kibana-app-arch
@@ -146,6 +148,3 @@
146148
/x-pack/legacy/plugins/searchprofiler/ @elastic/es-ui
147149
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
148150
/x-pack/legacy/plugins/watcher/ @elastic/es-ui
149-
150-
# Kibana TSVB external contractors
151-
/src/legacy/core_plugins/metrics/ @elastic/kibana-tsvb-external

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ These snapshots are built on a nightly basis which expire after a couple weeks.
190190
yarn es snapshot
191191
```
192192

193+
##### Keeping data between snapshots
194+
195+
If you want to keep the data inside your Elasticsearch between usages of this command,
196+
you should use the following command, to keep your data folder outside the downloaded snapshot
197+
folder:
198+
199+
```bash
200+
yarn es snapshot -E path.data=../data
201+
```
202+
203+
The same parameter can be used with the source and archive command shown in the following
204+
paragraphs.
205+
193206
#### Source
194207

195208
By default, it will reference an [elasticsearch](https://github.com/elastic/elasticsearch) checkout which is a sibling to the Kibana directory named `elasticsearch`. If you wish to use a checkout in another location you can provide that by supplying `--source-path`

docs/apm/settings.asciidoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
[[apm-settings-in-kibana]]
44
=== APM settings in Kibana
55

6-
You do not need to configure any settings to use APM. It is enabled by default.
7-
If you'd like to change any of the default values,
8-
copy and paste the relevant settings below into your `kibana.yml` configuration file.
6+
You do not need to configure any settings to use the APM app. It is enabled by default.
7+
8+
[float]
9+
[[apm-indices-settings]]
10+
==== APM Indices
11+
12+
include::./../settings/apm-settings.asciidoc[tag=apm-indices-settings]
13+
14+
[float]
15+
[[general-apm-settings]]
16+
==== General APM settings
917

1018
include::./../settings/apm-settings.asciidoc[tag=general-apm-settings]

docs/apm/troubleshooting.asciidoc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This section can help with any of the following:
1717
There are a number of factors that could be at play here.
1818
One important thing to double-check first is your index template.
1919

20+
*Index template*
2021
An APM index template must exist for the APM app to work correctly.
2122
By default, this index template is created by APM Server on startup.
2223
However, this only happens if `setup.template.enabled` is `true` in `apm-server.yml`.
@@ -34,14 +35,21 @@ GET /_template/apm-{version}
3435
--------------------------------------------------
3536
// CONSOLE
3637

38+
*Using Logstash, Kafka, etc.*
3739
If you're not outputting data directly from APM Server to Elasticsearch (perhaps you're using Logstash or Kafka),
3840
then the index template will not be set up automatically. Instead, you'll need to
39-
{apm-server-ref}/_manually_loading_template_configuration.html#load-template-manually-alternate[load the template manually].
41+
{apm-server-ref}/_manually_loading_template_configuration.html[load the template manually].
4042

41-
Finally, this problem can also occur if you've changed the index name that you write APM data to.
42-
The default index pattern can be found {apm-server-ref}/elasticsearch-output.html#index-option-es[here].
43-
If you change this setting, you must also configure the `setup.template.name` and `setup.template.pattern` options.
43+
*Using a custom index names*
44+
This problem can also occur if you've customized the index name that you write APM data to.
45+
The default index name that APM writes events to can be found
46+
{apm-server-ref}/elasticsearch-output.html#index-option-es[here].
47+
If you change the default, you must also configure the `setup.template.name` and `setup.template.pattern` options.
4448
See {apm-server-ref}/configuration-template.html[Load the Elasticsearch index template].
49+
If the Elasticsearch index template has already been successfully loaded to the index,
50+
you can customize the indices that the APM app uses to display data.
51+
Navigate to *APM* > *Settings* > *Indices*, and change all `apm_oss.*Pattern` values to
52+
include the new index pattern. For example: `customIndexName-*`.
4553

4654
==== Unknown route
4755

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [AppLeaveAction](./kibana-plugin-public.appleaveaction.md)
4+
5+
## AppLeaveAction type
6+
7+
Possible actions to return from a [AppLeaveHandler](./kibana-plugin-public.appleavehandler.md)
8+
9+
See [AppLeaveConfirmAction](./kibana-plugin-public.appleaveconfirmaction.md) and [AppLeaveDefaultAction](./kibana-plugin-public.appleavedefaultaction.md)
10+
11+
<b>Signature:</b>
12+
13+
```typescript
14+
export declare type AppLeaveAction = AppLeaveDefaultAction | AppLeaveConfirmAction;
15+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [AppLeaveActionType](./kibana-plugin-public.appleaveactiontype.md)
4+
5+
## AppLeaveActionType enum
6+
7+
Possible type of actions on application leave.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export declare enum AppLeaveActionType
13+
```
14+
15+
## Enumeration Members
16+
17+
| Member | Value | Description |
18+
| --- | --- | --- |
19+
| confirm | <code>&quot;confirm&quot;</code> | |
20+
| default | <code>&quot;default&quot;</code> | |
21+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [AppLeaveConfirmAction](./kibana-plugin-public.appleaveconfirmaction.md)
4+
5+
## AppLeaveConfirmAction interface
6+
7+
Action to return from a [AppLeaveHandler](./kibana-plugin-public.appleavehandler.md) to show a confirmation message when trying to leave an application.
8+
9+
See
10+
11+
<b>Signature:</b>
12+
13+
```typescript
14+
export interface AppLeaveConfirmAction
15+
```
16+
17+
## Properties
18+
19+
| Property | Type | Description |
20+
| --- | --- | --- |
21+
| [text](./kibana-plugin-public.appleaveconfirmaction.text.md) | <code>string</code> | |
22+
| [title](./kibana-plugin-public.appleaveconfirmaction.title.md) | <code>string</code> | |
23+
| [type](./kibana-plugin-public.appleaveconfirmaction.type.md) | <code>AppLeaveActionType.confirm</code> | |
24+

0 commit comments

Comments
 (0)