Skip to content

Commit 0fbbab3

Browse files
authored
Merge branch '9.3' into backport/9.3/pr-258963
2 parents 868aa5d + 519bd35 commit 0fbbab3

45 files changed

Lines changed: 1181 additions & 281 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/pipelines/on_merge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ steps:
263263
machineType: n2-standard-8
264264
preemptible: true
265265
spotZones: us-central1-b,us-central1-c,us-central1-f
266+
diskSizeGb: 105
266267
key: storybooks
267268
depends_on:
268269
- build

.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,4 @@
11
steps:
2-
- command: .buildkite/scripts/steps/functional/security_serverless_ai_assistant.sh
3-
label: 'Serverless AI Assistant - Security Solution Cypress Tests'
4-
key: security-serverless-ai-assistant
5-
agents:
6-
machineType: n2-standard-4
7-
preemptible: true
8-
spotZones: us-central1-f,us-central1-c,us-central1-a
9-
depends_on:
10-
- build
11-
timeout_in_minutes: 60
12-
parallelism: 1
13-
retry:
14-
automatic:
15-
- exit_status: '-1'
16-
limit: 3
17-
- exit_status: '*'
18-
limit: 1
19-
202
- command: .buildkite/scripts/steps/functional/security_solution_ai_assistant.sh
213
label: 'AI Assistant - Security Solution Cypress Tests'
224
key: security-ai-assistant

.buildkite/pipelines/pull_request/security_solution/defend_workflows.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,3 @@ steps:
1818
limit: 3
1919
- exit_status: '*'
2020
limit: 1
21-
22-
- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
23-
label: 'Defend Workflows Cypress Tests on Serverless'
24-
key: defend-workflows-serverless
25-
agents:
26-
enableNestedVirtualization: true
27-
machineType: n2-standard-4
28-
diskSizeGb: 150
29-
preemptible: true
30-
spotZones: us-central1-f,us-central1-c,us-central1-a
31-
depends_on:
32-
- build
33-
timeout_in_minutes: 60
34-
parallelism: 16
35-
retry:
36-
automatic:
37-
- exit_status: '-1'
38-
limit: 3
39-
- exit_status: '*'
40-
limit: 1

.buildkite/pipelines/pull_request/security_solution/detection_engine.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,4 @@
11
steps:
2-
- command: .buildkite/scripts/steps/functional/security_serverless_detection_engine.sh
3-
label: 'Serverless Detection Engine - Security Solution Cypress Tests'
4-
key: security-serverless-detection-engine
5-
agents:
6-
machineType: n2-standard-4
7-
preemptible: true
8-
spotZones: us-central1-f,us-central1-c,us-central1-a
9-
depends_on:
10-
- build
11-
timeout_in_minutes: 60
12-
parallelism: 8
13-
retry:
14-
automatic:
15-
- exit_status: '-1'
16-
limit: 3
17-
- exit_status: '*'
18-
limit: 1
19-
20-
- command: .buildkite/scripts/steps/functional/security_serverless_detection_engine_exceptions.sh
21-
label: 'Serverless Detection Engine - Exceptions - Security Solution Cypress Tests'
22-
key: security-serverless-detection-engine-exceptions
23-
agents:
24-
machineType: n2-standard-4
25-
preemptible: true
26-
spotZones: us-central1-f,us-central1-c,us-central1-a
27-
depends_on:
28-
- build
29-
timeout_in_minutes: 60
30-
parallelism: 3
31-
retry:
32-
automatic:
33-
- exit_status: '-1'
34-
limit: 3
35-
- exit_status: '*'
36-
limit: 1
37-
382
- command: .buildkite/scripts/steps/functional/security_solution_detection_engine.sh
393
label: 'Detection Engine - Security Solution Cypress Tests'
404
key: security-detection-engine

.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,3 @@ steps:
1616
limit: 3
1717
- exit_status: '*'
1818
limit: 1
19-
20-
- command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh
21-
label: 'Osquery Cypress Tests on Serverless'
22-
key: osquery-serverless
23-
agents:
24-
machineType: n2-standard-4
25-
preemptible: true
26-
spotZones: us-central1-f,us-central1-c,us-central1-a
27-
depends_on:
28-
- build
29-
timeout_in_minutes: 60
30-
parallelism: 5
31-
retry:
32-
automatic:
33-
- exit_status: '-1'
34-
limit: 3
35-
- exit_status: '*'
36-
limit: 1

