Skip to content

Commit 6b639dd

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into reporting/poc-migrate-away-from-injected-css-js
* 'master' of github.com:elastic/kibana: (237 commits) [Uptime] Added uptime query inspector panel (elastic#115170) [Osquery] Add packs (elastic#107345) [App Search] Allow for query parameter to indicate ingestion mechanism for new engines (elastic#115188) [Alerting] Active alerts do not recover after re-enabling a rule (elastic#111671) skip flaky tests. elastic#115308, elastic#115313 [Breaking] Remove deprecated `enabled` settings from plugins. (elastic#113495) skip flaky suite. elastic#107057 skip flaky tests. elastic#89052, elastic#113418, elastic#115304 skip flaky test. elastic#113892 Bump node to 16.11.1 (elastic#110684) [Security Solution] Restores Alerts table local storage persistence and the Remove Column action (elastic#114742) skip flaky suite. elastic#115130 one line remove assert (elastic#115127) Fixes migration bug where I was deleting attributes (elastic#115098) [Security Solutions] Fixes the newer notification system throttle resets and enabling immediate execution on first detection of a signal (elastic#114214) [build] Dockerfile update (elastic#115237) Fixes Cypress flake cypress test (elastic#115270) Disable APM e2e tests log an invalid type for SO (elastic#115175) [Fleet] Don't auto upgrade policies for AUTO_UPDATE packages (elastic#115199) ... # Conflicts: # src/plugins/dashboard/public/application/dashboard_app.tsx # src/plugins/dashboard/public/types.ts # x-pack/plugins/reporting/server/lib/layouts/print_layout.ts
2 parents a5afb60 + d08f091 commit 6b639dd

File tree

2,542 files changed

+80032
-65037
lines changed

Some content is hidden

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

2,542 files changed

+80032
-65037
lines changed

.buildkite/scripts/build_kibana.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ set -euo pipefail
55
export KBN_NP_PLUGINS_BUILT=true
66

77
echo "--- Build Kibana Distribution"
8-
node scripts/build --debug
8+
if [[ "${GITHUB_PR_LABELS:-}" == *"ci:build-all-platforms"* ]]; then
9+
node scripts/build --all-platforms --skip-os-packages
10+
else
11+
node scripts/build
12+
fi
913

1014
echo "--- Archive Kibana Distribution"
1115
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"

.buildkite/scripts/common/env.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ export ELASTIC_APM_ENVIRONMENT=ci
3636
export ELASTIC_APM_TRANSACTION_SAMPLE_RATE=0.1
3737

3838
if is_pr; then
39-
export ELASTIC_APM_ACTIVE=false
39+
if [[ "${GITHUB_PR_LABELS:-}" == *"ci:collect-apm"* ]]; then
40+
export ELASTIC_APM_ACTIVE=true
41+
else
42+
export ELASTIC_APM_ACTIVE=false
43+
fi
44+
4045
export CHECKS_REPORTER_ACTIVE=true
4146

4247
# These can be removed once we're not supporting Jenkins and Buildkite at the same time
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
source .buildkite/scripts/common/util.sh
4+
5+
KIBANA_BUILDBUDDY_CI_API_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key)
6+
export KIBANA_BUILDBUDDY_CI_API_KEY
7+
8+
# overwrites the file checkout .bazelrc file with the one intended for CI env
9+
cp "$KIBANA_DIR/src/dev/ci_setup/.bazelrc-ci" "$KIBANA_DIR/.bazelrc"
10+
11+
###
12+
### append auth token to buildbuddy into "$KIBANA_DIR/.bazelrc";
13+
###
14+
echo "# Appended by .buildkite/scripts/persist_bazel_cache.sh" >> "$KIBANA_DIR/.bazelrc"
15+
echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY" >> "$KIBANA_DIR/.bazelrc"

.buildkite/scripts/common/setup_bazel.sh

-24
This file was deleted.

.buildkite/scripts/lifecycle/pre_command.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ set -euo pipefail
44

55
source .buildkite/scripts/common/util.sh
66

7-
node .buildkite/scripts/lifecycle/print_agent_links.js || true
8-
9-
echo '--- Job Environment Setup'
7+
BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
8+
export BUILDKITE_TOKEN
109

10+
echo '--- Install buildkite dependencies'
1111
cd '.buildkite'
1212
retry 5 15 yarn install
1313
cd -
1414

