Skip to content

Commit 110a705

Browse files
author
Aaron Caldwell
committed
Merge remote-tracking branch 'upstream/master' into bump-up-index-pattern-select-component-limit
2 parents 7349132 + 0d486ae commit 110a705

File tree

686 files changed

+4166563
-5498
lines changed

Some content is hidden

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

686 files changed

+4166563
-5498
lines changed

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
22
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
33

4-
ARG NODE_VERSION=14.15.4
4+
ARG NODE_VERSION=14.16.0
55

66
FROM node:${NODE_VERSION} AS base
77

.ci/Jenkinsfile_security_cypress

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ kibanaPipeline(timeoutMinutes: 180) {
1717

1818
workers.ci(name: job, size: 'l', ramDisk: true) {
1919
kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable')
20-
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress.sh')()
20+
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_chrome.sh')()
21+
// Temporarily disabled to figure out test flake
22+
// kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_firefox.sh')()
2123
}
2224
}
2325
}

.ci/es-snapshots/Jenkinsfile_verify_es

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,38 +30,22 @@ kibanaPipeline(timeoutMinutes: 210) {
3030
"ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}",
3131
'IGNORE_SHIP_CI_STATS_ERROR=true',
3232
]) {
33-
parallel([
34-
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
35-
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
36-
'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
37-
'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
38-
'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
39-
'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
40-
'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
41-
'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
42-
'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
43-
'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
44-
'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
45-
'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
46-
'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
47-
'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
48-
]),
49-
'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
50-
'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
51-
'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
52-
'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
53-
'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
54-
'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
55-
'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
56-
'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
57-
'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
58-
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
59-
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
60-
'xpack-ciGroup11': kibanaPipeline.xpackCiGroupProcess(11),
61-
'xpack-ciGroup12': kibanaPipeline.xpackCiGroupProcess(12),
62-
'xpack-ciGroup13': kibanaPipeline.xpackCiGroupProcess(13),
63-
]),
64-
])
33+
kibanaPipeline.withTasks {
34+
tasks([
35+
kibanaPipeline.scriptTaskDocker('Jest Integration Tests', 'test/scripts/test/jest_integration.sh'),
36+
kibanaPipeline.scriptTask('API Integration Tests', 'test/scripts/test/api_integration.sh'),
37+
])
38+
39+
task {
40+
kibanaPipeline.buildOss(6)
41+
tasks.ossCiGroups()
42+
}
43+
44+
task {
45+
kibanaPipeline.buildXpack(10)
46+
tasks.xpackCiGroups()
47+
}
48+
}
6549
}
6650

6751
promoteSnapshot(SNAPSHOT_VERSION, SNAPSHOT_ID)
@@ -72,7 +56,9 @@ kibanaPipeline(timeoutMinutes: 210) {
7256
}
7357

