Skip to content

Commit

Permalink
Merge branch 'elastic:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ek-so authored Jan 20, 2025
2 parents ab2454f + a39898b commit 6ed3e0b
Show file tree
Hide file tree
Showing 3,260 changed files with 212,415 additions and 26,149 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 1 addition & 3 deletions .buildkite/ftr_oblt_stateful_configs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
disabled:
# Cypress configs, for now these are still run manually
- x-pack/test/apm_cypress/cli_config.ts
- x-pack/solutions/observability/plugins/observability_onboarding/e2e/ftr_config_open.ts
- x-pack/solutions/observability/plugins/observability_onboarding/e2e/ftr_config_runner.ts
- x-pack/solutions/observability/plugins/observability_onboarding/e2e/ftr_config.ts
- x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_config_run.ts
- x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_config.ts
- x-pack/solutions/observability/plugins/inventory/e2e/ftr_config_run.ts
- x-pack/solutions/observability/plugins/inventory/e2e/ftr_config.ts
- x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_open.ts
Expand Down Expand Up @@ -32,7 +31,6 @@ enabled:
- x-pack/test/api_integration/apis/synthetics/config.ts
- x-pack/test/api_integration/apis/uptime/config.ts
- x-pack/test/api_integration/apis/entity_manager/config.ts
- x-pack/test/api_integration/apis/streams/config.ts
- x-pack/test/apm_api_integration/basic/config.ts
- x-pack/test/apm_api_integration/cloud/config.ts
- x-pack/test/apm_api_integration/rules/config.ts
Expand Down
1 change: 1 addition & 0 deletions .buildkite/ftr_security_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/edr_workflows/resolver/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/edr_workflows/response_actions/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/edr_workflows/spaces/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/siem_migrations/rules/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_endpoint/configs/serverless.endpoint.config.ts
- x-pack/test/security_solution_endpoint/configs/serverless.integrations.config.ts
# serverless config files that run deployment-agnostic tests
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/ftr_security_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/edr_workflows/resolver/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/edr_workflows/response_actions/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/edr_workflows/spaces/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/siem_migrations/rules/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_endpoint/configs/endpoint.config.ts
- x-pack/test/security_solution_endpoint/configs/integrations.config.ts
- x-pack/test/api_integration/apis/cloud_security_posture/config.ts
Expand All @@ -104,3 +105,4 @@ enabled:
- x-pack/test/cloud_security_posture_functional/data_views/config.ts
- x-pack/test/automatic_import_api_integration/apis/config_basic.ts
- x-pack/test/automatic_import_api_integration/apis/config_graphs.ts
- x-pack/test/security_solution_api_integration/test_suites/asset_inventory/entity_store/trial_license_complete_tier/configs/ess.config.ts
14 changes: 7 additions & 7 deletions .buildkite/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .buildkite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@types/chai": "^4.3.3",
"@types/js-yaml": "^4.0.5",
"@types/js-yaml": "^4.0.9",
"@types/minimatch": "^3.0.5",
"@types/mocha": "^10.0.1",
"@types/node": "^15.12.2",
Expand Down
16 changes: 16 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,22 @@ steps:
- exit_status: '-1'
limit: 1

- command: .buildkite/scripts/steps/functional/apm_cypress.sh
label: 'APM Cypress Tests'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
depends_on: build
timeout_in_minutes: 120
parallelism: 3
retry:
automatic:
- exit_status: '-1'
limit: 1

- command: '.buildkite/scripts/steps/functional/on_merge_unsupported_ftrs.sh'
label: Trigger unsupported ftr tests
timeout_in_minutes: 10
Expand Down
19 changes: 0 additions & 19 deletions .buildkite/pipelines/on_merge_unsupported_ftrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@ steps:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/functional/apm_cypress.sh
label: 'APM Cypress Tests'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
depends_on: build
env:
PING_SLACK_TEAM: "@obs-ux-infra_services-team"
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/profiling_cypress.sh
label: 'Profiling Cypress Tests'
agents:
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/apm_cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
- check_types
- check_oas_snapshot
timeout_in_minutes: 120
parallelism: 1 # TODO: Set parallelism when apm_cypress handles it
parallelism: 3
retry:
automatic:
- exit_status: '-1'
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/lifecycle/post_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ IS_TEST_EXECUTION_STEP="$(buildkite-agent meta-data get "${BUILDKITE_JOB_ID}_is_

if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
echo "--- Upload Artifacts"
buildkite-agent artifact upload '.scout/reports/scout-playwright-test-failures-*/**/*'
buildkite-agent artifact upload 'target/junit/**/*'
buildkite-agent artifact upload 'target/kibana-coverage/jest/**/*'
buildkite-agent artifact upload 'target/kibana-coverage/functional/**/*'
Expand Down
8 changes: 8 additions & 0 deletions .buildkite/scripts/steps/checks/dependencies_missing_owner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

