Skip to content

Commit 0243ee2

Browse files
authored
Merge branch 'main' into unskip-edr-workflows-flaky-tests
2 parents f997506 + fd4dade commit 0243ee2

1,788 files changed

Lines changed: 39655 additions & 10911 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.

.buildkite/ftr_platform_stateful_configs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ disabled:
5858

5959
# Gen AI suites, running with their own pipeline
6060
- x-pack/platform/test/functional_gen_ai/inference/config.ts
61+
- x-pack/platform/test/functional_gen_ai/inference/generate_artifacts.config.ts
6162
- x-pack/platform/test/agent_builder/smoke_tests/config.stateful.ts
6263

6364
defaultQueue: 'n2-4-spot'

.buildkite/pipeline-resource-definitions/kibana-esql-docs-sync.yml renamed to .buildkite/pipeline-resource-definitions/kibana-gen-ai-product-docs.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
21
apiVersion: backstage.io/v1alpha1
32
kind: Resource
43
metadata:
5-
name: bk-kibana-esql-docs-sync
6-
description: Loads ES|QL documentation and opens a PR with updates
4+
name: bk-kibana-gen-ai-product-docs
5+
description: Runs the GenAI product docs pipeline twice a month
76
links:
8-
- url: 'https://buildkite.com/elastic/kibana-esql-docs-sync'
7+
- url: 'https://buildkite.com/elastic/kibana-gen-ai-product-docs'
98
title: Pipeline link
109
spec:
1110
type: buildkite-pipeline
@@ -15,26 +14,28 @@ spec:
1514
apiVersion: buildkite.elastic.dev/v1
1615
kind: Pipeline
1716
metadata:
18-
name: kibana / ES|QL docs sync
19-
description: Loads ES|QL documentation and opens a PR with updates
17+
name: kibana / gen-ai-product-docs
18+
description: Runs the GenAI product docs pipeline twice a month
2019
spec:
2120
env:
2221
SLACK_NOTIFICATIONS_CHANNEL: '#appex-ai-infra-alerts'
2322
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
24-
allow_rebuilds: false
23+
allow_rebuilds: true
2524
branch_configuration: main
25+
cancel_intermediate_builds: true
2626
default_branch: main
2727
repository: elastic/kibana
28-
pipeline_file: .buildkite/pipelines/esql_docs_sync.yml
28+
pipeline_file: .buildkite/pipelines/gen_ai_product_docs.yml
2929
provider_settings:
3030
build_branches: false
3131
build_pull_requests: false
3232
publish_commit_status: false
3333
trigger_mode: none
34-
build_tags: false
3534
prefix_pull_request_fork_branch_names: false
36-
skip_pull_request_builds_for_existing_commits: true
35+
skip_pull_request_builds_for_existing_commits: false
3736
teams:
37+
everyone:
38+
access_level: BUILD_AND_READ
3839
appex-ai-infra:
3940
access_level: MANAGE_BUILD_AND_READ
4041
kibana-operations:
@@ -43,12 +44,10 @@ spec:
4344
access_level: MANAGE_BUILD_AND_READ
4445
kibana-tech-leads:
4546
access_level: MANAGE_BUILD_AND_READ
46-
everyone:
47-
access_level: BUILD_AND_READ
4847
schedules:
49-
Weekly build:
50-
cronline: 0 0 * * 1 America/New_York
51-
message: Weekly build
48+
Twice-monthly build:
49+
cronline: 0 0 1,15 * * America/New_York
50+
message: Twice-monthly GenAI product docs build
5251
branch: main
5352
tags:
5453
- kibana

.buildkite/pipeline-resource-definitions/locations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ spec:
2727
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-forward-testing-9-dot-2.yml
2828
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml
2929
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml
30-
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-esql-docs-sync.yml
3130
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-esql-grammar-sync.yml
3231
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml
3332
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-flaky.yml
3433
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-fleet-packages-daily.yml
3534
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-gen-ai-daily.yml
35+
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-gen-ai-product-docs.yml
3636
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-migration-staging.yml
3737
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-node-glibc-217.yml
3838
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-node-pointer-compression.yml

