Skip to content

Commit cc9a595

Browse files
committed
Merge branch 'master' of https://github.com/elastic/kibana into alerting/search-alert
2 parents 0b6a8d8 + c73000f commit cc9a595

File tree

453 files changed

+11429
-4412
lines changed

Some content is hidden

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

453 files changed

+11429
-4412
lines changed

.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

.ci/teamcity/oss/jest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ source "$(dirname "${0}")/../util.sh"
1010
export JOB=kibana-oss-jest
1111

1212
checks-reporter-with-killswitch "Jest Unit Tests" \
13-
node scripts/jest --ci --verbose
13+
node scripts/jest --ci --maxWorkers=5 --verbose

.ci/teamcity/tests/jest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ source "$(dirname "${0}")/../util.sh"
77
export JOB=kibana-jest
88

99
checks-reporter-with-killswitch "Jest Unit Tests" \
10-
node scripts/jest --ci --verbose --coverage
10+
node scripts/jest --ci --maxWorkers=5 --verbose

.ci/teamcity/tests/test_projects.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -euo pipefail
55
source "$(dirname "${0}")/../util.sh"
66

77
checks-reporter-with-killswitch "Test Projects" \
8-
yarn kbn run test --exclude kibana --oss --skip-kibana-plugins
8+
yarn kbn run test --exclude kibana --oss --skip-kibana-plugins --skip-missing

.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
@@ -1192,6 +1192,32 @@ module.exports = {
11921192
},
11931193
},
11941194

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

0 commit comments

Comments
 (0)