Skip to content

Commit acedf44

Browse files
Merge branch 'master' into docker/ironbank-context
2 parents 7445d99 + e4794af commit acedf44

744 files changed

Lines changed: 14409 additions & 6141 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.

.bazelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@
22
# Import shared settings first so we can override below
33
import %workspace%/.bazelrc.common
44

5+
## Disabled for now
56
# Remote cache settings for local env
67
# build --remote_cache=https://storage.googleapis.com/kibana-bazel-cache
78
# build --incompatible_remote_results_ignore_disk=true
89
# build --remote_accept_cached=true
910
# build --remote_upload_local_results=false
11+
12+
# BuildBuddy
13+
## Metadata settings
14+
build --workspace_status_command=$(pwd)/src/dev/bazel_workspace_status.sh
15+
# Enable this in case you want to share your build info
16+
# build --build_metadata=VISIBILITY=PUBLIC
17+
build --build_metadata=TEST_GROUPS=//packages
18+

.ci/end2end.groovy

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,15 @@ pipeline {
121121
}
122122

123123
def notifyStatus(String description, String status) {
124-
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('pipeline'))
124+
notify(context: 'end2end-for-apm-ui', description: description, status: status, targetUrl: getBlueoceanTabURL('pipeline'))
125125
}
126126

127127
def notifyTestStatus(String description, String status) {
128-
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
128+
notify(context: 'end2end-for-apm-ui', description: description, status: status, targetUrl: getBlueoceanTabURL('tests'))
129+
}
130+
131+
def notify(Map args = [:]) {
132+
retryWithSleep(retries: 2, seconds: 5, backoff: true) {
133+
githubNotify(context: args.context, description: args.description, status: args.status, targetUrl: args.targetUrl)
134+
}
129135
}

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ target
1616
snapshots.js
1717

1818
!/.eslintrc.js
19+
!.storybook
1920

2021
# plugin overrides
2122
/src/core/lib/kbn_internal_native_observable

.eslintrc.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,12 +1112,22 @@ module.exports = {
11121112

11131113
/**
11141114
* Enterprise Search overrides
1115+
* NOTE: We also have a single rule at the bottom of the file that
1116+
* overrides Prettier's default of not linting unnecessary backticks
11151117
*/
11161118
{
1119+
// All files
11171120
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
1118-
excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'],
11191121
rules: {
11201122
'react-hooks/exhaustive-deps': 'off',
1123+
'react/jsx-boolean-value': ['error', 'never'],
1124+
},
1125+
},
1126+
{
1127+
// Source files only - allow `any` in test/mock files
1128+
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
1129+
excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'],
1130+
rules: {
11211131
'@typescript-eslint/no-explicit-any': 'error',
11221132
},
11231133
},
@@ -1260,6 +1270,16 @@ module.exports = {
12601270
...require('eslint-config-prettier/@typescript-eslint').rules,
12611271
},
12621272
},
1273+
/**
1274+
* Enterprise Search Prettier override
1275+
* Lints unnecessary backticks - @see https://github.com/prettier/eslint-config-prettier/blob/main/README.md#forbid-unnecessary-backticks
1276+
*/
1277+
{
1278+
files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'],
1279+
rules: {
1280+
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
1281+
},
1282+
},
12631283