7458
def promoteSnapshot(snapshotVersion, snapshotId) {
75-
node(workers.label('s')) {
76-
esSnapshots.promote(snapshotVersion, snapshotId)
59+
if (buildUtils.getBuildStatus() == 'SUCCESS') {
60+
node(workers.label('s')) {
61+
esSnapshots.promote(snapshotVersion, snapshotId)
62+
}
7763
}
7864
}

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.15.4
1+
14.16.0

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.15.4
1+
14.16.0

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
303 See Other
2+
3+
Location: https://www.elastic.co/community/codeofconduct

dev_docs/kibana_platform_plugin_intro.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ date: 2021-01-06
77
tags: ['kibana','onboarding', 'dev', 'architecture']
88
---
99

10-
From an end user perspective, Kibana is a tool for interacting with Elasticsearch, providing an easy way
10+
From an end user perspective, Kibana is a tool for interacting with Elasticsearch, providing an easy way
1111
to visualize and analyze data.
1212

1313
From a developer perspective, Kibana is a platform that provides a set of tools to build not only the UI you see in Kibana today, but
14-
a wide variety of applications that can be used to explore, visualize, and act upon data in Elasticsearch. The platform provides developers the ability
15-
to build applications, or inject extra functionality into
14+
a wide variety of applications that can be used to explore, visualize, and act upon data in Elasticsearch. The platform provides developers the ability
15+
to build applications, or inject extra functionality into
1616
already existing applications. Did you know that almost everything you see in the
1717
Kibana UI is built inside a plugin? If you removed all plugins from Kibana, you'd be left with an empty navigation menu, and a set of
1818
developer tools. The Kibana platform is a blank canvas, just waiting for a developer to come along and create something!
1919

2020
![Kibana personas](assets/kibana_platform_plugin_end_user.png)
21-
21+
2222
## Platform services
2323

2424
Plugins have access to three kinds of public services:
2525

2626
- Platform services provided by `core` (<DocLink id="kibPlatformIntro" section="core-services" text="Core services"/>)
2727
- Platform services provided by plugins (<DocLink id="kibPlatformIntro" section="platform-plugins" text="Platform plugins"/>)
28-
- Shared services provided by plugins, that are only relevant for only a few, specific plugins (e.g. "presentation utils").
28+
- Shared services provided by plugins, that are only relevant for only a few, specific plugins (e.g. "presentation utils").
2929

3030
The first two items are what make up "Platform services".
3131

@@ -37,9 +37,9 @@ clear, and we haven't done a great job of sticking to it. For example, notificat
3737
Today it looks something like this.
3838

3939
![Core vs platform plugins vs plugins](assets/platform_plugins_core.png)
40-
40+
4141
<DocAccordion buttonContent="A bit of history">
42-
When the Kibana platform and plugin infrastructure was built, we thought of two types of code: core services, and other plugin services. We planned to keep the most stable and fundamental
42+
When the Kibana platform and plugin infrastructure was built, we thought of two types of code: core services, and other plugin services. We planned to keep the most stable and fundamental
4343
code needed to build plugins inside core.
4444

4545
In reality, we ended up with many platform-like services living outside of core, with no (short term) intention of moving them. We highly encourage plugin developers to use
@@ -54,7 +54,7 @@ In reality, our plugin model ended up being used like micro-services. Plugins ar
5454
they desire, without the need to build a plugin.
5555

5656
Another side effect of having many small plugins is that common code often ends up extracted into another plugin. Use case specific utilities are exported,
57-
that are not meant to be used in a general manner. This makes our definition of "platform code" a bit trickier to define. We'd like to say "The platform is made up of
57+
that are not meant to be used in a general manner. This makes our definition of "platform code" a bit trickier to define. We'd like to say "The platform is made up of
5858
every publically exposed service", but in today's world, that wouldn't be a very accurate picture.
5959

6060
We recognize the need to better clarify the relationship between core functionality, platform-like plugin functionality, and functionality exposed by other plugins.
@@ -69,19 +69,19 @@ We will continue to focus on adding clarity around these types of services and w
6969
### Core services
7070

7171
Sometimes referred to just as Core, Core services provide the most basic and fundamental tools neccessary for building a plugin, like creating saved objects,
72-
routing, application registration, and notifications. The Core platform is not a plugin itself, although
72+
routing, application registration, notifications and <DocLink id="kibCoreLogging" text="logging"/>. The Core platform is not a plugin itself, although
7373
there are some plugins that provide platform functionality. We call these <DocLink id="kibPlatformIntro" section="platform-plugins" text="Platform plugins"/>.
7474

7575
### Platform plugins
7676

77-
Plugins that provide fundamental services and functionality to extend and customize Kibana, for example, the
77+
Plugins that provide fundamental services and functionality to extend and customize Kibana, for example, the
7878
<DocLink id="kibDataPlugin" text="data"/> plugin. There is no official way to tell if a plugin is a platform plugin or not.
7979
Platform plugins are _usually_ plugins that are managed by the Platform Group, but we are starting to see some exceptions.
8080

8181
## Plugins
8282

83-
Plugins are code that is written to extend and customize Kibana. Plugin's don't have to be part of the Kibana repo, though the Kibana
84-
repo does contain many plugins! Plugins add customizations by
83+
Plugins are code that is written to extend and customize Kibana. Plugin's don't have to be part of the Kibana repo, though the Kibana
84+
repo does contain many plugins! Plugins add customizations by
8585
using <DocLink id="kibPlatformIntro" section="extension-points" text="extension points"/> provided by <DocLink id="kibPlatformIntro" section="platform-services" text="platform services"/>.
8686
Sometimes people confuse the term "plugin" and "application". While often there is a 1:1 relationship between a plugin and an application, it is not always the case.
8787
A plugin may register many applications, or none.
@@ -97,7 +97,7 @@ adding it to core's application <DocLink id="kibPlatformIntro" section="registry
9797

9898
### Public plugin API
9999

100-
A plugin's public API consists of everything exported from a plugin's <DocLink id="kibPlatformIntro" section="plugin-lifecycle" text="start or setup lifecycle methods"/>,
100+
A plugin's public API consists of everything exported from a plugin's <DocLink id="kibPlatformIntro" section="plugin-lifecycle" text="start or setup lifecycle methods"/>,
101101
as well as from the top level `index.ts` files that exist in the three "scope" folders:
102102

103103
- common/index.ts
@@ -113,18 +113,18 @@ Core, and plugins, expose different features at different parts of their lifecyc
113113
specifically-named functions on the service definition.
114114

115115
Kibana has three lifecycles: setup, start, and stop. Each plugin’s setup function is called sequentially while Kibana is setting up
116-
on the server or when it is being loaded in the browser. The start functions are called sequentially after setup has been completed for all plugins.
116+
on the server or when it is being loaded in the browser. The start functions are called sequentially after setup has been completed for all plugins.
117117
The stop functions are called sequentially while Kibana is gracefully shutting down the server or when the browser tab or window is being closed.
118118

119119
The table below explains how each lifecycle relates to the state of Kibana.
120120

121121
| lifecycle | purpose | server | browser |
122122
| ---------- | ------ | ------- | ----- |
123123
| setup | perform "registration" work to setup environment for runtime |configure REST API endpoint, register saved object types, etc. | configure application routes in SPA, register custom UI elements in extension points, etc. |
124-
| start | bootstrap runtime logic | respond to an incoming request, request Elasticsearch server, etc. | start polling Kibana server, update DOM tree in response to user interactions, etc.|
124+
| start | bootstrap runtime logic | respond to an incoming request, request Elasticsearch server, etc. | start polling Kibana server, update DOM tree in response to user interactions, etc.|
125125
| stop | cleanup runtime | dispose of active handles before the server shutdown. | store session data in the LocalStorage when the user navigates away from Kibana, etc. |
126126

127-
Different service interfaces can and will be passed to setup, start, and stop because certain functionality makes sense in the context of a running plugin while other types
127+
Different service interfaces can and will be passed to setup, start, and stop because certain functionality makes sense in the context of a running plugin while other types
128128
of functionality may have restrictions or may only make sense in the context of a plugin that is stopping.
129129

130130
## Extension points
@@ -141,4 +141,4 @@ plugins to customize the Kibana experience. Examples of extension points are:
141141

142142
## Follow up material
143143

144-
Learn how to build your own plugin by following <DocLink id="kibDevTutorialBuildAPlugin" />
144+
Learn how to build your own plugin by following <DocLink id="kibDevTutorialBuildAPlugin" />

0 commit comments

Comments
 (0)