Skip to content

Commit ab4a86e

Browse files
Merge branch '7.x' into backport/7.x/pr-89018
2 parents 291451b + 7622da0 commit ab4a86e

877 files changed

Lines changed: 22179 additions & 10998 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.

.bazelignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Bazel does not support wildcards like .gitignore
2+
# Issues are opened for to include that feature but not available yet
3+
# https://github.com/bazelbuild/bazel/issues/7093
4+
# https://github.com/bazelbuild/bazel/issues/8106
5+
.ci
6+
.git
7+
.github
8+
.idea
9+
.teamcity
10+
.yarn-local-mirror
11+
bazel-cache
12+
bazel-dist
13+
build
14+
node_modules
15+
target

.bazeliskversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.7.3

.bazelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Inspired on from https://raw.githubusercontent.com/bazelbuild/rules_nodejs/master/.bazelrc
2+
# Import shared settings first so we can override below
3+
import %workspace%/.bazelrc.common
4+
5+
# Remote cache settings for local env
6+
# build --remote_cache=https://storage.googleapis.com/kibana-bazel-cache
7+
# build --incompatible_remote_results_ignore_disk=true
8+
# build --remote_accept_cached=true
9+
# build --remote_upload_local_results=false

.bazelrc.common

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Inspired on from https://raw.githubusercontent.com/bazelbuild/rules_nodejs/master/common.bazelrc
2+
# Common Bazel settings for JavaScript/NodeJS workspaces
3+
# This rc file is automatically discovered when Bazel is run in this workspace,
4+
# see https://docs.bazel.build/versions/master/guide.html#bazelrc
5+
#
6+
# The full list of Bazel options: https://docs.bazel.build/versions/master/command-line-reference.html
7+
8+
# Cache action outputs on disk so they persist across output_base and bazel shutdown (eg. changing branches)
9+
build --disk_cache=bazel-cache/disk-cache
10+
11+
# Bazel repo cache settings
12+
build --repository_cache=bazel-cache/repository-cache
13+
14+
# Bazel will create symlinks from the workspace directory to output artifacts.
15+
# Build results will be placed in a directory called "bazel-dist/bin"
16+
# This will still create a bazel-out symlink in
17+
# the project directory, which must be excluded from the
18+
# editor's search path.
19+
build --symlink_prefix=bazel-dist/
20+
# To disable the symlinks altogether (including bazel-out) we can use
21+
# build --symlink_prefix=/
22+
# however this makes it harder to find outputs.
23+
24+
# Prevents the creation of bazel-out dir
25+
build --experimental_no_product_name_out_symlink
26+
27+
# Make direct file system calls to create symlink trees
28+
build --experimental_inprocess_symlink_creation
29+
30+
# Incompatible flags to run with
31+
build --incompatible_no_implicit_file_export
32+
build --incompatible_restrict_string_escapes
33+
34+
# Log configs
35+
## different from default
36+
common --color=yes
37+
build --show_task_finish
38+
build --noshow_progress
39+
build --noshow_loading_progress
40+
41+
## enforced default values
42+
build --show_result=1
43+
44+
# Specifies desired output mode for running tests.
45+
# Valid values are
46+
# 'summary' to output only test status summary
47+
# 'errors' to also print test logs for failed tests
48+
# 'all' to print logs for all tests
49+
# 'streamed' to output logs for all tests in real time
50+
# (this will force tests to be executed locally one at a time regardless of --test_strategy value).
51+
test --test_output=errors
52+
53+
# Support for debugging NodeJS tests
54+
# Add the Bazel option `--config=debug` to enable this
55+
# --test_output=streamed
56+
# Stream stdout/stderr output from each test in real-time.
57+
# See https://docs.bazel.build/versions/master/user-manual.html#flag--test_output for more details.
58+
# --test_strategy=exclusive
59+
# Run one test at a time.
60+
# --test_timeout=9999
61+
# Prevent long running tests from timing out
62+
# See https://docs.bazel.build/versions/master/user-manual.html#flag--test_timeout for more details.
63+
# --nocache_test_results
64+
# Always run tests
65+
# --node_options=--inspect-brk
66+
# Pass the --inspect-brk option to all tests which enables the node inspector agent.
67+
# See https://nodejs.org/de/docs/guides/debugging-getting-started/#command-line-options for more details.
68+
# --define=VERBOSE_LOGS=1
69+
# Rules will output verbose logs if the VERBOSE_LOGS environment variable is set. `VERBOSE_LOGS` will be passed to
70+
# `nodejs_binary` and `nodejs_test` via the default value of the `default_env_vars` attribute of those rules.
71+
# --compilation_mode=dbg
72+
# Rules may change their build outputs if the compilation mode is set to dbg. For example,
73+
# mininfiers such as terser may make their output more human readable when this is set. `COMPILATION_MODE` will be passed to
74+
# `nodejs_binary` and `nodejs_test` via the default value of the `default_env_vars` attribute of those rules.
75+
# See https://docs.bazel.build/versions/master/user-manual.html#flag--compilation_mode for more details.
76+
test:debug --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --define=VERBOSE_LOGS=1
77+
# Use bazel run with `--config=debug` to turn on the NodeJS inspector agent.
78+
# The node process will break before user code starts and wait for the debugger to connect.
79+
run:debug --define=VERBOSE_LOGS=1 -- --node_options=--inspect-brk
80+
# The following option will change the build output of certain rules such as terser and may not be desirable in all cases
81+
build:debug --compilation_mode=dbg
82+
83+
# Turn off legacy external runfiles
84+
# This prevents accidentally depending on this feature, which Bazel will remove.
85+
build --nolegacy_external_runfiles
86+
run --nolegacy_external_runfiles
87+
test --nolegacy_external_runfiles
88+
89+
# Turn on --incompatible_strict_action_env which was on by default
90+
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
91+
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
92+
# This flag is needed to so that the bazel cache is not invalidated
93+
# when running bazel via `yarn bazel`.
94+
# See https://github.com/angular/angular/issues/27514.
95+
build --incompatible_strict_action_env
96+
run --incompatible_strict_action_env
97+
test --incompatible_strict_action_env
98+
99+
# Do not build runfile trees by default. If an execution strategy relies on runfile
100+
# symlink tree, the tree is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627
101+
# and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df
102+
build --nobuild_runfile_links
103+
104+
# When running `bazel coverage` --instrument_test_targets needs to be set in order to
105+
# collect coverage information from test targets
106+
coverage --instrument_test_targets
107+
108+
# Settings for CI
109+
# Bazel flags for CI are in /src/dev/ci_setup/.bazelrc-ci
110+
111+
# Load any settings specific to the current user.
112+
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
113+
# This needs to be last statement in this
114+
# config, as the user configuration should be able to overwrite flags from this file.
115+
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
116+
# (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing,
117+
# rather than user.bazelrc as suggested in the Bazel docs)
118+
try-import %workspace%/.bazelrc.user

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.0.0

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ snapshots.js
4343
/packages/kbn-ui-framework/dist
4444
/packages/kbn-ui-shared-deps/flot_charts
4545
/packages/kbn-monaco/src/painless/antlr
46+
47+
# Bazel
48+
/bazel-*

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,32 @@ module.exports = {
11961196
},
11971197
},
11981198

