Skip to content

Commit

Permalink
Merge branch 'main' into multiple_fleet_servers/landing_page
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Nov 2, 2022
2 parents 2cc2056 + 056413e commit 16112ca
Show file tree
Hide file tree
Showing 3,283 changed files with 98,353 additions and 27,715 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 5 additions & 4 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ query --incompatible_no_implicit_file_export
# Log configs
## different from default
common --color=yes
common --noshow_progress
common --show_progress
common --show_task_finish
build --noshow_loading_progress
query --noshow_loading_progress
build --show_result=0
common --progress_report_interval=10
common --show_progress_rate_limit=10
common --show_loading_progress
build --show_result=1

# Specifies desired output mode for running tests.
# Valid values are
Expand Down
3 changes: 2 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ enabled:
- x-pack/test/functional/apps/lens/group1/config.ts
- x-pack/test/functional/apps/lens/group2/config.ts
- x-pack/test/functional/apps/lens/group3/config.ts
- x-pack/test/functional/apps/lens/open_in_lens/config.ts
- x-pack/test/functional/apps/lens/open_in_lens/tsvb/config.ts
- x-pack/test/functional/apps/lens/open_in_lens/agg_based/config.ts
- x-pack/test/functional/apps/license_management/config.ts
- x-pack/test/functional/apps/logstash/config.ts
- x-pack/test/functional/apps/management/config.ts
Expand Down
11 changes: 0 additions & 11 deletions .buildkite/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,3 @@ if [[ "$DISABLE_BOOTSTRAP_VALIDATION" != "true" ]]; then
check_for_changed_files 'yarn kbn bootstrap'
fi

###
### upload ts-refs-cache artifacts as quickly as possible so they are available for download
###
if [[ "${BUILD_TS_REFS_CACHE_CAPTURE:-}" == "true" ]]; then
echo "--- Build ts-refs-cache"
node scripts/build_ts_refs.js --ignore-type-failures
echo "--- Upload ts-refs-cache"
cd "$KIBANA_DIR/target/ts_refs_cache"
gsutil cp "*.zip" 'gs://kibana-ci-ts-refs-cache/'
cd "$KIBANA_DIR"
fi
12 changes: 0 additions & 12 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ if is_pr; then
export ELASTIC_APM_CONTEXT_PROPAGATION_ONLY=true
fi

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
export ghprbGhRepository="elastic/kibana"
Expand All @@ -83,7 +77,6 @@ if is_pr; then
else
export ELASTIC_APM_ACTIVE=true
export ELASTIC_APM_CONTEXT_PROPAGATION_ONLY=false
export CHECKS_REPORTER_ACTIVE=false
fi

# These are for backwards-compatibility
Expand All @@ -106,11 +99,6 @@ export GCS_UPLOAD_PREFIX=FAKE_UPLOAD_PREFIX # TODO remove the need for this

export KIBANA_BUILD_LOCATION="$WORKSPACE/kibana-build-xpack"

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

export BUILD_TS_REFS_DISABLE=true
export DISABLE_BOOTSTRAP_VALIDATION=true

# Prevent Browserlist from logging on CI about outdated database versions
Expand Down
15 changes: 2 additions & 13 deletions .buildkite/scripts/common/setup_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,7 @@ cat <<EOF >> $KIBANA_DIR/.bazelrc
EOF
fi

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

if [[ "$BAZEL_CACHE_MODE" != @(gcs|populate-local-gcs|buildbuddy|none|) ]]; then
echo "invalid value for BAZEL_CACHE_MODE received ($BAZEL_CACHE_MODE), expected one of [gcs,populate-local-gcs|buildbuddy,none]"
if [[ "$BAZEL_CACHE_MODE" != @(gcs|populate-local-gcs|none|) ]]; then
echo "invalid value for BAZEL_CACHE_MODE received ($BAZEL_CACHE_MODE), expected one of [gcs,populate-local-gcs|none]"
exit 1
fi
9 changes: 0 additions & 9 deletions .buildkite/scripts/common/util.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#!/usr/bin/env bash

