Skip to content

Commit f5f4170

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 88591-severity-levels
2 parents ea26c58 + 4b29e35 commit f5f4170

File tree

755 files changed

+14436
-6232
lines changed

Some content is hidden

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

755 files changed

+14436
-6232
lines changed

.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: [

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@
150150
/src/legacy/server/warnings/ @elastic/kibana-operations
151151
/.ci/es-snapshots/ @elastic/kibana-operations
152152
/vars/ @elastic/kibana-operations
153+
/.bazelignore @elastic/kibana-operations
154+
/.bazeliskversion @elastic/kibana-operations
155+
/.bazelrc @elastic/kibana-operations
156+
/.bazelrc.common @elastic/kibana-operations
157+
/.bazelversion @elastic/kibana-operations
158+
/WORKSPACE.bazel @elastic/kibana-operations
153159
#CC# /packages/kbn-expect/ @elastic/kibana-operations
154160

155161
# Quality Assurance

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/contributing/development-ci-metrics.asciidoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,9 @@ All metrics are collected from the `tar.gz` archive produced for the linux platf
4444
[[ci-metric-distributable-file-count]] `distributable file count` ::
4545
The number of files included in the default distributable.
4646

47-
[[ci-metric-oss-distributable-file-count]] `oss distributable file count` ::
48-
The number of files included in the OSS distributable.
49-
5047
[[ci-metric-distributable-size]] `distributable size` ::
5148
The size, in bytes, of the default distributable. _(not reported on PRs)_
5249

53-
[[ci-metric-oss-distributable-size]] `oss distributable size` ::
54-
The size, in bytes, of the OSS distributable. _(not reported on PRs)_
55-
5650

5751
[[ci-metric-types-saved-object-field-counts]]
5852
==== Saved Object field counts

docs/developer/getting-started/development-plugin-resources.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ You can use the <<automatic-plugin-generator>> to get a basic structure for a ne
1414
{kib} repo should be developed inside the `plugins` folder. If you are building a new plugin to check in to the {kib} repo,
1515
you will choose between a few locations:
1616

17-
- {kib-repo}tree/{branch}/x-pack/plugins[x-pack/plugins] for commercially licensed plugins
18-
- {kib-repo}tree/{branch}/src/plugins[src/plugins] for open source licensed plugins
17+
- {kib-repo}tree/{branch}/x-pack/plugins[x-pack/plugins] for plugins related to subscription features
18+
- {kib-repo}tree/{branch}/src/plugins[src/plugins] for plugins related to free features
1919
- {kib-repo}tree/{branch}/examples[examples] for developer example plugins (these will not be included in the distributables)
2020

2121
[discrete]

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
----

0 commit comments

Comments
 (0)