15-
BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
16-
export BUILDKITE_TOKEN
15+
node .buildkite/scripts/lifecycle/print_agent_links.js || true
16+
17+
echo '--- Job Environment Setup'
1718

1819
# Set up a custom ES Snapshot Manifest if one has been specified for this build
1920
{

.buildkite/scripts/pipelines/pull_request/pipeline.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,20 @@ const uploadPipeline = (pipelineContent) => {
5555
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false));
5656

5757
if (
58-
await doAnyChangesMatch([
58+
(await doAnyChangesMatch([
5959
/^x-pack\/plugins\/security_solution/,
6060
/^x-pack\/test\/security_solution_cypress/,
6161
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/,
6262
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/actions_connectors_context\.tsx/,
63-
])
63+
])) ||
64+
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
6465
) {
6566
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml'));
6667
}
6768

68-
// Disabled for now, these are failing/disabled in Jenkins currently as well
6969
// if (
70-
// await doAnyChangesMatch([
71-
// /^x-pack\/plugins\/apm/,
72-
// ])
70+
// (await doAnyChangesMatch([/^x-pack\/plugins\/apm/])) ||
71+
// process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
7372
// ) {
7473
// pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
7574
// }

.buildkite/scripts/post_build_kibana.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ fi
1212
echo "--- Upload Build Artifacts"
1313
# Moving to `target/` first will keep `buildkite-agent` from including directories in the artifact name
1414
cd "$KIBANA_DIR/target"
15-
mv kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz
16-
buildkite-agent artifact upload kibana-default.tar.gz
17-
buildkite-agent artifact upload kibana-default-plugins.tar.gz
15+
cp kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz
16+
buildkite-agent artifact upload "./*.tar.gz;./*.zip"
1817
cd -

.buildkite/scripts/steps/es_snapshots/build.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,14 @@ export DOCKER_TLS_CERTDIR="$CERTS_DIR"
6161
export DOCKER_HOST=localhost:2377
6262

6363
echo "--- Build Elasticsearch"
64-
./gradlew -Dbuild.docker=true assemble --parallel
64+
./gradlew \
65+
:distribution:archives:darwin-aarch64-tar:assemble \
66+
:distribution:archives:darwin-tar:assemble \
67+
:distribution:docker:docker-export:assemble \
68+
:distribution:archives:linux-aarch64-tar:assemble \
69+
:distribution:archives:linux-tar:assemble \
70+
:distribution:archives:windows-zip:assemble \
71+
--parallel
6572

6673
echo "--- Create distribution archives"
6774
find distribution -type f \( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \) -not -path '*no-jdk*' -not -path '*build-context*' -exec cp {} "$destination" \;

.buildkite/scripts/steps/on_merge_build_and_metrics.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -euo pipefail
44

55
# Write Bazel cache for Linux
6-
.buildkite/scripts/common/setup_bazel.sh
6+
.buildkite/scripts/common/persist_bazel_cache.sh
77

88
.buildkite/scripts/bootstrap.sh
99
.buildkite/scripts/build_kibana.sh

.ci/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
22
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
33

4-
ARG NODE_VERSION=14.17.6
4+
ARG NODE_VERSION=16.11.1
55

66
FROM node:${NODE_VERSION} AS base
77

@@ -10,7 +10,7 @@ RUN apt-get update && \
1010
libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
1111
libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
1212
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
13-
libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget openjdk-8-jre && \
13+
libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget openjdk-11-jre && \
1414
rm -rf /var/lib/apt/lists/*
1515

1616
RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \

.eslintrc.js

+39-5
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ module.exports = {
498498
'x-pack/plugins/apm/**/*.js',
499499
'test/*/config.ts',
500500
'test/*/config_open.ts',
501+
'test/*/*.config.ts',
501502
'test/*/{tests,test_suites,apis,apps}/**/*',
502503
'test/visual_regression/tests/**/*',
503504
'x-pack/test/*/{tests,test_suites,apis,apps}/**/*',
@@ -898,7 +899,12 @@ module.exports = {
898899
},
899900