checks-reporter-with-killswitch() {
if [ "$CHECKS_REPORTER_ACTIVE" == "true" ] ; then
yarn run github-checks-reporter "$@"
else
arguments=("$@");
"${arguments[@]:1}";
fi
}

is_pr() {
[[ "${GITHUB_PR_NUMBER-}" ]] && return
false
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ export SYNTHETICS_REMOTE_KIBANA_URL
export TEST_FAILURES_ES_PASSWORD
}

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

BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE="$HOME/.kibana-ci-bazel-remote-cache-local-dev.json"
export BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE
retry 5 5 vault read -field=service_account_json secret/kibana-issues/dev/kibana-ci-bazel-remote-cache-local-dev > "$BAZEL_LOCAL_DEV_CACHE_CREDENTIALS_FILE"
Expand Down
9 changes: 4 additions & 5 deletions .buildkite/scripts/saved_object_field_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo '--- Default Saved Object Field Metrics'
checks-reporter-with-killswitch "Capture Kibana Saved Objects field count metrics" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/saved_objects_field_count/config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/saved_objects_field_count/config.ts
7 changes: 2 additions & 5 deletions .buildkite/scripts/steps/build_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ set -euo pipefail

.buildkite/scripts/bootstrap.sh

echo "--- Build TS Refs"
node scripts/build_ts_refs \
--clean \
--no-cache \
--force
echo "--- Run scripts/type_check to ensure that all build available"
node scripts/type_check

echo "--- Build API Docs"
node --max-old-space-size=12000 scripts/build_api_docs
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/check_types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ source .buildkite/scripts/common/util.sh
.buildkite/scripts/bootstrap.sh

echo --- Check Types
checks-reporter-with-killswitch "Check Types" \
node scripts/type_check --concurrency 8
node scripts/type_check
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/bundle_limits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ source .buildkite/scripts/common/util.sh

echo --- Check Bundle Limits

checks-reporter-with-killswitch "Check Bundle Limits" \
node scripts/build_kibana_platform_plugins --validate-limits
node scripts/build_kibana_platform_plugins --validate-limits
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/file_casing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check File Casing
checks-reporter-with-killswitch "Check File Casing" \
node scripts/check_file_casing --quiet
node scripts/check_file_casing --quiet
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/ftr_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check FTR Configs
checks-reporter-with-killswitch "Check FTR Configs" \
node scripts/check_ftr_configs
node scripts/check_ftr_configs
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/i18n.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check i18n
checks-reporter-with-killswitch "Check i18n" \
node scripts/i18n_check --ignore-missing
node scripts/i18n_check --ignore-missing
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/jest_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check Jest Configs
checks-reporter-with-killswitch "Check Jest Configs" \
node scripts/check_jest_configs
node scripts/check_jest_configs
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check Licenses
checks-reporter-with-killswitch "Check Licenses" \
node scripts/check_licenses --dev
node scripts/check_licenses --dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check Plugins With Circular Dependencies
checks-reporter-with-killswitch "Check Plugins With Circular Dependencies" \
node scripts/find_plugins_with_circular_deps
node scripts/find_plugins_with_circular_deps
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check Telemetry Schema
checks-reporter-with-killswitch "Check Telemetry Schema" \
node scripts/telemetry_check
node scripts/telemetry_check
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/test_hardening.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Test Hardening
checks-reporter-with-killswitch "Test Hardening" \
node scripts/test_hardening
node scripts/test_hardening
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/test_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Test Projects
checks-reporter-with-killswitch "Test Projects" \
yarn kbn run-in-packages test
yarn kbn run-in-packages test
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/ts_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check TypeScript Projects
checks-reporter-with-killswitch "Check TypeScript Projects" \
node scripts/check_ts_projects
node scripts/check_ts_projects
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks/verify_notice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Verify NOTICE
checks-reporter-with-killswitch "Verify NOTICE" \
node scripts/notice --validate
node scripts/notice --validate
7 changes: 3 additions & 4 deletions .buildkite/scripts/steps/fleet/install_all_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ source .buildkite/scripts/steps/functional/common.sh