.buildkite/pipelines/pull_request/security_solution/rule_management.yml

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,4 @@
11
steps:
2-
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh
3-
label: 'Serverless Rule Management - Security Solution Cypress Tests'
4-
key: security-serverless-rule-management
5-
agents:
6-
machineType: n2-standard-4
7-
preemptible: true
8-
spotZones: us-central1-f,us-central1-c,us-central1-a
9-
depends_on:
10-
- build
11-
timeout_in_minutes: 60
12-
parallelism: 8
13-
retry:
14-
automatic:
15-
- exit_status: '-1'
16-
limit: 3
17-
- exit_status: '*'
18-
limit: 1
19-
20-
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh
21-
label: 'Serverless Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests'
22-
key: security-serverless-rule-management-prebuilt-customization
23-
agents:
24-
machineType: n2-standard-4
25-
preemptible: true
26-
spotZones: us-central1-f,us-central1-c,us-central1-a
27-
depends_on:
28-
- build
29-
timeout_in_minutes: 60
30-
parallelism: 1
31-
retry:
32-
automatic:
33-
- exit_status: '-1'
34-
limit: 3
35-
- exit_status: '*'
36-
limit: 1
37-
38-
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh
39-
label: 'Serverless Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests'
40-
key: security-serverless-rule-management-prebuilt-installation
41-
agents:
42-
machineType: n2-standard-4
43-
preemptible: true
44-
spotZones: us-central1-f,us-central1-c,us-central1-a
45-
depends_on:
46-
- build
47-
timeout_in_minutes: 60
48-
parallelism: 2
49-
retry:
50-
automatic:
51-
- exit_status: '-1'
52-
limit: 3
53-
- exit_status: '*'
54-
limit: 1
55-
56-
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh
57-
label: 'Serverless Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests'
58-
key: security-serverless-rule-management-prebuilt-management
59-
agents:
60-
machineType: n2-standard-4
61-
preemptible: true
62-
spotZones: us-central1-f,us-central1-c,us-central1-a
63-
depends_on:
64-
- build
65-
timeout_in_minutes: 60
66-
parallelism: 1
67-
retry:
68-
automatic:
69-
- exit_status: '-1'
70-
limit: 3
71-
- exit_status: '*'
72-
limit: 1
73-
74-
- command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh
75-
label: 'Serverless Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests'
76-
key: security-serverless-rule-management-prebuilt-upgrade
77-
agents:
78-
machineType: n2-standard-4
79-
preemptible: true
80-
spotZones: us-central1-f,us-central1-c,us-central1-a
81-
depends_on:
82-
- build
83-
timeout_in_minutes: 60
84-
parallelism: 2
85-
retry:
86-
automatic:
87-
- exit_status: '-1'
88-
limit: 3
89-
- exit_status: '*'
90-
limit: 1
91-
922
- command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh
933
label: 'Rule Management - Security Solution Cypress Tests'
944
key: security-rule-management

.buildkite/pipelines/pull_request/storybooks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ steps:
55
machineType: n2-standard-8
66
preemptible: true
77
spotZones: us-central1-f,us-central1-c,us-central1-a
8+
diskSizeGb: 105
89
key: storybooks
910
timeout_in_minutes: 80
1011
retry:

.buildkite/scripts/common/setup_job_env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ EOF
205205
if [[ "${CI:-}" =~ ^(1|true)$ ]]; then
206206
MOON_REMOTE_CACHE_TOKEN=$(vault_get moon-remote-cache token)
207207
export MOON_REMOTE_CACHE_TOKEN
208+
export MOON_CACHE=read
208209
fi
210+
export MOON_CACHE=off
209211

210212
PIPELINE_PRE_COMMAND=${PIPELINE_PRE_COMMAND:-".buildkite/scripts/lifecycle/pipelines/$BUILDKITE_PIPELINE_SLUG/pre_command.sh"}
211213
if [[ -f "$PIPELINE_PRE_COMMAND" ]]; then

packages/kbn-ts-type-check-cli/run_type_check_cli.ts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,20 @@ async function createTypeCheckConfigs(
8888
);
8989
}
9090

91-
async function detectLocalChanges(): Promise<boolean> {
92-
const { stdout } = await execa('git', ['status', '--porcelain'], {
93-
cwd: REPO_ROOT,
94-
});
91+
async function detectLocalChanges(): Promise<string[]> {
92+
const { stdout } = await execa(
93+
'git',
94+
// Some CI environments change these files dynamically, like FIPS but it shouldn't invalidate the cache
95+
['status', '--porcelain', '--', '.', ':!:config/node.options', ':!config/kibana.yml'],
96+
{
97+
cwd: REPO_ROOT,
98+
}
99+
);
95100

96-
return stdout.trim().length > 0;
101+
return stdout
102+
.split('\n')
103+
.map((line) => line.trimEnd())
104+
.filter((line) => line.length > 0);
97105
}
98106

99107
run(
@@ -172,14 +180,16 @@ run(
172180
didTypeCheckFail = true;
173181
}
174182

175-
const hasLocalChanges = shouldUseArchive ? await detectLocalChanges() : false;
183+
const localChanges = shouldUseArchive ? await detectLocalChanges() : [];
184+
const hasLocalChanges = localChanges.length > 0;
176185

177186
if (shouldUseArchive) {
178187
if (hasLocalChanges) {
179-
const message = `uncommitted changes were detected after the TypeScript build. TypeScript cache artifacts must be generated from a clean working tree.`;
188+
const changedFiles = localChanges.join('\n');
189+
const message = `uncommitted changes were detected after the TypeScript build. TypeScript cache artifacts must be generated from a clean working tree.\nChanged files:\n${changedFiles}`;
180190

181191
if (isCiEnvironment()) {
182-
throw new Error(`Canceling TypeScript cache archive because ${message}`);
192+
throw new Error(`Cancelling TypeScript cache archive because ${message}`);
183193
}
184194

185195
log.info(`Skipping TypeScript cache archive because ${message}`);

0 commit comments

Comments
 (0)