Skip to content

Commit a8bc6f6

Browse files
Merge branch 'master' into nls/apm-sb
2 parents eb689f4 + a79ebbe commit a8bc6f6

1,719 files changed

Lines changed: 313284 additions & 9998 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
@@ -16,3 +16,12 @@ build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"
1616
# build --build_metadata=VISIBILITY=PUBLIC
1717
build --build_metadata=TEST_GROUPS=//packages
1818

19+
###############################
20+
# Offline Support #
21+
# Turn on these settings with #
22+
# --config=offline #
23+
###############################
24+
25+
## Reset remote cache and backend support
26+
build:offline --bes_backend="" --remote_cache=""
27+
run:offline --bes_backend="" --remote_cache=""

.bazelrc.common

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
# Local Cache Settings
99
## Avoid cache results from being corrupt when changing source during build
10-
common --experimental_guard_against_concurrent_changes
10+
build --experimental_guard_against_concurrent_changes
11+
run --experimental_guard_against_concurrent_changes
12+
test --experimental_guard_against_concurrent_changes
1113

1214
## Cache action outputs on disk so they persist across output_base and bazel shutdown (eg. changing branches)
1315
build --disk_cache=~/.bazel-cache/disk-cache

.ci/Jenkinsfile_baseline_capture

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ kibanaPipeline(timeoutMinutes: 210) {
2525
withEnv([
2626
'BUILD_TS_REFS_CACHE_ENABLE=true',
2727
'BUILD_TS_REFS_CACHE_CAPTURE=true',
28-
'DISABLE_BOOTSTRAP_VALIDATIONS=true',
28+
'DISABLE_BOOTSTRAP_VALIDATION=true',
2929
]) {
3030
kibanaPipeline.doSetup()
3131
}

.eslintrc.js

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,22 @@ module.exports = {
789789
},
790790
},
791791

