Skip to content

Commit

Permalink
Merge branch 'main' into fix-csv-for-relative-timefilter
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Mar 14, 2022
2 parents 2831c1c + 3853bf4 commit 2040d86
Show file tree
Hide file tree
Showing 1,031 changed files with 26,644 additions and 19,449 deletions.
12 changes: 12 additions & 0 deletions .buildkite/pipelines/flaky_tests/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"key": "oss/accessibility",
"name": "OSS Accessibility"
},
{
"key": "xpack/cypress/security_solution",
"name": "Security Solution - Cypress"
},
{
"key": "xpack/cypress/osquery_cypress",
"name": "Osquery - Cypress"
},
{
"key": "xpack/cypress/fleet_cypress",
"name": "Fleet - Cypress"
},
{
"key": "xpack/cigroup",
"name": "Default CI Group",
Expand Down
23 changes: 22 additions & 1 deletion .buildkite/pipelines/flaky_tests/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/

const { execSync } = require('child_process');
const groups = /** @type {Array<{key: string, name: string, ciGroups: number }>} */ (
require('./groups.json').groups
);

const concurrency = 25;
const defaultCount = concurrency * 2;
Expand Down Expand Up @@ -113,7 +116,7 @@ steps.push({
label: 'Build Kibana Distribution and Plugins',
agents: { queue: 'c2-8' },
key: 'build',
if: "build.env('BUILD_ID_FOR_ARTIFACTS') == null || build.env('BUILD_ID_FOR_ARTIFACTS') == ''",
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''",
});

for (const testSuite of testSuites) {
Expand Down Expand Up @@ -183,6 +186,24 @@ for (const testSuite of testSuites) {
concurrency_group: UUID,
concurrency_method: 'eager',
});
case 'cypress':
const CYPRESS_SUITE = CI_GROUP;
const group = groups.find((group) => group.key.includes(CYPRESS_SUITE));
if (!group) {
throw new Error(
`Group configuration was not found in groups.json for the following cypress suite: {${CYPRESS_SUITE}}.`
);
}
steps.push({
command: `.buildkite/scripts/steps/functional/${CYPRESS_SUITE}.sh`,
label: group.name,
agents: { queue: 'ci-group-6' },
depends_on: 'build',
parallelism: RUN_COUNT,
concurrency: concurrency,
concurrency_group: UUID,
concurrency_method: 'eager',
});
break;
}
}
Expand Down
11 changes: 1 addition & 10 deletions .buildkite/pipelines/performance/daily.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
steps:
- block: ':gear: Performance Tests Configuration'
prompt: 'Fill out the details for performance test'
fields:
- text: ':arrows_counterclockwise: Iterations'
key: 'performance-test-iteration-count'
hint: 'How many times you want to run tests? '
required: true
if: build.env('PERF_TEST_COUNT') == null

- label: ':male-mechanic::skin-tone-2: Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
Expand All @@ -24,7 +15,7 @@ steps:
- label: ':muscle: Performance Tests with Playwright config'
command: .buildkite/scripts/steps/functional/performance_playwright.sh
agents:
queue: c2-16
queue: kb-static-ubuntu
depends_on: build

- wait: ~
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/demo_env/kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source "$(dirname "${0}")/config.sh"
export KIBANA_IMAGE="gcr.io/elastic-kibana-184716/demo/kibana:$DEPLOYMENT_NAME-$(git rev-parse HEAD)"

echo '--- Build Kibana'
node scripts/build --debug --docker-images --example-plugins --skip-docker-ubi
node scripts/build --debug --docker-images --example-plugins --skip-docker-ubi --skip-docker-cloud --skip-docker-contexts

echo '--- Build Docker image with example plugins'
cd target/example_plugins
Expand Down
65 changes: 48 additions & 17 deletions .buildkite/scripts/steps/functional/performance_playwright.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
#!/bin/bash
#!/usr/bin/env bash

set -uo pipefail
set -euo pipefail

if [ -z "${PERF_TEST_COUNT+x}" ]; then
TEST_COUNT="$(buildkite-agent meta-data get performance-test-iteration-count)"
else
TEST_COUNT=$PERF_TEST_COUNT
fi
source .buildkite/scripts/common/util.sh

tput setab 2; tput setaf 0; echo "Performance test will be run at ${BUILDKITE_BRANCH} ${TEST_COUNT} times"
.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

cat << EOF | buildkite-agent pipeline upload
steps:
- command: .buildkite/scripts/steps/functional/performance_sub_playwright.sh
parallelism: "$TEST_COUNT"
concurrency: 20
concurrency_group: 'performance-test-group'
agents:
queue: c2-16
EOF
echo --- Run Performance Tests with Playwright config

