Skip to content

Commit 646a7a3

Browse files
authored
Merge branch 'main' into remove-z-index-override
2 parents 15b4a04 + ced1798 commit 646a7a3

1,814 files changed

Lines changed: 39847 additions & 13657 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/pipeline-utils/scout/pick_scout_test_group_run_order.ts

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,22 @@
88
*/
99

1010
import Fs from 'fs';
11+
import { expandAgentQueue } from '../agent_images';
1112
import { BuildkiteClient, type BuildkiteStep } from '../buildkite';
1213
import { collectEnvFromLabels } from '../pr_labels';
13-
import { expandAgentQueue } from '../agent_images';
1414
import { getRequiredEnv } from '#pipeline-utils';
1515

16-
interface ScoutTestDiscoveryConfig {
16+
export interface ModuleDiscoveryInfo {
17+
name: string;
1718
group: string;
18-
path: string;
19-
usesParallelWorkers: boolean;
20-
configs: string[];
2119
type: 'plugin' | 'package';
20+
configs: {
21+
path: string;
22+
hasTests: boolean;
23+
tags: string[];
24+
serverRunFlags: string[];
25+
usesParallelWorkers: boolean;
26+
}[];
2227
}
2328

2429
// Collect environment variables to pass through to test execution steps
@@ -35,23 +40,26 @@ export async function pickScoutTestGroupRunOrder(scoutConfigsPath: string) {
3540
throw new Error(`Scout configs file not found at ${scoutConfigsPath}`);
3641
}
3742

38-
const rawScoutConfigs = JSON.parse(Fs.readFileSync(scoutConfigsPath, 'utf-8')) as Record<
39-
string,
40-
ScoutTestDiscoveryConfig
41-
>;
42-
const pluginsOrPackagesWithScoutTests: string[] = Object.keys(rawScoutConfigs);
43+
const modulesWithTests = JSON.parse(
44+
Fs.readFileSync(scoutConfigsPath, 'utf-8')
45+
) as ModuleDiscoveryInfo[];
4346

44-
if (pluginsOrPackagesWithScoutTests.length === 0) {
47+
if (modulesWithTests.length === 0) {
4548
// no scout configs found, nothing to need to upload steps
4649
return;
4750
}
4851

49-
const scoutCiRunGroups = pluginsOrPackagesWithScoutTests.map((name) => ({
50-
label: `Scout: [ ${rawScoutConfigs[name].group} / ${name} ] ${rawScoutConfigs[name].type}`,
51-
key: name,
52-
agents: expandAgentQueue(rawScoutConfigs[name].usesParallelWorkers ? 'n2-8-spot' : 'n2-4-spot'),
53-
group: rawScoutConfigs[name].group,
54-
}));
52+
const scoutCiRunGroups = modulesWithTests.map((module) => {
53+
// Check if any config in this module uses parallel workers
54+
const usesParallelWorkers = module.configs.some((config) => config.usesParallelWorkers);
55+
56+
return {
57+
label: `Scout: [ ${module.group} / ${module.name} ] ${module.type}`,
58+
key: module.name,
59+
agents: expandAgentQueue(usesParallelWorkers ? 'n2-8-spot' : 'n2-4-spot'),
60+
group: module.group,
61+
};
62+
});
5563

5664
// upload the step definitions to Buildkite
5765
bk.uploadSteps(

.buildkite/scripts/steps/test/scout_configs.sh

Lines changed: 61 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,42 +48,40 @@ if [[ -z "$configs" && "${BUILDKITE_RETRY_COUNT:-0}" == "1" ]]; then
4848
fi
4949
fi
5050

51-
if [ -z "$configs" ] && [ "$SCOUT_CONFIG_GROUP_KEY" != "" ]; then
51+
52+
module_data=""
53+
# Download module_data if SCOUT_CONFIG_GROUP_KEY is set (needed for serverRunFlags)
54+
# This is required even when retrying, as we need module_data to get serverRunFlags for each config
55+
if [ "$SCOUT_CONFIG_GROUP_KEY" != "" ]; then
5256
echo "--- Downloading Scout Test Configuration"
5357
download_artifact scout_playwright_configs.json .
54-
configs=$(jq -r '.[env.SCOUT_CONFIG_GROUP_KEY].configs[]' scout_playwright_configs.json)
58+
59+
# Extract module and its configs
60+
module_data=$(jq -c ".[] | select(.name == env.SCOUT_CONFIG_GROUP_KEY)" scout_playwright_configs.json)
61+
62+
if [[ -z "$module_data" ]]; then
63+
echo "Module '${SCOUT_CONFIG_GROUP_KEY}' not found in scout_playwright_configs.json"
64+
exit 1
65+
fi
66+
67+
# Extract config paths only if configs is not already set (e.g., from retry logic)
68+
if [ -z "$configs" ]; then
69+
# Extract config paths: process configs with their serverRunFlags directly
70+
configs=$(echo "$module_data" | jq -r '.configs[].path')
71+
fi
5572
fi
5673

5774
if [ -z "$configs" ]; then
5875
echo "Unable to determine configs to run"
5976
exit 1
6077
fi
6178

62-
# Define run modes based on group
63-
declare -A RUN_MODES
64-
RUN_MODES["platform"]="--stateful --serverless=es --serverless=oblt --serverless=security"
65-
RUN_MODES["observability"]="--stateful --serverless=oblt --serverless=oblt-logs-essentials"
66-
RUN_MODES["search"]="--stateful --serverless=es"
67-
RUN_MODES["security"]="--stateful --serverless=security --serverless=security-essentials --serverless=security-ease"
68-
69-
# Define serverless-only run modes based on group
70-
declare -A RUN_MODES_SERVERLESS_ONLY
71-
RUN_MODES_SERVERLESS_ONLY["platform"]="--serverless=es --serverless=oblt --serverless=security"
72-
RUN_MODES_SERVERLESS_ONLY["observability"]="--serverless=oblt --serverless=oblt-logs-essentials"
73-
RUN_MODES_SERVERLESS_ONLY["search"]="--serverless=es"
74-
RUN_MODES_SERVERLESS_ONLY["security"]="--serverless=security --serverless=security-essentials --serverless=security-ease"
75-
76-
# Determine valid run modes for the group
77-
if [[ -n "${SERVERLESS_TESTS_ONLY:-}" ]]; then
78-
echo "--- Using serverless-only test modes (SERVERLESS_TESTS_ONLY is set)"
79-
RUN_MODE_LIST=${RUN_MODES_SERVERLESS_ONLY[$group]}
80-
else
81-
RUN_MODE_LIST=${RUN_MODES[$group]}
82-
fi
83-
84-
if [[ -z "$RUN_MODE_LIST" ]]; then
85-
echo "Unknown group: $group"
86-
exit 1
79+
# If we have module_data, we can process configs with their serverRunFlags directly
80+
# Otherwise, we need to handle the case where SCOUT_CONFIG is set directly
81+
if [[ -z "${module_data:-}" && -n "$SCOUT_CONFIG" ]]; then
82+
echo "⚠️ Warning: SCOUT_CONFIG is set but module_data is not available. Server run flags cannot be determined from tags."
83+
echo " As a result, tests may not run in the expected modes or with the correct configuration, which could lead to unexpected failures or incomplete test coverage."
84+
echo " Execution will proceed, but it is strongly recommended to use SCOUT_CONFIG_GROUP_KEY instead to ensure serverRunFlags are set from the JSON file."
8785
fi
8886

8987
results=()
@@ -137,8 +135,42 @@ while read -r config_path; do
137135
continue
138136
fi
139137

138+
# Get server run flags for this config from the module data
139+
if [[ -z "${module_data:-}" ]]; then
140+
echo "⚠️ Warning: No module_data available for config: $config_path"
141+
echo " Skipping config (serverRunFlags cannot be determined)"
142+
continue
143+
fi
144+
145+
# Extract serverRunFlags array for this config
146+
config_run_modes=$(echo "$module_data" | jq -r ".configs[] | select(.path == \"$config_path\") | .serverRunFlags[]?")
147+
148+
if [[ -z "$config_run_modes" ]]; then
149+
echo "⚠️ No serverRunFlags found for config: $config_path"
150+
continue
151+
fi
152+
153+
# If SERVERLESS_TESTS_ONLY is set, filter out --stateful and keep only serverless modes
154+
if [[ -n "${SERVERLESS_TESTS_ONLY:-}" ]]; then
155+
echo "--- Using serverless-only test modes (SERVERLESS_TESTS_ONLY is set)"
156+
# Filter out --stateful and keep only serverless modes
157+
config_run_modes=$(echo "$config_run_modes" | grep -E "^--serverless=" || true)
158+
fi
159+
160+
if [[ -z "$config_run_modes" ]]; then
161+
echo "⚠️ No run modes available for config: $config_path (after SERVERLESS_TESTS_ONLY filtering)"
162+
continue
163+
fi
164+
165+
echo "--- Config: $config_path"
166+
echo " Tags: $(echo "$module_data" | jq -r ".configs[] | select(.path == \"$config_path\") | .tags | join(\", \")")"
167+
echo " Modes: $(echo "$config_run_modes" | tr '\n' ' ')"
168+
140169
# Run config for each mode
141-
for mode in $RUN_MODE_LIST; do
170+
while read -r mode; do
171+
if [[ -z "$mode" ]]; then
172+
continue
173+
fi
142174
# If we're retrying specific failed pairs, check if this config+mode pair should be retried
143175
if [[ -n "$RETRY_FAILED_PAIRS" ]]; then
144176
config_mode_pair="$config_path ($mode)"
@@ -194,7 +226,7 @@ while read -r config_path; do
194226
buildkite-agent meta-data set "$CONFIG_MODE_EXECUTION_KEY" "true"
195227
results+=("$config_path ($mode) ✅ (${duration})")
196228
fi
197-
done
229+
done <<< "$config_run_modes"
198230
done <<< "$configs"
199231

200232
echo "--- Scout Test Run Complete: Summary"

.buildkite/scripts/steps/test/scout_test_run_builder.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ source .buildkite/scripts/steps/functional/common.sh
77
echo '--- Verify Playwright CLI is functional'
88
node scripts/scout run-playwright-test-check
99

10+
echo '--- Update Scout Test Config Manifests'
11+
node scripts/scout.js update-test-config-manifests
12+
1013
echo '--- Discover Playwright Configs and upload to Buildkite artifacts'
1114
node scripts/scout discover-playwright-configs --save
1215
cp .scout/test_configs/scout_playwright_configs.json scout_playwright_configs.json

.eslintrc.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,30 +1957,6 @@ module.exports = {
19571957
'@kbn/telemetry/event_generating_elements_should_be_instrumented': 'warn',
19581958
},
19591959
},
1960-
/**
1961-
* Allows snake_case variables in the server, because that's how we return API properties
1962-
*/
1963-
{
1964-
files: ['x-pack/solutions/search/plugins/enterprise_search/server/**/*.{ts,tsx}'],
1965-
rules: {
1966-
'@typescript-eslint/naming-convention': [
1967-
'error',
1968-
{
1969-
selector: 'variable',
1970-
modifiers: ['destructured'],
1971-
format: null,
1972-
leadingUnderscore: 'allow',
1973-
trailingUnderscore: 'allow',
1974-
},
1975-
{
1976-
selector: 'variable',
1977-
format: ['camelCase', 'UPPER_CASE'],
1978-
leadingUnderscore: 'allow',
1979-
trailingUnderscore: 'allow',
1980-
},
1981-
],
1982-
},
1983-
},
19841960
{
19851961
// Source files only - allow `any` in test/mock files
19861962
files: ['x-pack/solutions/search/plugins/enterprise_search/**/*.{ts,tsx}'],

.github/CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ x-pack/platform/packages/shared/kbn-elastic-assistant @elastic/security-generati
943943
x-pack/platform/packages/shared/kbn-elastic-assistant-common @elastic/security-generative-ai
944944
x-pack/platform/packages/shared/kbn-elastic-assistant-shared-state @elastic/security-generative-ai
945945
x-pack/platform/packages/shared/kbn-entities-schema @elastic/obs-entities
946+
x-pack/platform/packages/shared/kbn-es-snapshot-loader @elastic/obs-ai-team
946947
x-pack/platform/packages/shared/kbn-evals @elastic/appex-ai-infra
947948
x-pack/platform/packages/shared/kbn-evals-suite-streams @elastic/obs-onboarding-team @elastic/obs-sig-events-team
948949
x-pack/platform/packages/shared/kbn-event-stacktrace @elastic/obs-presentation-team @elastic/obs-exploration-team
@@ -1513,7 +1514,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions
15131514
/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts @elastic/obs-ai-team
15141515
/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts @elastic/obs-ai-team
15151516

1516-
# Observability Agent
1517+
# Observability Agent Builder
15171518
/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.ai_agent.index.ts @elastic/obs-ai-team
15181519
/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.ai_agent.stateful.config.ts @elastic/obs-ai-team
15191520
/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.ai_agent.index.ts @elastic/obs-ai-team
@@ -2313,6 +2314,7 @@ src/platform/packages/shared/kbn-connector-specs/src/all_specs.ts
23132314
src/platform/packages/shared/kbn-connector-specs/src/connector_icons_map.ts
23142315
src/platform/packages/shared/kbn-connector-specs/src/specs/abuseipdb/** @elastic/workflows-eng
23152316
src/platform/packages/shared/kbn-connector-specs/src/specs/alienvault_otx/** @elastic/workflows-eng
2317+
src/platform/packages/shared/kbn-connector-specs/src/specs/brave_search/** @elastic/workchat-eng
23162318
src/platform/packages/shared/kbn-connector-specs/src/specs/greynoise/** @elastic/workflows-eng
23172319
src/platform/packages/shared/kbn-connector-specs/src/specs/notion/** @elastic/workchat-eng
23182320
src/platform/packages/shared/kbn-connector-specs/src/specs/shodan/** @elastic/workflows-eng
@@ -2639,6 +2641,7 @@ x-pack/solutions/security/test/serverless/functional/configs/config.context_awar
26392641
/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts @elastic/security-threat-hunting-investigations
26402642
/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_kpis @elastic/security-threat-hunting-investigations
26412643
/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_table @elastic/security-threat-hunting-investigations
2644+
/x-pack/solutions/security/plugins/security_solution/public/detections/components/attacks @elastic/security-threat-hunting-investigations
26422645
/x-pack/solutions/security/plugins/security_solution/public/detections/components/callouts @elastic/security-threat-hunting-investigations
26432646
/x-pack/solutions/security/plugins/security_solution/public/detections/components/rules @elastic/security-threat-hunting-investigations
26442647
/x-pack/solutions/security/plugins/security_solution/public/detections/components/user_info @elastic/security-threat-hunting-investigations

api_docs/actions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
88
title: "actions"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the actions plugin
11-
date: 2025-12-15
11+
date: 2025-12-16
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
1313
---
1414
import actionsObj from './actions.devdocs.json';

api_docs/advanced_settings.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
88
title: "advancedSettings"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the advancedSettings plugin
11-
date: 2025-12-15
11+
date: 2025-12-16
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
1313
---
1414
import advancedSettingsObj from './advanced_settings.devdocs.json';

api_docs/agent_builder_platform.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/agentBuilderPlatform
88
title: "agentBuilderPlatform"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the agentBuilderPlatform plugin
11-
date: 2025-12-15
11+
date: 2025-12-16
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'agentBuilderPlatform']
1313
---
1414
import agentBuilderPlatformObj from './agent_builder_platform.devdocs.json';

api_docs/ai_assistant_management_selection.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection
88
title: "aiAssistantManagementSelection"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the aiAssistantManagementSelection plugin
11-
date: 2025-12-15
11+
date: 2025-12-16
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection']
1313
---
1414
import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json';

api_docs/aiops.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
88
title: "aiops"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the aiops plugin
11-
date: 2025-12-15
11+
date: 2025-12-16
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
1313
---
1414
import aiopsObj from './aiops.devdocs.json';

0 commit comments

Comments
 (0)