792+
/**
793+
* Fleet overrides
794+
*/
795+
{
796+
files: ['x-pack/plugins/fleet/**/*.{js,mjs,ts,tsx}'],
797+
rules: {
798+
'import/order': [
799+
'warn',
800+
{
801+
groups: ['builtin', 'external', 'internal', 'parent'],
802+
'newlines-between': 'always-and-inside-groups',
803+
},
804+
],
805+
},
806+
},
807+
792808
/**
793809
* Security Solution overrides
794810
*/
@@ -1087,7 +1103,9 @@ module.exports = {
10871103
*/
10881104
{
10891105
// typescript for front and back end
1090-
files: ['x-pack/plugins/{alerts,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}'],
1106+
files: [
1107+
'x-pack/plugins/{alerting,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}',
1108+
],
10911109
rules: {
10921110
'@typescript-eslint/no-explicit-any': 'error',
10931111
},
@@ -1314,6 +1332,55 @@ module.exports = {
13141332
},
13151333
},
13161334

1335+
/**
1336+
* Platform Security Team overrides
1337+
*/
1338+
{
1339+
files: [
1340+
'src/plugins/security_oss/**/*.{js,mjs,ts,tsx}',
1341+
'src/plugins/spaces_oss/**/*.{js,mjs,ts,tsx}',
1342+
'x-pack/plugins/encrypted_saved_objects/**/*.{js,mjs,ts,tsx}',
1343+
'x-pack/plugins/security/**/*.{js,mjs,ts,tsx}',
1344+
'x-pack/plugins/spaces/**/*.{js,mjs,ts,tsx}',
1345+
],
1346+
rules: {
1347+
'@typescript-eslint/consistent-type-imports': 1,
1348+
'import/order': [
1349+
// This rule sorts import declarations
1350+
'error',
1351+
{
1352+
groups: [
1353+
'unknown',
1354+
['builtin', 'external'],
1355+
'internal',
1356+
['parent', 'sibling', 'index'],
1357+
],
1358+
pathGroups: [
1359+
{
1360+
pattern: '{@kbn/**,src/**,kibana{,/**}}',
1361+
group: 'internal',
1362+
},
1363+
],
1364+
pathGroupsExcludedImportTypes: [],
1365+
alphabetize: {
1366+
order: 'asc',
1367+
caseInsensitive: true,
1368+
},
1369+
'newlines-between': 'always',
1370+
},
1371+
],
1372+
'import/no-duplicates': ['error'],
1373+
'sort-imports': [
1374+
// This rule sorts imports of multiple members (destructured imports)
1375+
'error',
1376+
{
1377+
ignoreCase: true,
1378+
ignoreDeclarationSort: true,
1379+
},
1380+
],
1381+
},
1382+
},
1383+
13171384
{
13181385
files: [
13191386
// core-team owned code
@@ -1348,7 +1415,7 @@ module.exports = {
13481415
'no-restricted-imports': [
13491416
'error',
13501417
{
1351-
patterns: ['lodash/*', '!lodash/fp'],
1418+
patterns: ['lodash/*', '!lodash/fp', 'rxjs/internal-compatibility'],
13521419
},
13531420
],
13541421
},

.github/CODEOWNERS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
/x-pack/plugins/data_enhanced/ @elastic/kibana-app-services
5858
/x-pack/plugins/embeddable_enhanced/ @elastic/kibana-app-services
5959
/x-pack/plugins/ui_actions_enhanced/ @elastic/kibana-app-services
60+
/x-pack/plugins/runtime_fields @elastic/kibana-app-services
6061
#CC# /src/plugins/bfetch/ @elastic/kibana-app-services
6162
#CC# /src/plugins/index_pattern_management/ @elastic/kibana-app-services
6263
#CC# /src/plugins/inspector/ @elastic/kibana-app-services
@@ -117,10 +118,12 @@
117118
/x-pack/plugins/ml/ @elastic/ml-ui
118119
/x-pack/test/functional/apps/ml/ @elastic/ml-ui
119120
/x-pack/test/functional/services/ml/ @elastic/ml-ui
121+
/x-pack/test/accessibility/apps/ml.ts @elastic/ml-ui
120122
# ML team owns and maintains the transform plugin despite it living in the Elasticsearch management section.
121123
/x-pack/plugins/transform/ @elastic/ml-ui
122124
/x-pack/test/functional/apps/transform/ @elastic/ml-ui
123125
/x-pack/test/functional/services/transform/ @elastic/ml-ui
126+
/x-pack/test/accessibility/apps/transform.ts @elastic/ml-ui
124127
/x-pack/test/api_integration_basic/apis/ml/ @elastic/ml-ui
125128
/x-pack/test/functional_basic/apps/ml/ @elastic/ml-ui
126129

@@ -205,6 +208,7 @@
205208
#CC# /src/legacy/server/http/ @elastic/kibana-core
206209
#CC# /src/legacy/ui/public/documentation_links @elastic/kibana-core
207210
#CC# /src/plugins/legacy_export/ @elastic/kibana-core
211+
#CC# /src/plugins/xpack_legacy/ @elastic/kibana-core
208212
#CC# /src/plugins/saved_objects/ @elastic/kibana-core
209213
#CC# /src/plugins/status_page/ @elastic/kibana-core
210214
#CC# /x-pack/plugins/cloud/ @elastic/kibana-core
@@ -256,7 +260,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/
256260
#CC# /x-pack/plugins/security/ @elastic/kibana-security
257261

258262
# Kibana Alerting Services
259-
/x-pack/plugins/alerts/ @elastic/kibana-alerting-services
263+
/x-pack/plugins/alerting/ @elastic/kibana-alerting-services
260264
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
261265
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
262266
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.aws-config.json
22
.signing-config.json
3-
/api_docs
43
.ackrc
54
/.es
65
/.chromium

.yarnrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ yarn-offline-mirror ".yarn-local-mirror"
33

44
# Always look into the cache first before fetching online
55
--install.prefer-offline true
6+
7+
# Disable interactive and progress logs as yarn install is now
8+
# managed by Bazel and we are piping the logs from the underlying
9+
# process running bazel into the parent one running kbn
10+
--install.non-interactive true
11+
--install.no-progress true

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Expose those targets as they are required as part of
2+
# other packages builds and need to be included as inputs
13
exports_files(
24
[
35
"tsconfig.json",

WORKSPACE.bazel

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,68 @@
1+
# Define the workspace base name and a managed directory by bazel
2+
# that will hold the node_modules called @npm
13
workspace(
2-
name = "kibana",
4+
name = "kibana",
5+
managed_directories = {"@npm": ["node_modules"]},
6+
)
7+
8+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
9+
10+
# Fetch Node.js rules
11+
http_archive(
12+
name = "build_bazel_rules_nodejs",
13+
sha256 = "bfacf15161d96a6a39510e7b3d3b522cf61cb8b82a31e79400a84c5abcab5347",
14+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.1/rules_nodejs-3.2.1.tar.gz"],
15+
)
16+
17+
# Now that we have the rules let's import from them to complete the work
18+
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
19+
20+
# Assure we have at least a given rules_nodejs version
21+
check_rules_nodejs_version(minimum_version_string = "3.2.1")
22+
23+
# Setup the Node.js toolchain for the architectures we want to support
24+
#
25+
# NOTE: darwin-arm64 is not being installed because bazel is not yet available on that architecture.
26+
# The PR for it was merged and should be available in the next release of bazel and bazelisk. As soon as they have it
27+
# we can update that rule.
28+
node_repositories(
29+
node_repositories = {
30+
"14.16.0-darwin_amd64": ("node-v14.16.0-darwin-x64.tar.gz", "node-v14.16.0-darwin-x64", "14ec767e376d1e2e668f997065926c5c0086ec46516d1d45918af8ae05bd4583"),
31+
"14.16.0-linux_arm64": ("node-v14.16.0-linux-arm64.tar.xz", "node-v14.16.0-linux-arm64", "440489a08bfd020e814c9e65017f58d692299ac3f150c8e78d01abb1104c878a"),
32+
"14.16.0-linux_s390x": ("node-v14.16.0-linux-s390x.tar.xz", "node-v14.16.0-linux-s390x", "335348e46f45284b6356416ef58f85602d2dee99094588b65900f6c8839df77e"),
33+
"14.16.0-linux_amd64": ("node-v14.16.0-linux-x64.tar.xz", "node-v14.16.0-linux-x64", "2e079cf638766fedd720d30ec8ffef5d6ceada4e8b441fc2a093cb9a865f4087"),
34+
"14.16.0-windows_amd64": ("node-v14.16.0-win-x64.zip", "node-v14.16.0-win-x64", "716045c2f16ea10ca97bd04cf2e5ef865f9c4d6d677a9bc25e2ea522b594af4f"),
35+
},
36+
node_version = "14.16.0",
37+
node_urls = [
38+
"https://nodejs.org/dist/v{version}/{filename}",
39+
],
40+
yarn_repositories = {
41+
"1.21.1": ("yarn-v1.21.1.tar.gz", "yarn-v1.21.1", "d1d9f4a0f16f5ed484e814afeb98f39b82d4728c6c8beaafb5abc99c02db6674"),
42+
},
43+
yarn_version = "1.21.1",
44+
yarn_urls = [
45+
"https://github.com/yarnpkg/yarn/releases/download/v{version}/{filename}",
46+
],
47+
package_json = ["//:package.json"],
48+
)
49+
50+
# Run yarn_install rule to take care of dependencies
51+
#
52+
# NOTE: FORCE_COLOR env var forces colors on non tty mode
53+
yarn_install(
54+
name = "npm",
55+
environment = {
56+
"FORCE_COLOR": "True",
57+
},
58+
package_json = "//:package.json",
59+
yarn_lock = "//:yarn.lock",
60+
data = [
61+
"//:.yarnrc",
62+
"//:preinstall_check.js",
63+
"//:node_modules/.yarn-integrity",
64+
],
65+
symlink_node_modules = True,
66+
quiet = False,
67+
frozen_lockfile = False,
368
)

0 commit comments

Comments
 (0)