Skip to content

Commit 787ea16

Browse files
Merge branch 'master' into ml-common-links
2 parents a3ec86a + 4a661cd commit 787ea16

File tree

30,616 files changed

+468222
-348732
lines changed

Some content is hidden

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

30,616 files changed

+468222
-348732
lines changed

.bazelignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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
12+
build
13+
node_modules
14+
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Inspired by 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+
## Disabled for now
6+
# Remote cache settings for local env
7+
# build --remote_cache=https://storage.googleapis.com/kibana-bazel-cache
8+
# build --incompatible_remote_results_ignore_disk=true
9+
# build --remote_accept_cached=true
10+
# build --remote_upload_local_results=false
11+
12+
# BuildBuddy
13+
## Metadata settings
14+
build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"
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+

.bazelrc.common

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

.browserslistrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
last 2 Firefox versions
33
last 2 Chrome versions
44
last 2 Safari versions
5-
> 0.25%
6-
not ie 11
7-
not op_mini all
8-
not samsung 4
5+
last 2 Edge versions
6+
last 1 ios_saf versions
7+
last 1 and_chr versions
8+
last 1 samsung versions
99

1010
[dev]
1111
last 1 chrome versions

.ci/Jenkinsfile_baseline_capture

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ kibanaPipeline(timeoutMinutes: 120) {
1212
]) {
1313
parallel([
1414
'oss-baseline': {
15-
workers.ci(name: 'oss-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
15+
workers.ci(name: 'oss-baseline', size: 'l', ramDisk: true, runErrorReporter: false, bootstrapped: false) {
16+
// bootstrap ourselves, but with the env needed to upload the ts refs cache
17+
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
18+
withEnv([
19+
'BUILD_TS_REFS_CACHE_ENABLE=true',
20+
'BUILD_TS_REFS_CACHE_CAPTURE=true'
21+
]) {
22+
kibanaPipeline.doSetup()
23+
}
24+
}
25+
1626
kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
1727
}
1828
},

.ci/Jenkinsfile_flaky

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ kibanaLibrary.load()
55

66
def CI_GROUP_PARAM = params.CI_GROUP
77

8-
// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke', or 'all:serverMocha'
8+
// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke'
99
def JOB_PARTS = CI_GROUP_PARAM.split(':')
1010
def IS_XPACK = JOB_PARTS[0] == 'xpack'
1111
def JOB = JOB_PARTS[1]
12-
def NEED_BUILD = JOB != 'serverMocha'
1312
def CI_GROUP = JOB_PARTS.size() > 2 ? JOB_PARTS[2] : ''
1413
def EXECUTIONS = params.NUMBER_EXECUTIONS.toInteger()
1514
def AGENT_COUNT = getAgentCount(EXECUTIONS)
@@ -30,8 +29,10 @@ kibanaPipeline(timeoutMinutes: 180) {
3029
catchErrors {
3130
print "Agent ${agentNumberInside} - ${agentExecutions} executions"
3231

33-
workers.functional('flaky-test-runner', {
34-
if (NEED_BUILD) {
32+
withEnv([
33+
'IGNORE_SHIP_CI_STATS_ERROR=true',
34+
]) {
35+
workers.functional('flaky-test-runner', {
3536
if (!IS_XPACK) {
3637
kibanaPipeline.buildOss()
3738
if (CI_GROUP == '1') {
@@ -40,8 +41,8 @@ kibanaPipeline(timeoutMinutes: 180) {
4041
} else {
4142
kibanaPipeline.buildXpack()
4243
}
43-
}
44-
}, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))()
44+
}, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))()
45+
}
4546
}
4647
}
4748
}
@@ -60,17 +61,7 @@ kibanaPipeline(timeoutMinutes: 180) {
6061

6162
def getWorkerFromParams(isXpack, job, ciGroup) {
6263
if (!isXpack) {
63-
if (job == 'serverMocha') {
64-
return kibanaPipeline.functionalTestProcess('serverMocha', {
65-
kibanaPipeline.bash(
66-
"""
67-
source src/dev/ci_setup/setup_env.sh
68-
node scripts/mocha
69-
""",
70-
"run `node scripts/mocha`"
71-
)
72-
})
73-
} else if (job == 'accessibility') {
64+
if (job == 'accessibility') {
7465
return kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh')
7566
} else if (job == 'firefoxSmoke') {
7667
return kibanaPipeline.functionalTestProcess('firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh')

.ci/Jenkinsfile_security_cypress

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ kibanaPipeline(timeoutMinutes: 180) {
1010
) {
1111
catchError {
1212
withEnv([
13-
'CI_PARALLEL_PROCESS_NUMBER=1'
13+
'CI_PARALLEL_PROCESS_NUMBER=1',
14+
'IGNORE_SHIP_CI_STATS_ERROR=true',
1415
]) {
1516
def job = 'xpack-securityCypress'
1617

.ci/end2end.groovy

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

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

127127
def notifyTestStatus(String description, String status) {
128-
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
128+
withGithubStatus.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
129129
}

0 commit comments

Comments
 (0)