Skip to content

Commit

Permalink
Merge branch 'main' into ua/forwardport_from_7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarasaba authored Nov 8, 2021
2 parents 6d4e086 + d61ae2e commit 6ea3df4
Show file tree
Hide file tree
Showing 3,813 changed files with 96,420 additions and 60,125 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 3 additions & 2 deletions .backportrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"upstream": "elastic/kibana",
"targetBranchChoices": [
{ "name": "master", "checked": true },
{ "name": "main", "checked": true },
"8.0",
"7.16",
"7.15",
"7.14",
Expand Down Expand Up @@ -32,7 +33,7 @@
],
"targetPRLabels": ["backport"],
"branchLabelMapping": {
"^v8.0.0$": "master",
"^v8.1.0$": "main",
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
},
"autoMerge": true,
Expand Down
12 changes: 6 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import %workspace%/.bazelrc.common

# Remote cache settings for local env
build --remote_cache=grpcs://cloud.buildbuddy.io
build --incompatible_remote_results_ignore_disk=true
build --noremote_upload_local_results
build --remote_timeout=30
build --remote_header=x-buildbuddy-api-key=3EYk49W2NefOx2n3yMze
build --remote_accept_cached=true
# build --remote_cache=grpcs://cloud.buildbuddy.io
# build --incompatible_remote_results_ignore_disk=true
# build --noremote_upload_local_results
# build --remote_timeout=30
# build --remote_header=x-buildbuddy-api-key=3EYk49W2NefOx2n3yMze
# build --remote_accept_cached=true

# Enable this in case you want to share your build info
# build --build_metadata=VISIBILITY=PUBLIC
Expand Down
4 changes: 2 additions & 2 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test --experimental_guard_against_concurrent_changes
query --experimental_guard_against_concurrent_changes

## Cache action outputs on disk so they persist across output_base and bazel shutdown (eg. changing branches)
common --disk_cache=~/.bazel-cache/disk-cache
build --disk_cache=~/.bazel-cache/disk-cache

## Bazel repo cache settings
common --repository_cache=~/.bazel-cache/repository-cache
build --repository_cache=~/.bazel-cache/repository-cache

# Bazel will create symlinks from the workspace directory to output artifacts.
# Build results will be placed in a directory called "bazel-bin"
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/pipelines/flaky_tests/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ for (let i = 1; i <= XPACK_CI_GROUPS; i++) {
inputs.push(stepInput(`xpack/cigroup/${i}`, `Default CI Group ${i}`));
}

inputs.push(stepInput(`xpack/cigroup/Docker`, 'Default CI Group Docker'));

