Skip to content

Commit 22c4c63

Browse files
Merge branch 'main' into add-evals-kafka-scenarios-554
2 parents 4a28ebb + 29248a0 commit 22c4c63

2,218 files changed

Lines changed: 69555 additions & 13761 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/improve-oas/SKILL.md

Lines changed: 319 additions & 0 deletions
Large diffs are not rendered by default.

.buildkite/ftr_security_serverless_configs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ enabled:
165165
- x-pack/solutions/security/test/security_solution_endpoint/configs/serverless.endpoint.config.ts
166166
- x-pack/solutions/security/test/security_solution_endpoint/configs/serverless.integrations.config.ts
167167
- x-pack/solutions/security/test/security_solution_api_integration/test_suites/ai4dsoc/cases/search_ai_lake_tier/configs/serverless.config.ts
168+
- x-pack/solutions/security/test/security_solution_api_integration/test_suites/ai4dsoc/ease_rules/search_ai_lake_tier/configs/serverless.config.ts
168169
- x-pack/solutions/security/test/security_solution_api_integration/test_suites/ai4dsoc/nlp_cleanup_task/search_ai_lake_tier/configs/serverless.config.ts
169170
# serverless config files that run deployment-agnostic tests
170171
- x-pack/platform/test/spaces_api_integration/deployment_agnostic/security_and_spaces/serverless.config.ts

.buildkite/pipeline-utils/agent_images.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ function getAgentImageConfig({ returnYaml = false } = {}): string | BuildkiteAge
8282

