Skip to content

Commit

Permalink
Merge branch 'master' into fix-nodedetail-flaky-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 20, 2021
2 parents ce2788b + 1da11df commit 29bc02b
Show file tree
Hide file tree
Showing 840 changed files with 43,126 additions and 12,229 deletions.
3 changes: 1 addition & 2 deletions .backportrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"upstream": "elastic/kibana",
"targetBranchChoices": [
{ "name": "master", "checked": true },
{ "name": "7.x", "checked": true },
"7.16",
"7.15",
"7.14",
"7.13",
Expand Down Expand Up @@ -33,7 +33,6 @@
"targetPRLabels": ["backport"],
"branchLabelMapping": {
"^v8.0.0$": "master",
"^v7.16.0$": "7.x",
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
},
"autoMerge": true,
Expand Down
2 changes: 1 addition & 1 deletion .bazeliskversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.5
1.10.1
3 changes: 0 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ build --remote_timeout=30
build --remote_header=x-buildbuddy-api-key=3EYk49W2NefOx2n3yMze
build --remote_accept_cached=true

# BuildBuddy
## Metadata settings
build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"
# Enable this in case you want to share your build info
# build --build_metadata=VISIBILITY=PUBLIC
build --build_metadata=TEST_GROUPS=//packages
Expand Down
4 changes: 2 additions & 2 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ test --incompatible_strict_action_env
# collect coverage information from test targets
coverage --instrument_test_targets

# Settings for CI
# Bazel flags for CI are in /src/dev/ci_setup/.bazelrc-ci
# Metadata settings
build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"

# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.2.1
4 changes: 4 additions & 0 deletions .buildkite/pipelines/es_snapshots/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ steps:

- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

Expand All @@ -22,6 +23,7 @@ steps:
queue: c2-16
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
Expand Down Expand Up @@ -81,6 +83,7 @@ steps:

- command: .buildkite/scripts/steps/es_snapshots/trigger_promote.sh
label: Trigger promotion
timeout_in_minutes: 10
depends_on:
- default-cigroup
- default-cigroup-docker
Expand All @@ -93,3 +96,4 @@ steps:

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
6 changes: 6 additions & 0 deletions .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ env:
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

Expand All @@ -12,6 +13,7 @@ steps:
queue: c2-16
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
Expand Down Expand Up @@ -143,21 +145,25 @@ steps:
agents:
queue: n2-2
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
queue: c2-4
key: checks
timeout_in_minutes: 120

- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
agents:
queue: c2-4
key: storybooks
timeout_in_minutes: 60

- wait: ~
continue_on_failure: true

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
6 changes: 6 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,27 @@ env:
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

- 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

- command: .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh
label: Build TS Refs and Check Public API Docs
agents:
queue: c2-4
timeout_in_minutes: 80

- wait: ~
continue_on_failure: true

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
7 changes: 6 additions & 1 deletion .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10

- wait

Expand All @@ -10,14 +11,15 @@ steps:
queue: c2-16
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60

- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 13
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 150
key: default-cigroup
retry:
automatic:
Expand Down Expand Up @@ -141,15 +143,18 @@ steps:
agents:
queue: n2-2
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
queue: c2-4
key: checks
timeout_in_minutes: 120

- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
agents:
queue: c2-4
key: storybooks
timeout_in_minutes: 60
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/uptime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/uptime.sh
label: 'Uptime @elastic/synthetics Tests'
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
2 changes: 2 additions & 0 deletions .buildkite/pipelines/update_demo_env.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
steps:
- command: .buildkite/scripts/steps/demo_env/es_and_init.sh
label: Initialize Environment and Deploy ES
timeout_in_minutes: 10

- command: .buildkite/scripts/steps/demo_env/kibana.sh
label: Build and Deploy Kibana
agents:
queue: c2-8
timeout_in_minutes: 60
3 changes: 2 additions & 1 deletion .buildkite/pull_requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"build_on_comment": true,
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"labels": ["buildkite-ci"]
"skip_ci_labels": ["skip-ci", "jenkins-ci"],
"skip_target_branches": ["6.8"]
}
]
}
1 change: 1 addition & 0 deletions .buildkite/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -euo pipefail

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/common/setup_bazel.sh

echo "--- yarn install and bootstrap"
retry 2 15 yarn kbn bootstrap
Expand Down
15 changes: 0 additions & 15 deletions .buildkite/scripts/common/persist_bazel_cache.sh

This file was deleted.

38 changes: 38 additions & 0 deletions .buildkite/scripts/common/setup_bazel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/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

echo "[bazel] writing .bazelrc"
cat <<EOF > $KIBANA_DIR/.bazelrc
# Generated by .buildkite/scripts/common/setup_bazel.sh
import %workspace%/.bazelrc.common
build --build_metadata=ROLE=CI
EOF

