Skip to content

Commit d561297

Browse files
authored
Merge branch '9.0' into fix/incorrect-paging-display
2 parents 8dbf5ed + 9640d8d commit d561297

331 files changed

Lines changed: 5003 additions & 41430 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/ci-stats/pick_test_group_run_order.ts

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,15 @@ export async function pickTestGroupRunOrder() {
562562
);
563563
}
564564

565+
// copied from src/platform/packages/shared/kbn-scout/src/config/discovery/search_configs.ts
566+
interface ScoutTestDiscoveryConfig {
567+
group: string;
568+
path: string;
569+
usesParallelWorkers: boolean;
570+
configs: string[];
571+
type: 'plugin' | 'package';
572+
}
573+
565574
export async function pickScoutTestGroupRunOrder(scoutConfigsPath: string) {
566575
const bk = new BuildkiteClient();
567576
const envFromlabels: Record<string, string> = collectEnvFromLabels();
@@ -570,19 +579,22 @@ export async function pickScoutTestGroupRunOrder(scoutConfigsPath: string) {
570579
throw new Error(`Scout configs file not found at ${scoutConfigsPath}`);
571580
}
572581

573-
const rawScoutConfigs = JSON.parse(Fs.readFileSync(scoutConfigsPath, 'utf-8'));
574-
const pluginsWithScoutConfigs: string[] = Object.keys(rawScoutConfigs);
582+
const rawScoutConfigs = JSON.parse(Fs.readFileSync(scoutConfigsPath, 'utf-8')) as Record<
583+
string,
584+
ScoutTestDiscoveryConfig
585+
>;
586+
const pluginsOrPackagesWithScoutTests: string[] = Object.keys(rawScoutConfigs);
575587

576-
if (pluginsWithScoutConfigs.length === 0) {
588+
if (pluginsOrPackagesWithScoutTests.length === 0) {
577589
// no scout configs found, nothing to need to upload steps
578590
return;
579591
}
580592

581-
const scoutGroups = pluginsWithScoutConfigs.map((plugin) => ({
582-
title: plugin,
583-
key: plugin,
584-
usesParallelWorkers: rawScoutConfigs[plugin].usesParallelWorkers,
585-
group: rawScoutConfigs[plugin].group,
593+
const scoutCiRunGroups = pluginsOrPackagesWithScoutTests.map((name) => ({
594+
label: `Scout: [ ${rawScoutConfigs[name].group} / ${name} ] ${rawScoutConfigs[name].type}`,
595+
key: name,
596+
agents: expandAgentQueue(rawScoutConfigs[name].usesParallelWorkers ? 'n2-8-spot' : 'n2-4-spot'),
597+
group: rawScoutConfigs[name].group,
586598
}));
587599

588600
// upload the step definitions to Buildkite
@@ -591,13 +603,13 @@ export async function pickScoutTestGroupRunOrder(scoutConfigsPath: string) {
591603
{
592604
group: 'Scout Configs',
593605
key: 'scout-configs',
594-
depends_on: ['build'],
595-
steps: scoutGroups.map(
596-
({ title, key, group, usesParallelWorkers }): BuildkiteStep => ({
597-
label: `Scout: [ ${group} / ${title} ] plugin`,
606+
depends_on: ['build_scout_tests'],
607+
steps: scoutCiRunGroups.map(
608+
({ label, key, group, agents }): BuildkiteStep => ({
609+
label,
598610
command: getRequiredEnv('SCOUT_CONFIGS_SCRIPT'),
599611
timeout_in_minutes: 60,
600-
agents: expandAgentQueue(usesParallelWorkers ? 'n2-8-spot' : 'n2-4-spot'),
612+
agents,
601613
env: {
602614
SCOUT_CONFIG_GROUP_KEY: key,
603615
SCOUT_CONFIG_GROUP_TYPE: group,

.buildkite/pipelines/chrome_forward_testing.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ steps:
6161
- exit_status: '*'
6262
limit: 1
6363

64+
- command: .buildkite/scripts/steps/test/scout_test_run_builder.sh
65+
label: 'Scout Test Run Builder'
66+
agents:
67+
machineType: n2-standard-2
68+
key: build_scout_tests
69+
timeout_in_minutes: 10
70+
env:
71+
SCOUT_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/scout_configs.sh'
72+
retry:
73+
automatic:
74+
- exit_status: '*'
75+
limit: 1
76+
6477
- command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh
6578
label: 'Rule Management - Security Solution Cypress Tests'
6679
agents:

.buildkite/pipelines/es_snapshots/verify.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ steps:
5656
- exit_status: '*'
5757
limit: 1
5858

59+
- command: .buildkite/scripts/steps/test/scout_test_run_builder.sh
60+
label: 'Scout Test Run Builder'
61+
agents:
62+
image: family/kibana-ubuntu-2404
63+
imageProject: elastic-images-prod
64+
provider: gcp
65+
machineType: n2-standard-2
66+
timeout_in_minutes: 10
67+
env:
68+
SCOUT_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/scout_configs.sh'
69+
retry:
70+
automatic:
71+
- exit_status: '*'
72+
limit: 1
73+
5974
- command: .buildkite/scripts/steps/es_snapshots/trigger_promote.sh
6075
label: Trigger promotion
6176
timeout_in_minutes: 10

.buildkite/pipelines/flaky_tests/pipeline.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ function getTestSuitesFromJson(json: string) {
8080
}
8181

8282
const type = item.type;
83-
if (type !== 'ftrConfig' && type !== 'group') {
84-
fail(`testSuite.type must be either "ftrConfig" or "group"`);
83+
if (type !== 'ftrConfig' && type !== 'scoutConfig' && type !== 'group') {
84+
fail(`testSuite.type must be either "ftrConfig" or "scoutConfig" or "group"`);
8585
}
8686

8787
if (item.type === 'ftrConfig') {
@@ -98,6 +98,20 @@ function getTestSuitesFromJson(json: string) {
9898
continue;
9999
}
100100

101+
if (item.type === 'scoutConfig') {
102+
const scoutConfig = item.scoutConfig;
103+
if (typeof scoutConfig !== 'string') {
104+
fail(`testSuite.scoutConfig must be a string`);
105+
}
106+
107+
testSuites.push({
108+
type: 'scoutConfig',
109+
scoutConfig,
110+
count,
111+
});
112+
continue;
113+
}
114+
101115
const key = item.key;
102116
if (typeof key !== 'string') {
103117
fail(`testSuite.key must be a string`);
@@ -189,7 +203,7 @@ for (const testSuite of testSuites) {
189203
concurrency_method: 'eager',
190204
agents: expandAgentQueue(usesParallelWorkers ? 'n2-8-spot' : 'n2-4-spot'),
191205
depends_on: 'build',
192-
timeout_in_minutes: 30,
206+
timeout_in_minutes: 60,
193207
cancel_on_build_failing: true,
194208
retry: {
195209
automatic: [{ exit_status: '-1', limit: 3 }],

.buildkite/pipelines/fleet/package_registry.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@ steps:
4646
- exit_status: '*'
4747
limit: 1
4848

49+
- command: .buildkite/scripts/steps/test/scout_test_run_builder.sh
50+
label: 'Scout Test Run Builder'
51+
agents:
52+
image: family/kibana-ubuntu-2404
53+
imageProject: elastic-images-prod
54+
provider: gcp
55+
machineType: n2-standard-2
56+
timeout_in_minutes: 10
57+
env:
58+
SCOUT_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/scout_configs.sh'
59+
retry:
60+
automatic:
61+
- exit_status: '*'
62+
limit: 1
63+
4964
- command: .buildkite/scripts/steps/functional/defend_workflows.sh
5065
label: 'Defend Workflows Cypress Tests'
5166
agents:

.buildkite/pipelines/on_merge.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ steps:
5555
provider: gcp
5656
machineType: n2-standard-2
5757
preemptible: true
58-
diskSizeGb: 85
58+
diskSizeGb: 100
5959
timeout_in_minutes: 60
6060
retry:
6161
automatic:
@@ -178,6 +178,22 @@ steps:
178178
- exit_status: '*'
179179
limit: 1
180180

181+
- command: .buildkite/scripts/steps/test/scout_test_run_builder.sh
182+
label: 'Scout Test Run Builder'
183+
agents:
184+
image: family/kibana-ubuntu-2404
185+
imageProject: elastic-images-prod
186+
provider: gcp
187+
machineType: n2-standard-2
188+
diskSizeGb: 85
189+
timeout_in_minutes: 10
190+
env:
191+
SCOUT_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/scout_configs.sh'
192+
retry:
193+
automatic:
194+
- exit_status: '*'
195+
limit: 1
196+
181197
- command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh
182198
label: 'Serverless Entity Analytics - Security Cypress Tests'
183199
agents:

.buildkite/pipelines/on_merge_unsupported_ftrs.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ steps:
3838
preemptible: true
3939
depends_on: build
4040
env:
41-
PING_SLACK_TEAM: "@obs-ux-management-team"
41+
PING_SLACK_TEAM: '@obs-ux-management-team'
4242
timeout_in_minutes: 120
4343
artifact_paths:
4444
- 'x-pack/solutions/observability/plugins/synthetics/e2e/.journeys/**/*'
@@ -48,42 +48,3 @@ steps:
4848
limit: 3
4949
- exit_status: '*'
5050
limit: 1
51-
52-
- command: .buildkite/scripts/steps/functional/inventory_cypress.sh
53-
label: 'Inventory Cypress Tests'
54-
agents:
55-
image: family/kibana-ubuntu-2404
56-
imageProject: elastic-images-prod
57-
provider: gcp
58-
machineType: n2-standard-4
59-
preemptible: true
60-
depends_on: build
61-
env:
62-
PING_SLACK_TEAM: "@obs-ux-infra_services-team"
63-
timeout_in_minutes: 120
64-
retry:
65-
automatic:
66-
- exit_status: '-1'
67-
limit: 3
68-
- exit_status: '*'
69-
limit: 1
70-
71-
- command: .buildkite/scripts/steps/test/scout_test_run_builder.sh
72-
label: 'Scout Test Run Builder'
73-
agents:
74-
image: family/kibana-ubuntu-2404
75-
imageProject: elastic-images-prod
76-
provider: gcp
77-
machineType: n2-standard-2
78-
preemptible: true
79-
depends_on: build
80-
timeout_in_minutes: 10
81-
env:
82-
SCOUT_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/scout_configs.sh'
83-
PING_SLACK_TEAM: "@appex-qa-team"
84-
retry:
85-
automatic:
86-
- exit_status: 10
87-
limit: 0
88-
- exit_status: '*'
89-
limit: 1

.buildkite/pipelines/pointer_compression.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,22 @@ steps:
4949
- exit_status: '*'
5050
limit: 1
5151

52+
- command: .buildkite/scripts/steps/test/scout_test_run_builder.sh
53+
label: 'Scout Test Run Builder'
54+
agents:
55+
image: family/kibana-ubuntu-2404
56+
imageProject: elastic-images-prod
57+
provider: gcp
58+
machineType: n2-standard-2
59+
key: build_scout_tests
60+
timeout_in_minutes: 10
61+
env:
62+
SCOUT_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/scout_configs.sh'
63+
retry:
64+
automatic:
65+
- exit_status: '*'
66+
limit: 1
67+
5268
- command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh
5369
label: 'Rule Management - Security Solution Cypress Tests'
5470
agents:

.buildkite/pipelines/pull_request/base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ steps:
4141
agents:
4242
machineType: n2-standard-2
4343
preemptible: true
44-
diskSizeGb: 85
44+
diskSizeGb: 100
4545
timeout_in_minutes: 60
4646
retry:
4747
automatic:

.buildkite/pipelines/pull_request/scout_tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@ steps:
88
SCOUT_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/scout_configs.sh'
99
retry:
1010
automatic:
11-
# No retry when Scout configs fail
12-
- exit_status: 10
13-
limit: 0
1411
- exit_status: '*'
1512
limit: 1

0 commit comments

Comments
 (0)