const pipeline = {
steps: [
{
Expand Down
9 changes: 8 additions & 1 deletion .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 150
timeout_in_minutes: 250
key: default-cigroup
retry:
automatic:
Expand Down Expand Up @@ -147,6 +147,13 @@ steps:
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
queue: c2-16
key: linting_with_types
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ steps:

- command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh
label: Default Build and Metrics
env:
BAZEL_CACHE_MODE: read-write
agents:
queue: c2-8
timeout_in_minutes: 60
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/performance/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ steps:
agents:
queue: ci-group-6
depends_on: build
concurrency: 50
concurrency_group: 'performance-test-group'

- wait: ~
continue_on_failure: true
Expand Down
7 changes: 7 additions & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ steps:
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
queue: c2-16
key: linting_with_types
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/fleet_cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/fleet_cypress.sh
label: 'Fleet Cypress Tests'
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
12 changes: 11 additions & 1 deletion .buildkite/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ source .buildkite/scripts/common/util.sh
source .buildkite/scripts/common/setup_bazel.sh

echo "--- yarn install and bootstrap"
retry 2 15 yarn kbn bootstrap
if ! yarn kbn bootstrap; then
echo "bootstrap failed, trying again in 15 seconds"
sleep 15

# Most bootstrap failures will result in a problem inside node_modules that does not get fixed on the next bootstrap
# So, we should just delete node_modules in between attempts
rm -rf node_modules

echo "--- yarn install and bootstrap, attempt 2"
yarn kbn bootstrap
fi

###
### upload ts-refs-cache artifacts as quickly as possible so they are available for download
Expand Down
6 changes: 5 additions & 1 deletion .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ if is_pr; then
export ELASTIC_APM_ACTIVE=false
fi

export CHECKS_REPORTER_ACTIVE=true
if [[ "${GITHUB_STEP_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
export CHECKS_REPORTER_ACTIVE=true
else
export CHECKS_REPORTER_ACTIVE=false
fi

# These can be removed once we're not supporting Jenkins and Buildkite at the same time
# These are primarily used by github checks reporter and can be configured via /github_checks_api.json
Expand Down
4 changes: 3 additions & 1 deletion .buildkite/scripts/lifecycle/post_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ set -euo pipefail
BUILD_SUCCESSFUL=$(node "$(dirname "${0}")/build_status.js")
export BUILD_SUCCESSFUL

"$(dirname "${0}")/commit_status_complete.sh"
if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
"$(dirname "${0}")/commit_status_complete.sh"
fi

node "$(dirname "${0}")/ci_stats_complete.js"

Expand Down
4 changes: 3 additions & 1 deletion .buildkite/scripts/lifecycle/pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

"$(dirname "${0}")/commit_status_start.sh"
if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
"$(dirname "${0}")/commit_status_start.sh"
fi

export CI_STATS_TOKEN="$(retry 5 5 vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)"
export CI_STATS_HOST="$(retry 5 5 vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)"
Expand Down
13 changes: 13 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const uploadPipeline = (pipelineContent) => {
if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/security_solution/,
/^x-pack\/plugins\/cases/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/timelines/,
/^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/,
Expand All @@ -73,6 +76,16 @@ const uploadPipeline = (pipelineContent) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
}

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/fleet/,
/^x-pack\/test\/fleet_cypress/,
])) ||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/fleet_cypress.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/uptime/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime.yml'));
}
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/scripts/steps/es_snapshots/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ mkdir -p "$destination"
mkdir -p elasticsearch && cd elasticsearch

export ELASTICSEARCH_BRANCH="${ELASTICSEARCH_BRANCH:-$BUILDKITE_BRANCH}"
# Until ES renames their master branch to main...
if [[ "$ELASTICSEARCH_BRANCH" == "main" ]]; then
export ELASTICSEARCH_BRANCH="master"
fi

if [[ ! -d .git ]]; then
git init
Expand Down
20 changes: 20 additions & 0 deletions .buildkite/scripts/steps/functional/fleet_cypress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

export JOB=kibana-fleet-cypress

echo "--- Fleet Cypress tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Fleet Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config test/fleet_cypress/cli_config.ts
2 changes: 2 additions & 0 deletions .buildkite/scripts/steps/functional/performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ cat << EOF | buildkite-agent pipeline upload
steps:
- command: .buildkite/scripts/steps/functional/performance_sub.sh
parallelism: "$ITERATION_COUNT"
concurrency: 20
concurrency_group: 'performance-test-group'
EOF


Expand Down
12 changes: 12 additions & 0 deletions .buildkite/scripts/steps/lint_with_types.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

export BUILD_TS_REFS_DISABLE=false
.buildkite/scripts/bootstrap.sh

echo '--- Lint: eslint (with types)'
checks-reporter-with-killswitch "Lint: eslint (with types)" \
node scripts/eslint_with_types
2 changes: 1 addition & 1 deletion .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=16.11.1
ARG NODE_VERSION=16.13.0

FROM node:${NODE_VERSION} AS base

Expand Down
2 changes: 1 addition & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if [[ "$(which docker)" != "" && "$(command uname -m)" != "aarch64" ]]; then
docker pull "maven:3.6.3-openjdk-8-slim"
fi

./.ci/packer_cache_for_branch.sh master
./.ci/packer_cache_for_branch.sh main
./.ci/packer_cache_for_branch.sh 7.16
4 changes: 2 additions & 2 deletions .ci/packer_cache_for_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ checkoutDir="$(pwd)"

function cleanup()
{
if [[ "$branch" != "master" ]]; then
if [[ "$branch" != "main" ]]; then
rm --preserve-root -rf "$checkoutDir"
fi

Expand All @@ -16,7 +16,7 @@ function cleanup()

trap 'cleanup' 0

if [[ "$branch" != "master" ]]; then
if [[ "$branch" != "main" ]]; then
checkoutDir="/tmp/kibana-$branch"
git clone https://github.com/elastic/kibana.git --branch "$branch" --depth 1 "$checkoutDir"
cd "$checkoutDir"
Expand Down
17 changes: 6 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,17 +902,6 @@ module.exports = {
},
},

/**
* Cases overrides
*/
{
files: ['x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}'],
rules: {
'no-duplicate-imports': 'off',
'@typescript-eslint/no-duplicate-imports': ['error'],
},
},

/**
* Security Solution overrides. These rules below are maintained and owned by
* the people within the security-solution-platform team. Please see ping them
Expand All @@ -928,6 +917,8 @@ module.exports = {
'x-pack/plugins/security_solution/common/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/timelines/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/timelines/common/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/common/**/*.{js,mjs,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
Expand All @@ -949,10 +940,12 @@ module.exports = {
files: [
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{ts,tsx}',
'x-pack/plugins/cases/**/*.{ts,tsx}',
],
excludedFiles: [
'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/cases/**/*.{test,mock,test_helper}.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'error',
Expand All @@ -963,6 +956,7 @@ module.exports = {
files: [
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{ts,tsx}',
'x-pack/plugins/cases/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-this-alias': 'error',
Expand All @@ -985,6 +979,7 @@ module.exports = {
files: [
'x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/timelines/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}',
],
plugins: ['eslint-plugin-node', 'react'],
env: {
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
/src/core/ @elastic/kibana-core
/src/plugins/saved_objects_tagging_oss @elastic/kibana-core
/config/kibana.yml @elastic/kibana-core
/typings/ @elastic/kibana-core
/x-pack/plugins/banners/ @elastic/kibana-core
/x-pack/plugins/features/ @elastic/kibana-core
/x-pack/plugins/licensing/ @elastic/kibana-core
Expand Down Expand Up @@ -289,6 +290,7 @@
/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
/test/interactive_setup_functional/ @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 .github/ISSUE_TEMPLATE/v8_breaking_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ changes to Upgrade Assistant itself, please tag Team:Elasticsearch UI.

**Are there any edge cases?**

**[For Kibana deprecations] Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/master/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**
**[For Kibana deprecations] Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/main/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**

<!-- The deprecation service is consumed by the Upgrade Assistant to surface Kibana deprecations.
It provides a way for Kibana deprecations to be resolved automatically via an API
Expand Down
Loading

0 comments on commit 6ea3df4

Please sign in to comment.