Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into reporting/poc…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
jloleysens committed Oct 18, 2021
2 parents a5afb60 + d08f091 commit 6b639dd
Show file tree
Hide file tree
Showing 2,542 changed files with 80,032 additions and 65,037 deletions.
6 changes: 5 additions & 1 deletion .buildkite/scripts/build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ set -euo pipefail
export KBN_NP_PLUGINS_BUILT=true

echo "--- Build Kibana Distribution"
node scripts/build --debug
if [[ "${GITHUB_PR_LABELS:-}" == *"ci:build-all-platforms"* ]]; then
node scripts/build --all-platforms --skip-os-packages
else
node scripts/build
fi

echo "--- Archive Kibana Distribution"
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
Expand Down
7 changes: 6 additions & 1 deletion .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ export ELASTIC_APM_ENVIRONMENT=ci
export ELASTIC_APM_TRANSACTION_SAMPLE_RATE=0.1

if is_pr; then
export ELASTIC_APM_ACTIVE=false
if [[ "${GITHUB_PR_LABELS:-}" == *"ci:collect-apm"* ]]; then
export ELASTIC_APM_ACTIVE=true
else
export ELASTIC_APM_ACTIVE=false
fi

export CHECKS_REPORTER_ACTIVE=true

# These can be removed once we're not supporting Jenkins and Buildkite at the same time
Expand Down
15 changes: 15 additions & 0 deletions .buildkite/scripts/common/persist_bazel_cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

source .buildkite/scripts/common/util.sh

KIBANA_BUILDBUDDY_CI_API_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key)
export KIBANA_BUILDBUDDY_CI_API_KEY

# overwrites the file checkout .bazelrc file with the one intended for CI env
cp "$KIBANA_DIR/src/dev/ci_setup/.bazelrc-ci" "$KIBANA_DIR/.bazelrc"

###
### append auth token to buildbuddy into "$KIBANA_DIR/.bazelrc";
###
echo "# Appended by .buildkite/scripts/persist_bazel_cache.sh" >> "$KIBANA_DIR/.bazelrc"
echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY" >> "$KIBANA_DIR/.bazelrc"
24 changes: 0 additions & 24 deletions .buildkite/scripts/common/setup_bazel.sh

This file was deleted.

11 changes: 6 additions & 5 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

node .buildkite/scripts/lifecycle/print_agent_links.js || true

echo '--- Job Environment Setup'
BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
export BUILDKITE_TOKEN

echo '--- Install buildkite dependencies'
cd '.buildkite'
retry 5 15 yarn install
cd -

BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
export BUILDKITE_TOKEN
node .buildkite/scripts/lifecycle/print_agent_links.js || true

echo '--- Job Environment Setup'

# Set up a custom ES Snapshot Manifest if one has been specified for this build
{
Expand Down
11 changes: 5 additions & 6 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,20 @@ const uploadPipeline = (pipelineContent) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false));

if (
await doAnyChangesMatch([
(await doAnyChangesMatch([
/^x-pack\/plugins\/security_solution/,
/^x-pack\/test\/security_solution_cypress/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/actions_connectors_context\.tsx/,
])
])) ||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml'));
}

// Disabled for now, these are failing/disabled in Jenkins currently as well
// if (
// await doAnyChangesMatch([
// /^x-pack\/plugins\/apm/,
// ])
// (await doAnyChangesMatch([/^x-pack\/plugins\/apm/])) ||
// process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
// ) {
// pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
// }
Expand Down
5 changes: 2 additions & 3 deletions .buildkite/scripts/post_build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ fi
echo "--- Upload Build Artifacts"
# Moving to `target/` first will keep `buildkite-agent` from including directories in the artifact name
cd "$KIBANA_DIR/target"
mv kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz
buildkite-agent artifact upload kibana-default.tar.gz
buildkite-agent artifact upload kibana-default-plugins.tar.gz
cp kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz
buildkite-agent artifact upload "./*.tar.gz;./*.zip"
cd -
9 changes: 8 additions & 1 deletion .buildkite/scripts/steps/es_snapshots/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ export DOCKER_TLS_CERTDIR="$CERTS_DIR"
export DOCKER_HOST=localhost:2377