8383
const expandAgentQueue = (queueName: string = 'n2-4-spot', diskSizeGb?: number) => {
8484
const [kind, cores, addition] = queueName.split('-');
85-
const zonesToUse = 'southamerica-east1-c,asia-south2-a,us-central1-f';
85+
const zonesToUse =
86+
'asia-south2-a,asia-south2-b,asia-south2-c,northamerica-northeast2-a,northamerica-northeast2-b,northamerica-northeast2-c,southamerica-east1-a,southamerica-east1-b,southamerica-east1-c';
8687
const additionalProps =
8788
{
88-
spot: { preemptible: true, zones: zonesToUse },
89+
spot: { preemptible: true, spotZones: zonesToUse },
8990
virt: { enableNestedVirtualization: true, spotZones: zonesToUse },
9091
}[addition] || {};
9192

.buildkite/pipeline-utils/pr_labels.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ export const LABEL_MAPPING: Record<string, Record<string, string>> = {
4747
[FIPS_GH_LABELS[FIPS_VERSION.THREE]]: {
4848
TEST_ENABLE_FIPS_VERSION: FIPS_VERSION.THREE,
4949
},
50+
// [rspack-transition] Remove this mapping when the legacy optimizer is removed.
51+
'ci:build-with-rspack-optimizer': {
52+
KBN_USE_RSPACK: 'true',
53+
},
5054
};
5155

5256
/**

.buildkite/pipelines/pull_request/base.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,26 @@ steps:
77
zones: us-central1-a,us-central1-b,us-central1-c
88
diskSizeGb: 200
99
key: build
10-
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
10+
# [rspack-transition] Original condition (restore when legacy optimizer is removed):
11+
# if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
12+
timeout_in_minutes: 60
13+
retry:
14+
automatic:
15+
- exit_status: '-1'
16+
limit: 3
17+
18+
# [rspack-transition] Verify the Rspack optimizer can build all bundles
19+
# successfully. Skipped when ci:build-with-rspack-optimizer is set because
20+
# the main Build Kibana Distribution step already uses Rspack.
21+
- command: .buildkite/scripts/steps/verify_rspack_build.sh
22+
label: 'Verify Rspack Optimizer Build'
23+
if: "build.env('GITHUB_PR_LABELS') !~ /ci:build-with-rspack-optimizer/"
24+
agents:
25+
machineType: n2d-standard-8
26+
preemptible: true
27+
spotZones: us-central1-b,us-central1-c,us-central1-f
28+
diskSizeGb: 200
29+
key: verify_rspack_build
1130
timeout_in_minutes: 60
1231
plugins:
1332
- custom-checkout#v1.8.0:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- command: .buildkite/scripts/steps/page_load_bench.sh
3+
label: 'Page Load Bench'
4+
key: page_load_bench
5+
agents:
6+
machineType: c4d-standard-16
7+
diskType: hyperdisk-balanced
8+
zones: us-central1-c,us-central1-a
9+
diskSizeGb: 200
10+
timeout_in_minutes: 120
11+
soft_fail: true

.buildkite/scripts/download_build_artifacts.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ if [[ "${KIBANA_BUILD_ID:-}" != "false" ]]; then
1010

1111
cd "$WORKSPACE"
1212

13-
download_artifact kibana-default.tar.zst . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
13+
# [rspack-transition] The build step records which build ID to use.
14+
# Falls back to KIBANA_BUILD_ID or BUILDKITE_BUILD_ID for non-PR pipelines.
15+
EFFECTIVE_BUILD_ID=$(buildkite-agent meta-data get "kibana-effective-build-id" 2>/dev/null || echo "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}")
16+
17+
download_artifact kibana-default.tar.zst . --build "$EFFECTIVE_BUILD_ID"
1418

1519
mkdir -p "$KIBANA_BUILD_LOCATION"
1620
tar -xf kibana-default.tar.zst -I zstd -C "$KIBANA_BUILD_LOCATION" --strip=1

.buildkite/scripts/pipelines/pull_request/pipeline.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new R
7171

7272
// Register steps from base.yml that should still be canceled on gate failure.
7373
// base.yml itself is not loaded with cancelOnGateFailure because it contains the gate steps.
74-
registerCancelKeys(['pick_test_group_run_order', 'build_scout_tests', 'build_api_docs']);
74+
registerCancelKeys([
75+
'pick_test_group_run_order',
76+
'build_scout_tests',
77+
'build_api_docs',
78+
'verify_rspack_build',
79+
]);
7580

7681
if (prHasFIPSLabel()) {
7782
pipeline.push(getPipeline('.buildkite/pipelines/fips/verify_fips_enabled.yml', cancelable));
@@ -674,6 +679,12 @@ const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new R
674679
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/ftr_bench.yml', cancelable));
675680
}
676681

682+
if (GITHUB_PR_LABELS.includes('ci:bench-page-load')) {
683+
pipeline.push(
684+
getPipeline('.buildkite/pipelines/pull_request/page_load_bench.yml', cancelable)
685+
);
686+
}
687+
677688
// post_build is not cancelable — cleanup/reporting should always run
678689
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));
679690

.buildkite/scripts/post_build_kibana.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,14 @@ cd "$KIBANA_DIR/target"
2424
cp "kibana-$version-SNAPSHOT-linux-x86_64.tar.zst" kibana-default.tar.zst
2525
buildkite-agent artifact upload "./*.tar.zst;./*.tar.gz;./*.zip;./*.deb;./*.rpm"
2626
cd -
27+
28+
# [rspack-transition] Upload build type marker for cache validation.
29+
# Delete this block when the legacy optimizer is removed.
30+
if [[ "${KBN_USE_RSPACK:-}" == "true" ]]; then
31+
echo "rspack" > "$KIBANA_DIR/target/kibana-build-type.txt"
32+
else
33+
echo "legacy" > "$KIBANA_DIR/target/kibana-build-type.txt"
34+
fi
35+
cd "$KIBANA_DIR/target"
36+
buildkite-agent artifact upload "kibana-build-type.txt"
37+
cd -

.buildkite/scripts/steps/build_kibana.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,39 @@ set -euo pipefail
66
# node scripts/build rebuilds them in production mode with --dist
77
export KBN_BOOTSTRAP_NO_PREBUILT=true
88

9+
source .buildkite/scripts/common/util.sh
10+
11+
EXPECTS_RSPACK=false
12+
is_pr_with_label "ci:build-with-rspack-optimizer" && EXPECTS_RSPACK=true
13+
14+
# [rspack-transition] Validate cached build type before reusing.
15+
# When the legacy optimizer is removed, delete this block and restore the
16+
# if: condition in base.yml to skip the build step entirely when a cache hit exists.
17+
if [[ "${KIBANA_BUILD_ID:-}" && "$KIBANA_BUILD_ID" != "$BUILDKITE_BUILD_ID" ]]; then
18+
CACHED_TYPE="legacy"
19+
if download_artifact "kibana-build-type.txt" . --build "$KIBANA_BUILD_ID" 2>/dev/null; then
20+
CACHED_TYPE=$(cat kibana-build-type.txt)
21+
fi
22+
23+
EXPECTED_TYPE="legacy"
24+
[[ "$EXPECTS_RSPACK" == "true" ]] && EXPECTED_TYPE="rspack"
25+
26+
if [[ "$CACHED_TYPE" == "$EXPECTED_TYPE" ]]; then
27+
echo "--- Reusing cached $CACHED_TYPE build from $KIBANA_BUILD_ID"
28+
buildkite-agent meta-data set "kibana-effective-build-id" "$KIBANA_BUILD_ID"
29+
exit 0
30+
fi
31+
32+
echo "--- Cached build type ($CACHED_TYPE) doesn't match expected ($EXPECTED_TYPE). Building fresh."
33+
fi
34+
935
.buildkite/scripts/bootstrap.sh
36+
37+
# [rspack-transition] Export KBN_USE_RSPACK for the build process
38+
is_pr_with_label "ci:build-with-rspack-optimizer" && export KBN_USE_RSPACK=true
39+
1040
.buildkite/scripts/build_kibana.sh
1141
.buildkite/scripts/post_build_kibana.sh
42+
43+
# Record this build as the effective build for downstream steps
44+
buildkite-agent meta-data set "kibana-effective-build-id" "$BUILDKITE_BUILD_ID"

0 commit comments

Comments
 (0)