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 Dec 12, 2024
2 parents e116fac + b433119 commit 9b9c4ac
Show file tree
Hide file tree
Showing 12,448 changed files with 119,902 additions and 61,243 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 6 additions & 6 deletions .buildkite/ftr_oblt_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ disabled:
- x-pack/plugins/observability_solution/profiling/e2e/ftr_config.ts

#FTR configs
- x-pack/plugins/observability_solution/uptime/e2e/config.ts
- x-pack/solutions/observability/plugins/uptime/e2e/config.ts

# Elastic Synthetics configs
- x-pack/plugins/observability_solution/uptime/e2e/uptime/synthetics_run.ts
- x-pack/plugins/observability_solution/synthetics/e2e/config.ts
- x-pack/plugins/observability_solution/synthetics/e2e/synthetics/synthetics_run.ts
- x-pack/plugins/observability_solution/exploratory_view/e2e/synthetics_run.ts
- x-pack/plugins/observability_solution/ux/e2e/synthetics_run.ts
- x-pack/solutions/observability/plugins/uptime/e2e/uptime/synthetics_run.ts
- x-pack/solutions/observability/plugins/synthetics/e2e/config.ts
- x-pack/solutions/observability/plugins/synthetics/e2e/synthetics/synthetics_run.ts
- x-pack/solutions/observability/plugins/exploratory_view/e2e/synthetics_run.ts
- x-pack/solutions/observability/plugins/ux/e2e/synthetics_run.ts
- x-pack/plugins/observability_solution/slo/e2e/synthetics_run.ts

defaultQueue: 'n2-4-spot'
Expand Down
1 change: 0 additions & 1 deletion .buildkite/ftr_platform_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ enabled:
- x-pack/test/functional/apps/security/config.ts
- x-pack/test/functional/apps/snapshot_restore/config.ts
- x-pack/test/functional/apps/spaces/config.ts
- x-pack/test/functional/apps/spaces/solution_view_flag_enabled/config.ts
- x-pack/test/functional/apps/status_page/config.ts
- x-pack/test/functional/apps/transform/creation/index_pattern/config.ts
- x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/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 @@ -37,6 +37,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless.ts
- x-pack/test_serverless/functional/test_suites/security/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/security/config.context_awareness.ts
- x-pack/test_serverless/functional/test_suites/security/config.examples.context_awareness.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group3.ts
Expand Down
3 changes: 2 additions & 1 deletion .buildkite/ftr_security_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,5 @@ enabled:
- x-pack/test/cloud_security_posture_functional/config.ts
- x-pack/test/cloud_security_posture_functional/config.agentless.ts
- x-pack/test/cloud_security_posture_functional/data_views/config.ts
- x-pack/test/automatic_import_api_integration/security/config_basic.ts
- x-pack/test/automatic_import_api_integration/apis/config_basic.ts
- x-pack/test/automatic_import_api_integration/apis/config_graphs.ts
54 changes: 54 additions & 0 deletions .buildkite/pipeline-resource-definitions/kibana-gen-ai-daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: bk-kibana-gen-ai-daily
description: Runs the GenAI FTR tests daily
links:
- url: 'https://buildkite.com/elastic/kibana-gen-ai-tests-daily'
title: Pipeline link
spec:
type: buildkite-pipeline
owner: 'group:appex-ai-infra'
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: kibana / gen-ai-tests / daily
description: Runs the GenAI FTR tests daily
spec:
env:
SLACK_NOTIFICATIONS_CHANNEL: '#appex-ai-infra-alerts'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
allow_rebuilds: true
branch_configuration: main
cancel_intermediate_builds: true
default_branch: main
repository: elastic/kibana
pipeline_file: .buildkite/pipelines/gen_ai_testing.yml
provider_settings:
build_branches: false
build_pull_requests: false
publish_commit_status: false
trigger_mode: none
prefix_pull_request_fork_branch_names: false
skip_pull_request_builds_for_existing_commits: false
teams:
everyone:
access_level: BUILD_AND_READ
appex-ai-infra:
access_level: MANAGE_BUILD_AND_READ
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
appex-qa:
access_level: MANAGE_BUILD_AND_READ
kibana-tech-leads:
access_level: MANAGE_BUILD_AND_READ
schedules:
Daily build:
cronline: 0 0 * * * America/New_York
message: Daily build
branch: main
tags:
- kibana
1 change: 1 addition & 0 deletions .buildkite/pipeline-resource-definitions/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-investigations.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-gen-ai-daily.yml
48 changes: 48 additions & 0 deletions .buildkite/pipelines/gen_ai_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
env:
FTR_GEN_AI: "1"
steps:
- label: '👨‍🔧 Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2