echo --- Check for NPM dependencies missing owners
node scripts/dependency_ownership.js --missingOwner --failIfUnowned
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/checks/quick_checks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
.buildkite/scripts/steps/checks/native_modules.sh
.buildkite/scripts/steps/checks/test_files_missing_owner.sh
.buildkite/scripts/steps/checks/styled_components_mapping.sh
.buildkite/scripts/steps/checks/dependencies_missing_owner.sh
30 changes: 5 additions & 25 deletions .buildkite/scripts/steps/functional/apm_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,15 @@

set -euo pipefail

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/steps/functional/common.sh

APM_CYPRESS_RECORD_KEY="$(vault_get apm-cypress-dashboard-record-key CYPRESS_RECORD_KEY)"

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh
.buildkite/scripts/copy_es_snapshot_cache.sh
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

export JOB=kibana-apm-cypress
IS_FLAKY_TEST_RUNNER=${CLI_COUNT:-0}
GH_APM_TEAM_LABEL="Team:APM"

if (! is_pr); then
echo "--- Add GH labels to buildkite metadata"
ts-node .buildkite/scripts/steps/add_gh_labels_to_bk_metadata.ts BUILDKITE_MESSAGE true
GH_ON_MERGE_LABELS="$(buildkite-agent meta-data get gh_labels --default '')"
fi

# Enabling cypress dashboard recording when PR is labeled with `apm:cypress-record` and we are not using the flaky test runner OR on merge with Team:APM label applied
if ([[ "$IS_FLAKY_TEST_RUNNER" -ne 1 ]] && is_pr_with_label "apm:cypress-record") || ([[ $GH_ON_MERGE_LABELS == *"$GH_APM_TEAM_LABEL"* ]]); then
CYPRESS_ARGS="--record --key "$APM_CYPRESS_RECORD_KEY" --parallel --ci-build-id "${BUILDKITE_BUILD_ID}""
else
CYPRESS_ARGS=""
fi

echo "--- APM Cypress Tests"

cd "$XPACK_DIR"
cd "$XPACK_DIR/solutions/observability/plugins/apm/ftr_e2e"

node solutions/observability/plugins/apm/scripts/test/e2e.js \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
$CYPRESS_ARGS
set +e
yarn cypress:run; status=$?; yarn junit:merge || :; exit $status
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/renovate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ set -euo pipefail

echo '--- Renovate: validation'
.buildkite/scripts/steps/checks/renovate.sh
.buildkite/scripts/steps/checks/dependencies_missing_owner.sh
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/storybooks/build_and_upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const STORYBOOK_DIRECTORY =
: (process.env.BUILDKITE_BRANCH ?? '').replace('/', '__');
const STORYBOOK_BUCKET = 'ci-artifacts.kibana.dev/storybooks';
const STORYBOOK_BUCKET_URL = `https://${STORYBOOK_BUCKET}/${STORYBOOK_DIRECTORY}`;
const STORYBOOK_BASE_URL = `${STORYBOOK_BUCKET_URL}/${process.env.BUILDKITE_COMMIT}`;
const STORYBOOK_BASE_URL = `${STORYBOOK_BUCKET_URL}`;

const exec = (...args: string[]) => execSync(args.join(' '), { stdio: 'inherit' });

Expand Down Expand Up @@ -80,7 +80,7 @@ const upload = () => {
);
exec(`
${activateScript} gs://ci-artifacts.kibana.dev
gsutil -q -m cp -r -z js,css,html,json,map,txt,svg '*' 'gs://${STORYBOOK_BUCKET}/${STORYBOOK_DIRECTORY}/${process.env.BUILDKITE_COMMIT}/'
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" -q -m cp -r -z js,css,html,json,map,txt,svg '*' 'gs://${STORYBOOK_BUCKET}/${STORYBOOK_DIRECTORY}/'
gsutil -h "Cache-Control:no-cache, max-age=0, no-transform" cp -z html 'index.html' 'gs://${STORYBOOK_BUCKET}/${STORYBOOK_DIRECTORY}/latest/'
`);

Expand Down
5 changes: 2 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -992,10 +992,9 @@ module.exports = {
},
{
files: [
'x-pack/plugins/observability_solution/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/{streams,streams_app}/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/solutions/observability/plugins/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/solutions/observability/packages/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'src/plugins/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/platform/packages/shared/observability/logs_overview/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
],
rules: {
'@kbn/i18n/strings_should_be_translated_with_i18n': 'warn',
Expand Down
Loading

0 comments on commit 6ed3e0b

Please sign in to comment.