echo "--- Build Elasticsearch"
./gradlew -Dbuild.docker=true assemble --parallel
./gradlew \
:distribution:archives:darwin-aarch64-tar:assemble \
:distribution:archives:darwin-tar:assemble \
:distribution:docker:docker-export:assemble \
:distribution:archives:linux-aarch64-tar:assemble \
:distribution:archives:linux-tar:assemble \
:distribution:archives:windows-zip:assemble \
--parallel

echo "--- Create distribution archives"
find distribution -type f \( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \) -not -path '*no-jdk*' -not -path '*build-context*' -exec cp {} "$destination" \;
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/on_merge_build_and_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

# Write Bazel cache for Linux
.buildkite/scripts/common/setup_bazel.sh
.buildkite/scripts/common/persist_bazel_cache.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/build_kibana.sh
Expand Down
4 changes: 2 additions & 2 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=14.17.6
ARG NODE_VERSION=16.11.1

FROM node:${NODE_VERSION} AS base

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

RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
Expand Down
44 changes: 39 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ module.exports = {
'x-pack/plugins/apm/**/*.js',
'test/*/config.ts',
'test/*/config_open.ts',
'test/*/*.config.ts',
'test/*/{tests,test_suites,apis,apps}/**/*',
'test/visual_regression/tests/**/*',
'x-pack/test/*/{tests,test_suites,apis,apps}/**/*',
Expand Down Expand Up @@ -898,7 +899,12 @@ module.exports = {
},

/**
* Security Solution overrides
* Security Solution overrides. These rules below are maintained and owned by
* the people within the security-solution-platform team. Please see ping them
* or check with them if you are encountering issues, have suggestions, or would
* like to add, change, or remove any particular rule. Linters, Typescript, and rules
* evolve and change over time just like coding styles, so please do not hesitate to
* reach out.
*/
{
// front end and common typescript and javascript files only
Expand All @@ -921,6 +927,22 @@ module.exports = {
],
},
},
{
// typescript only for front and back end, but excludes the test files.
// We use this section to add rules in which we do not want to apply to test files.
// This should be a very small set as most linter rules are useful for tests as well.
files: [
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{ts,tsx}',
],
excludedFiles: [
'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{test,mock,test_helper}.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'error',
},
},
{
// typescript only for front and back end
files: [
Expand Down Expand Up @@ -1039,7 +1061,12 @@ module.exports = {
},

/**
* Lists overrides
* Lists overrides. These rules below are maintained and owned by
* the people within the security-solution-platform team. Please see ping them
* or check with them if you are encountering issues, have suggestions, or would
* like to add, change, or remove any particular rule. Linters, Typescript, and rules
* evolve and change over time just like coding styles, so please do not hesitate to
* reach out.
*/
{
// front end and common typescript and javascript files only
Expand Down Expand Up @@ -1214,8 +1241,14 @@ module.exports = {
],
},
},

/**
* Metrics entities overrides
* Metrics entities overrides. These rules below are maintained and owned by
* the people within the security-solution-platform team. Please see ping them
* or check with them if you are encountering issues, have suggestions, or would
* like to add, change, or remove any particular rule. Linters, Typescript, and rules
* evolve and change over time just like coding styles, so please do not hesitate to
* reach out.
*/
{
// front end and common typescript and javascript files only
Expand Down Expand Up @@ -1549,8 +1582,8 @@ module.exports = {
plugins: ['react', '@typescript-eslint'],
files: ['x-pack/plugins/osquery/**/*.{js,mjs,ts,tsx}'],
rules: {
// 'arrow-body-style': ['error', 'as-needed'],
// 'prefer-arrow-callback': 'error',
'arrow-body-style': ['error', 'as-needed'],
'prefer-arrow-callback': 'error',
'no-unused-vars': 'off',
'react/prop-types': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
Expand Down Expand Up @@ -1596,6 +1629,7 @@ module.exports = {
{
files: [
'src/plugins/interactive_setup/**/*.{js,mjs,ts,tsx}',
'test/interactive_setup_api_integration/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/encrypted_saved_objects/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/spaces/**/*.{js,mjs,ts,tsx}',
Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/packages/kbn-interpreter/ @elastic/kibana-app-services
/src/plugins/bfetch/ @elastic/kibana-app-services
/src/plugins/data/ @elastic/kibana-app-services
/src/plugins/data-views/ @elastic/kibana-app-services
/src/plugins/data_views/ @elastic/kibana-app-services
/src/plugins/embeddable/ @elastic/kibana-app-services
/src/plugins/expressions/ @elastic/kibana-app-services
/src/plugins/field_formats/ @elastic/kibana-app-services
Expand Down Expand Up @@ -244,7 +244,6 @@
/packages/kbn-std/ @elastic/kibana-core
/packages/kbn-config/ @elastic/kibana-core
/packages/kbn-logging/ @elastic/kibana-core
/packages/kbn-crypto/ @elastic/kibana-core
/packages/kbn-http-tools/ @elastic/kibana-core
/src/plugins/saved_objects_management/ @elastic/kibana-core
/src/dev/run_check_published_api_changes.ts @elastic/kibana-core
Expand All @@ -254,7 +253,6 @@
/src/plugins/kibana_overview/ @elastic/kibana-core
/x-pack/plugins/global_search_bar/ @elastic/kibana-core
#CC# /src/core/server/csp/ @elastic/kibana-core
#CC# /src/plugins/xpack_legacy/ @elastic/kibana-core
#CC# /src/plugins/saved_objects/ @elastic/kibana-core
#CC# /x-pack/plugins/cloud/ @elastic/kibana-core
#CC# /x-pack/plugins/features/ @elastic/kibana-core
Expand Down Expand Up @@ -286,9 +284,11 @@
/packages/kbn-i18n/ @elastic/kibana-localization @elastic/kibana-core
#CC# /x-pack/plugins/translations/ @elastic/kibana-localization @elastic/kibana-core

# Security
# Kibana Platform Security
/packages/kbn-crypto/ @elastic/kibana-security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-core
/src/plugins/interactive_setup/ @elastic/kibana-security
/test/interactive_setup_api_integration/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.6
16.11.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.6
16.11.1
12 changes: 6 additions & 6 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
# we can update that rule.
node_repositories(
node_repositories = {
"14.17.6-darwin_amd64": ("node-v14.17.6-darwin-x64.tar.gz", "node-v14.17.6-darwin-x64", "e3e4c02240d74fb1dc8a514daa62e5de04f7eaee0bcbca06a366ece73a52ad88"),
"14.17.6-linux_arm64": ("node-v14.17.6-linux-arm64.tar.xz", "node-v14.17.6-linux-arm64", "9c4f3a651e03cd9b5bddd33a80e8be6a6eb15e518513e410bb0852a658699156"),
"14.17.6-linux_s390x": ("node-v14.17.6-linux-s390x.tar.xz", "node-v14.17.6-linux-s390x", "3677f35b97608056013b5368f86eecdb044bdccc1b3976c1d4448736c37b6a0c"),
"14.17.6-linux_amd64": ("node-v14.17.6-linux-x64.tar.xz", "node-v14.17.6-linux-x64", "3bbe4faf356738d88b45be222bf5e858330541ff16bd0d4cfad36540c331461b"),
"14.17.6-windows_amd64": ("node-v14.17.6-win-x64.zip", "node-v14.17.6-win-x64", "b83e9ce542fda7fc519cec6eb24a2575a84862ea4227dedc171a8e0b5b614ac0"),
"16.11.1-darwin_amd64": ("node-v16.11.1-darwin-x64.tar.gz", "node-v16.11.1-darwin-x64", "ba54b8ed504bd934d03eb860fefe991419b4209824280d4274f6a911588b5e45"),
"16.11.1-linux_arm64": ("node-v16.11.1-linux-arm64.tar.xz", "node-v16.11.1-linux-arm64", "083fc51f0ea26de9041aaf9821874651a9fd3b20d1cf57071ce6b523a0436f17"),
"16.11.1-linux_s390x": ("node-v16.11.1-linux-s390x.tar.xz", "node-v16.11.1-linux-s390x", "855b5c83c2ccb05273d50bb04376335c68d47df57f3187cdebe1f22b972d2825"),
"16.11.1-linux_amd64": ("node-v16.11.1-linux-x64.tar.xz", "node-v16.11.1-linux-x64", "493bcc9b660eff983a6de65a0f032eb2717f57207edf74c745bcb86e360310b3"),
"16.11.1-windows_amd64": ("node-v16.11.1-win-x64.zip", "node-v16.11.1-win-x64", "4d3c179b82d42e66e321c3948a4e332ed78592917a69d38b86e3a242d7e62fb7"),
},
node_version = "14.17.6",
node_version = "16.11.1",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
Loading

0 comments on commit 6b639dd

Please sign in to comment.