echo '--- Installing all packages'

checks-reporter-with-killswitch "Fleet packages Tests" \
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/fleet_packages/config.ts
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/fleet_packages/config.ts
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/apm_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ echo "--- APM Cypress Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "APM Cypress Tests" \
node plugins/apm/scripts/test/e2e.js \
node plugins/apm/scripts/test/e2e.js \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--record \
--key "$APM_CYPRESS_RECORD_KEY"
9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/fleet_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export JOB=kibana-fleet-cypress

echo "--- Fleet Cypress tests"

checks-reporter-with-killswitch "Fleet Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/fleet_cypress/cli_config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/fleet_cypress/cli_config.ts
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/observability_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- Observability plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Observability plugin @elastic/synthetics Tests" \
node plugins/observability/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/observability/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
8 changes: 3 additions & 5 deletions .buildkite/scripts/steps/functional/osquery_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

export BUILD_TS_REFS_DISABLE=false
.buildkite/scripts/bootstrap.sh
node scripts/build_kibana_platform_plugins.js

export JOB=kibana-osquery-cypress

echo "--- Osquery Cypress tests"

checks-reporter-with-killswitch "Osquery Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/osquery_cypress/cli_config.ts
node scripts/functional_tests \
--debug --bail \
--config x-pack/test/osquery_cypress/cli_config.ts

9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/response_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export JOB=kibana-security-solution-chrome

echo "--- Response Ops Cypress Tests on Security Solution"

checks-reporter-with-killswitch "Response Ops Cypress Tests on Security Solution" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/response_ops_cli_config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/response_ops_cli_config.ts
9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/response_ops_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export JOB=kibana-security-solution-chrome

echo "--- Response Ops Cases Cypress Tests on Security Solution"

checks-reporter-with-killswitch "Response Ops Cases Cypress Tests on Security Solution" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cases_cli_config.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cases_cli_config.ts
9 changes: 4 additions & 5 deletions .buildkite/scripts/steps/functional/security_solution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export CLI_COUNT=${CLI_COUNT:-$BUILDKITE_PARALLEL_JOB_COUNT}

echo "--- Security Solution tests (Chrome)"

checks-reporter-with-killswitch "Security Solution Cypress Tests (Chrome) $CLI_NUMBER" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cli_config_parallel.ts
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cli_config_parallel.ts
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/synthetics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- synthetics @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "synthetics @elastic/synthetics Tests" \
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" --grep "MonitorManagement-monitor*"
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" --grep "MonitorManagement-monitor*"
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/synthetics_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- Synthetics plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Synthetics plugin @elastic/synthetics Tests" \
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/synthetics/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/functional/ux_synthetics_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ echo "--- User Experience @elastic/synthetics Tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "User Experience plugin @elastic/synthetics Tests" \
node plugins/ux/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node plugins/ux/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ source .buildkite/scripts/common/util.sh
.buildkite/scripts/bootstrap.sh

echo '--- Lint: stylelint'
checks-reporter-with-killswitch "Lint: stylelint" \
node scripts/stylelint
node scripts/stylelint
echo "stylelint ✅"

echo '--- Lint: eslint'
Expand Down
4 changes: 1 addition & 3 deletions .buildkite/scripts/steps/lint_with_types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ 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
node scripts/eslint_with_types
4 changes: 0 additions & 4 deletions .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

set -euo pipefail

export BAZEL_CACHE_MODE=buildbuddy # Populate Buildbuddy bazel remote cache for linux
export BUILD_TS_REFS_CACHE_ENABLE=true
export BUILD_TS_REFS_CACHE_CAPTURE=true
export DISABLE_BOOTSTRAP_VALIDATION=true
export BUILD_TS_REFS_DISABLE=false

.buildkite/scripts/bootstrap.sh

Expand Down
Loading

0 comments on commit 16112ca

Please sign in to comment.