if [[ "${BAZEL_CACHE_MODE:-none}" == read* ]]; then
echo "[bazel] enabling caching"
cat <<EOF >> $KIBANA_DIR/.bazelrc
build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://cloud.buildbuddy.io
build --remote_cache=grpcs://cloud.buildbuddy.io
build --remote_timeout=3600
build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY
EOF
fi

if [[ "${BAZEL_CACHE_MODE:-none}" == "read" ]]; then
echo "[bazel] cache set to read-only"
cat <<EOF >> $KIBANA_DIR/.bazelrc
build --noremote_upload_local_results
EOF
fi

if [[ "${BAZEL_CACHE_MODE:-none}" != @(read|read-write|none|) ]]; then
echo "invalid value for BAZEL_CACHE_MODE received ($BAZEL_CACHE_MODE), expected one of [read,read-write,none]"
exit 1
fi
2 changes: 1 addition & 1 deletion .buildkite/scripts/common/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ verify_no_git_changes() {
RED='\033[0;31m'
C_RESET='\033[0m' # Reset color

GIT_CHANGES="$(git ls-files --modified)"
GIT_CHANGES="$(git ls-files --modified -- . ':!:.bazelrc')"
if [ "$GIT_CHANGES" ]; then
echo -e "\n${RED}ERROR: '$1' caused changes to the following files:${C_RESET}\n"
echo -e "$GIT_CHANGES\n"
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ const uploadPipeline = (pipelineContent) => {
// pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
// }

if (await doAnyChangesMatch([/^x-pack\/plugins\/uptime/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime.yml'));
}

pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));

uploadPipeline(pipeline.join('\n'));
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/scripts/steps/functional/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -euo pipefail

# Note, changes here might also need to be made in other scripts, e.g. uptime.sh

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
Expand Down
17 changes: 17 additions & 0 deletions .buildkite/scripts/steps/functional/uptime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/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-uptime-playwright

echo "--- Uptime @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Uptime @elastic/synthetics Tests" \
node plugins/uptime/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION"
3 changes: 0 additions & 3 deletions .buildkite/scripts/steps/on_merge_build_and_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

set -euo pipefail

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

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/build_kibana.sh
.buildkite/scripts/post_build_kibana.sh
Expand Down
2 changes: 1 addition & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if [[ "$(which docker)" != "" && "$(command uname -m)" != "aarch64" ]]; then
fi

./.ci/packer_cache_for_branch.sh master
./.ci/packer_cache_for_branch.sh 7.x
./.ci/packer_cache_for_branch.sh 7.16
1 change: 1 addition & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
node_repositories(
node_repositories = {
"16.11.1-darwin_amd64": ("node-v16.11.1-darwin-x64.tar.gz", "node-v16.11.1-darwin-x64", "ba54b8ed504bd934d03eb860fefe991419b4209824280d4274f6a911588b5e45"),
"16.11.1-darwin_arm64": ("node-v16.11.1-darwin-arm64.tar.gz", "node-v16.11.1-darwin-arm64", "5e772e478390fab3001b7148a923e4f22fca50170000f18b28475337d3a97248"),
"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"),
Expand Down
12 changes: 6 additions & 6 deletions api_docs/security_solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -772,17 +772,17 @@
"interfaces": [
{
"parentPluginId": "securitySolution",
"id": "def-server.AppRequestContext",
"id": "def-server.SecuritySolutionApiRequestHandlerContext",
"type": "Interface",
"tags": [],
"label": "AppRequestContext",
"label": "SecuritySolutionApiRequestHandlerContext",
"description": [],
"path": "x-pack/plugins/security_solution/server/types.ts",
"deprecated": false,
"children": [
{
"parentPluginId": "securitySolution",
"id": "def-server.AppRequestContext.getAppClient",
"id": "def-server.SecuritySolutionApiRequestHandlerContext.getAppClient",
"type": "Function",
"tags": [],
"label": "getAppClient",
Expand All @@ -804,7 +804,7 @@
},
{
"parentPluginId": "securitySolution",
"id": "def-server.AppRequestContext.getSpaceId",
"id": "def-server.SecuritySolutionApiRequestHandlerContext.getSpaceId",
"type": "Function",
"tags": [],
"label": "getSpaceId",
Expand All @@ -819,7 +819,7 @@
},
{
"parentPluginId": "securitySolution",
"id": "def-server.AppRequestContext.getExecutionLogClient",
"id": "def-server.SecuritySolutionApiRequestHandlerContext.getExecutionLogClient",
"type": "Function",
"tags": [],
"label": "getExecutionLogClient",
Expand Down Expand Up @@ -31438,4 +31438,4 @@
}
]
}
}
}
Loading

0 comments on commit 29bc02b

Please sign in to comment.