node scripts/es snapshot&

esPid=$!

export TEST_ES_URL=http://elastic:changeme@localhost:9200
export TEST_ES_DISABLE_STARTUP=true

sleep 120

cd "$XPACK_DIR"

jobId=$(npx uuid)
export TEST_JOB_ID="$jobId"

journeys=("ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard")

for i in "${journeys[@]}"; do
echo "JOURNEY[${i}] is running"

export TEST_PERFORMANCE_PHASE=WARMUP
export ELASTIC_APM_ACTIVE=false
export JOURNEY_NAME="${i}"

checks-reporter-with-killswitch "Run Performance Tests with Playwright Config (Journey:${i},Phase: WARMUP)" \
node scripts/functional_tests \
--config test/performance/config.playwright.ts \
--include "test/performance/tests/playwright/${i}.ts" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail

export TEST_PERFORMANCE_PHASE=TEST
export ELASTIC_APM_ACTIVE=true

checks-reporter-with-killswitch "Run Performance Tests with Playwright Config (Journey:${i},Phase: TEST)" \
node scripts/functional_tests \
--config test/performance/config.playwright.ts \
--include "test/performance/tests/playwright/${i}.ts" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail
done

kill "$esPid"
55 changes: 0 additions & 55 deletions .buildkite/scripts/steps/functional/performance_sub_playwright.sh

This file was deleted.

10 changes: 5 additions & 5 deletions .buildkite/scripts/steps/package_testing/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ mkdir -p target
cd target
if [[ "$TEST_PACKAGE" == "deb" ]]; then
buildkite-agent artifact download 'kibana-*.deb' . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.5"
KIBANA_IP_ADDRESS="192.168.56.5"
elif [[ "$TEST_PACKAGE" == "rpm" ]]; then
buildkite-agent artifact download 'kibana-*.rpm' . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.6"
KIBANA_IP_ADDRESS="192.168.56.6"
elif [[ "$TEST_PACKAGE" == "docker" ]]; then
buildkite-agent artifact download "kibana-$KIBANA_PKG_VERSION-SNAPSHOT-docker-image.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.7"
KIBANA_IP_ADDRESS="192.168.56.7"
fi
cd ..

export VAGRANT_CWD=test/package
vagrant up "$TEST_PACKAGE" --no-provision

node scripts/es snapshot \
-E network.bind_host=127.0.0.1,192.168.50.1 \
-E network.bind_host=127.0.0.1,192.168.56.1 \
-E discovery.type=single-node \
--license=trial &
while ! timeout 1 bash -c "echo > /dev/tcp/localhost/9200"; do sleep 30; done
Expand All @@ -33,7 +33,7 @@ vagrant provision "$TEST_PACKAGE"

export TEST_BROWSER_HEADLESS=1
export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601"
export TEST_ES_URL=http://elastic:changeme@192.168.50.1:9200
export TEST_ES_URL=http://elastic:changeme@192.168.56.1:9200

cd x-pack
node scripts/functional_test_runner.js --include-tag=smoke
29 changes: 0 additions & 29 deletions .ci/package-testing/Jenkinsfile

This file was deleted.

4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,10 @@ module.exports = {
'import/newline-after-import': 'error',
'react-hooks/exhaustive-deps': 'off',
'react/jsx-boolean-value': ['error', 'never'],
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true, varsIgnorePattern: '^_' },
],
},
},
{
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 @@ -221,9 +221,11 @@
/packages/kbn-test/ @elastic/kibana-operations
/packages/kbn-ui-shared-deps-npm/ @elastic/kibana-operations
/packages/kbn-ui-shared-deps-src/ @elastic/kibana-operations
/packages/kbn-bazel-packages/ @elastic/kibana-operations
/packages/kbn-es-archiver/ @elastic/kibana-operations
/packages/kbn-utils/ @elastic/kibana-operations
/packages/kbn-cli-dev-mode/ @elastic/kibana-operations
/packages/kbn-generate/ @elastic/kibana-operations
/src/cli/keystore/ @elastic/kibana-operations
/.ci/es-snapshots/ @elastic/kibana-operations
/.github/workflows/ @elastic/kibana-operations
Expand Down
2 changes: 1 addition & 1 deletion config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
#ops.interval: 5000

# Specifies locale to be used for all localizable strings, dates and number formats.
# Supported languages are the following: English - en , by default , Chinese - zh-CN .
# Supported languages are the following: English (default) "en", Chinese "zh-CN", Japanese "ja-JP", French "fr-FR".
#i18n.locale: "en"

# =================== Frequently used (Optional)===================
Expand Down
Loading

0 comments on commit 2040d86

Please sign in to comment.