12641284
{
12651285
files: [

docs/developer/architecture/index.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ To begin plugin development, we recommend reading our overview of how plugins wo
1313
* <<kibana-platform-plugin-api>>
1414

1515
Our developer services are changing all the time. One of the best ways to discover and learn about them is to read the available
16-
READMEs from all the plugins inside our {kib-repo}tree/{branch}/src/plugins[open source plugins folder] and our
17-
{kib-repo}/tree/{branch}/x-pack/plugins[commercial plugins folder].
16+
READMEs inside our plugins folders: {kib-repo}tree/{branch}/src/plugins[src/plugins] and
17+
{kib-repo}/tree/{branch}/x-pack/plugins[x-pack/plugins].
1818

1919
A few services also automatically generate api documentation which can be browsed inside the {kib-repo}tree/{branch}/docs/development[docs/development section of our repo]
2020

docs/developer/getting-started/running-kibana-advanced.asciidoc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,6 @@ By default, you can log in with username `elastic` and password
2323
`changeme`. See the `--help` options on `yarn es <command>` if
2424
you’d like to configure a different password.
2525

26-
[discrete]
27-
=== Running {kib} in Open-Source mode
28-
29-
If you’re looking to only work with the open-source software, supply the
30-
license type to `yarn es`:
31-
32-
[source,bash]
33-
----
34-
yarn es snapshot --license oss
35-
----
36-
37-
And start {kib} with only open-source code:
38-
39-
[source,bash]
40-
----
41-
yarn start --oss
42-
----
43-
4426
[discrete]
4527
=== Unsupported URL Type
4628

docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,20 @@ export function plugin(initializerContext: PluginInitializerContext) {
7171
*plugins/my_plugin/(public|server)/plugin.ts*
7272
[source,typescript]
7373
----
74-
import type { Observable } from 'rxjs';
75-
import { first } from 'rxjs/operators';
7674
import { CoreSetup, Logger, Plugin, PluginInitializerContext, PluginName } from 'kibana/server';
7775
import type { MyPluginConfig } from './config';
7876
7977
export class MyPlugin implements Plugin {
80-
private readonly config$: Observable<MyPluginConfig>;
78+
private readonly config: MyPluginConfig;
8179
private readonly log: Logger;
8280
8381
constructor(private readonly initializerContext: PluginInitializerContext) {
8482
this.log = initializerContext.logger.get();
85-
this.config$ = initializerContext.config.create();
83+
this.config = initializerContext.config.get<MyPluginConfig>();
8684
}
8785
88-
public async setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
89-
const isEnabled = await this.config$.pipe(first()).toPromise();
86+
public setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
87+
const { someConfigValue } = this.config;
9088
}
9189
}
9290
----
@@ -96,7 +94,7 @@ Additionally, some plugins need to access the runtime env configuration.
9694
[source,typescript]
9795
----
9896
export class MyPlugin implements Plugin {
99-
public async setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
97+
public setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
10098
const { mode: { dev }, packageInfo: { version } } = this.initializerContext.env
10199
}
102100
----
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md)
4+
5+
## AsyncPlugin interface
6+
7+
> Warning: This API is now obsolete.
8+
>
9+
> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-public.plugin.md)
10+
>
11+
12+
A plugin with asynchronous lifecycle methods.
13+
14+
<b>Signature:</b>
15+
16+
```typescript
17+
export interface AsyncPlugin<TSetup = void, TStart = void, TPluginsSetup extends object = object, TPluginsStart extends object = object>
18+
```
19+
20+
## Methods
21+
22+
| Method | Description |
23+
| --- | --- |
24+
| [setup(core, plugins)](./kibana-plugin-core-public.asyncplugin.setup.md) | |
25+
| [start(core, plugins)](./kibana-plugin-core-public.asyncplugin.start.md) | |
26+
| [stop()](./kibana-plugin-core-public.asyncplugin.stop.md) | |
27+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [setup](./kibana-plugin-core-public.asyncplugin.setup.md)
4+
5+
## AsyncPlugin.setup() method
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| core | <code>CoreSetup&lt;TPluginsStart, TStart&gt;</code> | |
18+
| plugins | <code>TPluginsSetup</code> | |
19+
20+
<b>Returns:</b>
21+
22+
`TSetup | Promise<TSetup>`
23+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [start](./kibana-plugin-core-public.asyncplugin.start.md)
4+
5+
## AsyncPlugin.start() method
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| core | <code>CoreStart</code> | |
18+
| plugins | <code>TPluginsStart</code> | |
19+
20+
<b>Returns:</b>
21+
22+
`TStart | Promise<TStart>`
23+

0 commit comments

Comments
 (0)