.buildkite/pipelines/esql_docs_sync.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
env:
2+
FTR_GEN_AI: '1'
3+
FTR_EIS_CCM: '1'
4+
STACK_DOCS_VERSION: 'latest'
5+
steps:
6+
- label: '👨‍🔧 Pre-Build'
7+
command: .buildkite/scripts/lifecycle/pre_build.sh
8+
agents:
9+
image: family/kibana-ubuntu-2404
10+
imageProject: elastic-images-prod
11+
provider: gcp
12+
machineType: n2-standard-2
13+
14+
- wait
15+
16+
- label: '🧑‍🏭 Build Kibana Distribution'
17+
command: .buildkite/scripts/steps/build_kibana.sh
18+
agents:
19+
image: family/kibana-ubuntu-2404
20+
imageProject: elastic-images-prod
21+
provider: gcp
22+
machineType: n2-standard-8
23+
key: build
24+
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
25+
26+
- wait
27+
28+
- label: AppEx AI-Infra Inference APIs FTR tests
29+
key: ai-infra-gen-ai-inference-api
30+
command: bash .buildkite/scripts/steps/gen_ai/run_ai_infra_inference_api_ftr.sh
31+
env:
32+
FTR_CONFIG: 'x-pack/platform/test/functional_gen_ai/inference/generate_artifacts.config.ts'
33+
FTR_CONFIG_GROUP_KEY: 'ftr-ai-infra-gen-ai-inference-api'
34+
FTR_GEN_AI: '1'
35+
FTR_EIS_CCM: '1'
36+
timeout_in_minutes: 180
37+
parallelism: 1
38+
agents:
39+
image: family/kibana-ubuntu-2404
40+
imageProject: elastic-images-prod
41+
provider: gcp
42+
machineType: n2-standard-4
43+
preemptible: true
44+
retry:
45+
automatic:
46+
- exit_status: '-1'
47+
limit: 1
48+
- exit_status: '*'
49+
limit: 1

.buildkite/scripts/common/activate_service_account.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ if [[ -z "$EMAIL" ]]; then
8181
"ci-typescript-archives")
8282
EMAIL="kibana-ci-access-ts-archives@$GCLOUD_EMAIL_POSTFIX"
8383
;;
84+
"kibana-ai-assistant-kb-artifacts-dev" | "kibana-ai-assistant-kb-artifacts")
85+
EMAIL="kibana-ci-access-ai-buckets@$GCLOUD_EMAIL_POSTFIX"
86+
;;
8487
"kibana-ci-access-chromium-blds")
8588
EMAIL="kibana-ci-access-chromium-blds@$GCLOUD_EMAIL_POSTFIX"
8689
;;

.buildkite/scripts/steps/esql_docs_sync.sh

Lines changed: 0 additions & 145 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
report_main_step () {
5+
echo "--- $1"
6+
}
7+
8+
main () {
9+
report_main_step "Bootstrap Kibana"
10+
11+
12+
report_main_step "Loading ES|QL documentation"
13+
14+
15+
docs_dir="x-pack/platform/plugins/shared/inference"
16+
set +e
17+
git diff --exit-code --quiet "$docs_dir"
18+
diff_exit_code=$?
19+
if [ $diff_exit_code -gt 1 ]; then
20+
echo "ERROR: git diff failed (exit code $diff_exit_code) for '$docs_dir'" >&2
21+
exit $diff_exit_code
22+
fi
23+
24+
untracked_files=$(git ls-files --others --exclude-standard -- "$docs_dir")
25+
ls_files_exit_code=$?
26+
if [ $ls_files_exit_code -ne 0 ]; then
27+
echo "ERROR: git ls-files failed (exit code $ls_files_exit_code) for '$docs_dir'" >&2
28+
exit $ls_files_exit_code
29+
fi
30+
31+
if [ $diff_exit_code -eq 0 ] && [ -z "$untracked_files" ]; then
32+
echo "No differences found. Our work is done here."
33+
exit 0
34+
fi
35+
set -e
36+
37+
report_main_step "Differences found. Checking for an existing pull request."
38+
39+
KIBANA_MACHINE_USERNAME="kibanamachine"
40+
git config --global user.name "$KIBANA_MACHINE_USERNAME"
41+
git config --global user.email '42973632+kibanamachine@users.noreply.github.com'
42+
43+
PR_TITLE='[ES|QL] Update documentation'
44+
PR_BODY='This PR updates the ES|QL documentation files generated from the built-docs repository.'
45+
46+
pr_search_result=$(gh pr list --search "$PR_TITLE" --state open --author "$KIBANA_MACHINE_USERNAME" --limit 1 --json title -q ".[].title")
47+
48+
if [ "$pr_search_result" == "$PR_TITLE" ]; then
49+
echo "PR already exists. Exiting."
50+
exit
51+
fi
52+
53+
echo "No existing PR found. Proceeding."
54+
55+
BRANCH_NAME="esql_docs_sync_$(date +%s)"
56+
57+
git checkout -b "$BRANCH_NAME"
58+
59+
git add "$docs_dir"
60+
git commit -m "Update ES|QL documentation" --no-verify
61+
62+
report_main_step "Changes committed. Creating pull request."
63+
64+
git push origin "$BRANCH_NAME"
65+
66+
gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base main --head "${BRANCH_NAME}" --label 'release_note:skip' --label 'Team:AI Infra'
67+
}
68+
69+
main

0 commit comments

Comments
 (0)