- wait

- label: '🧑‍🏭 Build Kibana Distribution'
command: .buildkite/scripts/steps/build_kibana.sh
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-8
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"

- wait

- command: .buildkite/scripts/steps/test/ftr_configs.sh
env:
FTR_CONFIG: "x-pack/test/functional_gen_ai/inference/config.ts"
FTR_CONFIG_GROUP_KEY: 'ftr-ai-infra-gen-ai-inference-api'
FTR_GEN_AI: "1"
label: AppEx AI-Infra Inference APIs FTR tests
key: ai-infra-gen-ai-inference-api
timeout_in_minutes: 50
parallelism: 1
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1


22 changes: 0 additions & 22 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,28 +169,6 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/test/ftr_configs.sh
env:
FTR_CONFIG: "x-pack/test/functional_gen_ai/inference/config.ts"
FTR_CONFIG_GROUP_KEY: 'ftr-ai-infra-gen-ai-inference-api'
FTR_GEN_AI: "1"
label: AppEx AI-Infra Inference APIs FTR tests
key: ai-infra-gen-ai-inference-api
timeout_in_minutes: 50
parallelism: 1
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh
label: 'Serverless Entity Analytics - Security Cypress Tests'
agents:
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/on_merge_unsupported_ftrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ steps:
depends_on: build
timeout_in_minutes: 120
artifact_paths:
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'
- 'x-pack/solutions/observability/plugins/synthetics/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
- check_oas_snapshot
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/exploratory_view/e2e/.journeys/**/*'
- 'x-pack/solutions/observability/plugins/exploratory_view/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
18 changes: 18 additions & 0 deletions .buildkite/pipelines/pull_request/scout_ui_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
steps:
- command: .buildkite/scripts/steps/functional/scout_ui_tests.sh
label: 'Scout UI Tests'
agents:
machineType: n2-standard-4
preemptible: true
depends_on:
- build
- quick_checks
- checks
- linting
- linting_with_types
- check_types
timeout_in_minutes: 30
retry:
automatic:
- exit_status: '-1'
limit: 2
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/synthetics_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
- check_oas_snapshot
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'
- 'x-pack/solutions/observability/plugins/synthetics/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/uptime_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
- check_oas_snapshot
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/synthetics/e2e/.journeys/**/*'
- 'x-pack/solutions/observability/plugins/synthetics/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/ux_plugin_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
- check_oas_snapshot
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/observability_solution/ux/e2e/.journeys/**/*'
- 'x-pack/solutions/observability/plugins/ux/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
Expand Down
28 changes: 19 additions & 9 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const getPipeline = (filename: string, removeSteps = true) => {

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/observability_solution\/observability_onboarding/,
/^x-pack\/solutions\/observability\/plugins\/observability_onboarding/,
/^x-pack\/plugins\/fleet/,
])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
Expand All @@ -114,16 +114,16 @@ const getPipeline = (filename: string, removeSteps = true) => {
}