900901
/**
901-
* Security Solution overrides
902+
* Security Solution overrides. These rules below are maintained and owned by
903+
* the people within the security-solution-platform team. Please see ping them
904+
* or check with them if you are encountering issues, have suggestions, or would
905+
* like to add, change, or remove any particular rule. Linters, Typescript, and rules
906+
* evolve and change over time just like coding styles, so please do not hesitate to
907+
* reach out.
902908
*/
903909
{
904910
// front end and common typescript and javascript files only
@@ -921,6 +927,22 @@ module.exports = {
921927
],
922928
},
923929
},
930+
{
931+
// typescript only for front and back end, but excludes the test files.
932+
// We use this section to add rules in which we do not want to apply to test files.
933+
// This should be a very small set as most linter rules are useful for tests as well.
934+
files: [
935+
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
936+
'x-pack/plugins/timelines/**/*.{ts,tsx}',
937+
],
938+
excludedFiles: [
939+
'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}',
940+
'x-pack/plugins/timelines/**/*.{test,mock,test_helper}.{ts,tsx}',
941+
],
942+
rules: {
943+
'@typescript-eslint/no-non-null-assertion': 'error',
944+
},
945+
},
924946
{
925947
// typescript only for front and back end
926948
files: [
@@ -1039,7 +1061,12 @@ module.exports = {
10391061
},
10401062

10411063
/**
1042-
* Lists overrides
1064+
* Lists overrides. These rules below are maintained and owned by
1065+
* the people within the security-solution-platform team. Please see ping them
1066+
* or check with them if you are encountering issues, have suggestions, or would
1067+
* like to add, change, or remove any particular rule. Linters, Typescript, and rules
1068+
* evolve and change over time just like coding styles, so please do not hesitate to
1069+
* reach out.
10431070
*/
10441071
{
10451072
// front end and common typescript and javascript files only
@@ -1214,8 +1241,14 @@ module.exports = {
12141241
],
12151242
},
12161243
},
1244+
12171245
/**
1218-
* Metrics entities overrides
1246+
* Metrics entities overrides. These rules below are maintained and owned by
1247+
* the people within the security-solution-platform team. Please see ping them
1248+
* or check with them if you are encountering issues, have suggestions, or would
1249+
* like to add, change, or remove any particular rule. Linters, Typescript, and rules
1250+
* evolve and change over time just like coding styles, so please do not hesitate to
1251+
* reach out.
12191252
*/
12201253
{
12211254
// front end and common typescript and javascript files only
@@ -1549,8 +1582,8 @@ module.exports = {
15491582
plugins: ['react', '@typescript-eslint'],
15501583
files: ['x-pack/plugins/osquery/**/*.{js,mjs,ts,tsx}'],
15511584
rules: {
1552-
// 'arrow-body-style': ['error', 'as-needed'],
1553-
// 'prefer-arrow-callback': 'error',
1585+
'arrow-body-style': ['error', 'as-needed'],
1586+
'prefer-arrow-callback': 'error',
15541587
'no-unused-vars': 'off',
15551588
'react/prop-types': 'off',
15561589
'@typescript-eslint/explicit-module-boundary-types': 'off',
@@ -1596,6 +1629,7 @@ module.exports = {
15961629
{
15971630
files: [
15981631
'src/plugins/interactive_setup/**/*.{js,mjs,ts,tsx}',
1632+
'test/interactive_setup_api_integration/**/*.{js,mjs,ts,tsx}',
15991633
'x-pack/plugins/encrypted_saved_objects/**/*.{js,mjs,ts,tsx}',
16001634
'x-pack/plugins/security/**/*.{js,mjs,ts,tsx}',
16011635
'x-pack/plugins/spaces/**/*.{js,mjs,ts,tsx}',

.github/CODEOWNERS

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
/packages/kbn-interpreter/ @elastic/kibana-app-services
6464
/src/plugins/bfetch/ @elastic/kibana-app-services
6565
/src/plugins/data/ @elastic/kibana-app-services
66-
/src/plugins/data-views/ @elastic/kibana-app-services
66+
/src/plugins/data_views/ @elastic/kibana-app-services
6767
/src/plugins/embeddable/ @elastic/kibana-app-services
6868
/src/plugins/expressions/ @elastic/kibana-app-services
6969
/src/plugins/field_formats/ @elastic/kibana-app-services
@@ -244,7 +244,6 @@
244244
/packages/kbn-std/ @elastic/kibana-core
245245
/packages/kbn-config/ @elastic/kibana-core
246246
/packages/kbn-logging/ @elastic/kibana-core
247-
/packages/kbn-crypto/ @elastic/kibana-core
248247
/packages/kbn-http-tools/ @elastic/kibana-core
249248
/src/plugins/saved_objects_management/ @elastic/kibana-core
250249
/src/dev/run_check_published_api_changes.ts @elastic/kibana-core
@@ -254,7 +253,6 @@
254253
/src/plugins/kibana_overview/ @elastic/kibana-core
255254
/x-pack/plugins/global_search_bar/ @elastic/kibana-core
256255
#CC# /src/core/server/csp/ @elastic/kibana-core
257-
#CC# /src/plugins/xpack_legacy/ @elastic/kibana-core
258256
#CC# /src/plugins/saved_objects/ @elastic/kibana-core
259257
#CC# /x-pack/plugins/cloud/ @elastic/kibana-core
260258
#CC# /x-pack/plugins/features/ @elastic/kibana-core
@@ -286,9 +284,11 @@
286284
/packages/kbn-i18n/ @elastic/kibana-localization @elastic/kibana-core
287285
#CC# /x-pack/plugins/translations/ @elastic/kibana-localization @elastic/kibana-core
288286

289-
# Security
287+
# Kibana Platform Security
288+
/packages/kbn-crypto/ @elastic/kibana-security
290289
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-core
291290
/src/plugins/interactive_setup/ @elastic/kibana-security
291+
/test/interactive_setup_api_integration/ @elastic/kibana-security
292292
/x-pack/plugins/spaces/ @elastic/kibana-security
293293
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
294294
/x-pack/plugins/security/ @elastic/kibana-security

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.17.6
1+
16.11.1

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.17.6
1+
16.11.1

WORKSPACE.bazel

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
2727
# we can update that rule.
2828
node_repositories(
2929
node_repositories = {
30-
"14.17.6-darwin_amd64": ("node-v14.17.6-darwin-x64.tar.gz", "node-v14.17.6-darwin-x64", "e3e4c02240d74fb1dc8a514daa62e5de04f7eaee0bcbca06a366ece73a52ad88"),
31-
"14.17.6-linux_arm64": ("node-v14.17.6-linux-arm64.tar.xz", "node-v14.17.6-linux-arm64", "9c4f3a651e03cd9b5bddd33a80e8be6a6eb15e518513e410bb0852a658699156"),
32-
"14.17.6-linux_s390x": ("node-v14.17.6-linux-s390x.tar.xz", "node-v14.17.6-linux-s390x", "3677f35b97608056013b5368f86eecdb044bdccc1b3976c1d4448736c37b6a0c"),
33-
"14.17.6-linux_amd64": ("node-v14.17.6-linux-x64.tar.xz", "node-v14.17.6-linux-x64", "3bbe4faf356738d88b45be222bf5e858330541ff16bd0d4cfad36540c331461b"),
34-
"14.17.6-windows_amd64": ("node-v14.17.6-win-x64.zip", "node-v14.17.6-win-x64", "b83e9ce542fda7fc519cec6eb24a2575a84862ea4227dedc171a8e0b5b614ac0"),
30+
"16.11.1-darwin_amd64": ("node-v16.11.1-darwin-x64.tar.gz", "node-v16.11.1-darwin-x64", "ba54b8ed504bd934d03eb860fefe991419b4209824280d4274f6a911588b5e45"),
31+
"16.11.1-linux_arm64": ("node-v16.11.1-linux-arm64.tar.xz", "node-v16.11.1-linux-arm64", "083fc51f0ea26de9041aaf9821874651a9fd3b20d1cf57071ce6b523a0436f17"),
32+
"16.11.1-linux_s390x": ("node-v16.11.1-linux-s390x.tar.xz", "node-v16.11.1-linux-s390x", "855b5c83c2ccb05273d50bb04376335c68d47df57f3187cdebe1f22b972d2825"),
33+
"16.11.1-linux_amd64": ("node-v16.11.1-linux-x64.tar.xz", "node-v16.11.1-linux-x64", "493bcc9b660eff983a6de65a0f032eb2717f57207edf74c745bcb86e360310b3"),
34+
"16.11.1-windows_amd64": ("node-v16.11.1-win-x64.zip", "node-v16.11.1-win-x64", "4d3c179b82d42e66e321c3948a4e332ed78592917a69d38b86e3a242d7e62fb7"),
3535
},
36-
node_version = "14.17.6",
36+
node_version = "16.11.1",
3737
node_urls = [
3838
"https://nodejs.org/dist/v{version}/{filename}",
3939
],

0 commit comments

Comments
 (0)