1199+
/**
1200+
* Osquery overrides
1201+
*/
1202+
{
1203+
extends: ['eslint:recommended', 'plugin:react/recommended'],
1204+
plugins: ['react'],
1205+
files: ['x-pack/plugins/osquery/**/*.{js,mjs,ts,tsx}'],
1206+
rules: {
1207+
'arrow-body-style': ['error', 'as-needed'],
1208+
'prefer-arrow-callback': 'error',
1209+
'no-unused-vars': 'off',
1210+
'react/prop-types': 'off',
1211+
},
1212+
},
1213+
{
1214+
// typescript and javascript for front end react performance
1215+
files: ['x-pack/plugins/osquery/public/**/!(*.test).{js,mjs,ts,tsx}'],
1216+
plugins: ['react', 'react-perf'],
1217+
rules: {
1218+
'react-perf/jsx-no-new-object-as-prop': 'error',
1219+
'react-perf/jsx-no-new-array-as-prop': 'error',
1220+
'react-perf/jsx-no-new-function-as-prop': 'error',
1221+
'react/jsx-no-bind': 'error',
1222+
},
1223+
},
1224+
11991225
/**
12001226
* Prettier disables all conflicting rules, listing as last override so it takes precedence
12011227
*/

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ report.asciidoc
7979

8080
# Yarn local mirror content
8181
.yarn-local-mirror
82+
83+
# Bazel
84+
/bazel-*
85+
/.bazelrc.user

.i18nrc.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161
"visTypeVislib": "src/plugins/vis_type_vislib",
6262
"visTypeXy": "src/plugins/vis_type_xy",
6363
"visualizations": "src/plugins/visualizations",
64-
"lensOss": "src/plugins/lens_oss",
65-
"mapsOss": "src/plugins/maps_oss",
6664
"visualize": "src/plugins/visualize",
6765
"apmOss": "src/plugins/apm_oss",
6866
"usageCollection": "src/plugins/usage_collection"

WORKSPACE.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
workspace(
2+
name = "kibana",
3+
)

0 commit comments

Comments
 (0)