if (
(await doAnyChangesMatch([/^x-pack\/plugins\/observability_solution\/exploratory_view/])) ||
(await doAnyChangesMatch([/^x-pack\/solutions\/observability\/plugins\/exploratory_view/])) ||
GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/exploratory_view_plugin.yml'));
}

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/observability_solution\/synthetics/,
/^x-pack\/plugins\/observability_solution\/exploratory_view/,
/^x-pack\/solutions\/observability\/plugins\/synthetics/,
/^x-pack\/solutions\/observability\/plugins\/exploratory_view/,
])) ||
GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites')
) {
Expand All @@ -133,8 +133,8 @@ const getPipeline = (filename: string, removeSteps = true) => {

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/observability_solution\/ux/,
/^x-pack\/plugins\/observability_solution\/exploratory_view/,
/^x-pack\/solutions\/observability\/plugins\/ux/,
/^x-pack\/solutions\/observability\/plugins\/exploratory_view/,
])) ||
GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites')
) {
Expand All @@ -154,9 +154,9 @@ const getPipeline = (filename: string, removeSteps = true) => {

if (
(await doAnyChangesMatch([
/^x-pack\/packages\/ai-infra/,
/^x-pack\/plugins\/ai_infra/,
/^x-pack\/plugins\/inference/,
/^x-pack\/platform\/packages\/shared\/ai-infra/,
/^x-pack\/platform\/plugins\/shared\/ai_infra/,
/^x-pack\/platform\/plugins\/shared\/inference/,
/^x-pack\/plugins\/stack_connectors\/server\/connector_types\/bedrock/,
/^x-pack\/plugins\/stack_connectors\/server\/connector_types\/gemini/,
/^x-pack\/plugins\/stack_connectors\/server\/connector_types\/openai/,
Expand Down Expand Up @@ -378,6 +378,16 @@ const getPipeline = (filename: string, removeSteps = true) => {
);
}

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/discover_enhanced\/ui_tests/,
/^packages\/kbn-scout/,
])) ||
GITHUB_PR_LABELS.includes('ci:scout-ui-tests')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/scout_ui_tests.yml'));
}

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

// remove duplicated steps
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/esql_generate_function_metadata.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail

VALIDATION_PACKAGE_DIR="packages/kbn-esql-validation-autocomplete"
EDITOR_PACKAGE_DIR="packages/kbn-language-documentation"
VALIDATION_PACKAGE_DIR="src/platform/packages/shared/kbn-esql-validation-autocomplete"
EDITOR_PACKAGE_DIR="src/platform/packages/private/kbn-language-documentation"
GIT_SCOPE="$VALIDATION_PACKAGE_DIR/**/* $EDITOR_PACKAGE_DIR/**/*"

report_main_step () {
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/scripts/steps/esql_grammar_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
synchronize_lexer_grammar () {
license_header="$1"
source_file="$PARENT_DIR/elasticsearch/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4"
destination_file="./packages/kbn-esql-ast/src/antlr/esql_lexer.g4"
destination_file="./src/platform/packages/shared/kbn-esql-ast/src/antlr/esql_lexer.g4"

# Copy the file
cp "$source_file" "$destination_file"
Expand All @@ -26,7 +26,7 @@ synchronize_lexer_grammar () {
synchronize_parser_grammar () {
license_header="$1"
source_file="$PARENT_DIR/elasticsearch/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4"
destination_file="./packages/kbn-esql-ast/src/antlr/esql_parser.g4"
destination_file="./src/platform/packages/shared/kbn-esql-ast/src/antlr/esql_parser.g4"

# Copy the file
cp "$source_file" "$destination_file"
Expand Down Expand Up @@ -104,7 +104,7 @@ main () {
.buildkite/scripts/bootstrap.sh

# Build ANTLR stuff
cd ./packages/kbn-esql-ast/src
cd ./src/platform/packages/shared/kbn-esql-ast/src
yarn build:antlr4:esql

# Make a commit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ echo "--- Exploratory View plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

node plugins/observability_solution/exploratory_view/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node solutions/observability/plugins/exploratory_view/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
34 changes: 34 additions & 0 deletions .buildkite/scripts/steps/functional/scout_ui_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

set -euo pipefail

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

export JOB=kibana-scout-ui-tests

TEST_CONFIG="x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts"
KIBANA_DIR="$KIBANA_BUILD_LOCATION"

declare -A TESTS=(
["Stateful"]="--stateful"
["Serverless Elasticsearch"]="--serverless=es"
["Serverless Observability"]="--serverless=oblt"
["Serverless Security"]="--serverless=security"
)

ORDER=("Stateful" "Serverless Elasticsearch" "Serverless Observability" "Serverless Security")

EXIT_CODE=0

for TEST_NAME in "${ORDER[@]}"; do
RUN_MODE="${TESTS[$TEST_NAME]}"
echo "--- $TEST_NAME: 'discover_enhanced' plugin UI Tests"
if ! node scripts/scout run-tests "$RUN_MODE" --config "$TEST_CONFIG" --kibana-install-dir "$KIBANA_DIR"; then
echo "$TEST_NAME: failed"
EXIT_CODE=1
else
echo "$TEST_NAME: passed"
fi
done

exit $EXIT_CODE
Loading

0 comments on commit 9b9c4ac

Please sign in to comment.