Skip to content

Commit 2fbc843

Browse files
authored
[ci] Extract OAS check + add retry (#196534)
## Summary In the past months, the capture OAS snapshot step has been quite flaky, breaking the `Checks` step, and thus breaking the `on-merge` jobs. This PR extracts the check to its own step and adds retries. The separate step is ideal because it is quite heavy compared to the other checks (we fire up ES + Kibana for the OAS snapshot). Also, this PR removes the `Checks` step altogether from the kibana-chrome-forward-testing pipeline, as the Chrome versions used do not affect that aspect. This test run includes a retry within the Capture OAS Snapshot step: https://buildkite.com/elastic/kibana-pull-request/builds/243187#01929612-dac7-4584-b440-120ea3fea7ea
1 parent 05d9b5c commit 2fbc843

File tree

5 files changed

+34
-14
lines changed

5 files changed

+34
-14
lines changed

.buildkite/pipelines/chrome_forward_testing.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -345,17 +345,6 @@ steps:
345345
- exit_status: '-1'
346346
limit: 1
347347

348-
- command: .buildkite/scripts/steps/checks.sh
349-
label: 'Checks'
350-
agents:
351-
machineType: n2-standard-2
352-
preemptible: true
353-
timeout_in_minutes: 60
354-
retry:
355-
automatic:
356-
- exit_status: '-1'
357-
limit: 3
358-
359348
- wait: ~
360349
continue_on_failure: true
361350

.buildkite/pipelines/on_merge.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,20 @@ steps:
532532
- exit_status: '-1'
533533
limit: 3
534534

535+
- command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh
536+
label: 'Check OAS Snapshot'
537+
agents:
538+
image: family/kibana-ubuntu-2004
539+
imageProject: elastic-images-prod
540+
provider: gcp
541+
machineType: n2-standard-2
542+
preemptible: true
543+
timeout_in_minutes: 60
544+
retry:
545+
automatic:
546+
- exit_status: '-1'
547+
limit: 3
548+
535549
- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
536550
label: 'Build Storybooks'
537551
agents:

.buildkite/pipelines/pull_request/base.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ steps:
109109
- exit_status: '-1'
110110
limit: 3
111111

112+
- command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh
113+
label: 'Check OAS Snapshot'
114+
agents:
115+
machineType: n2-standard-2
116+
preemptible: true
117+
timeout_in_minutes: 60
118+
retry:
119+
automatic:
120+
- exit_status: '-1'
121+
limit: 3
122+
112123
- command: .buildkite/scripts/steps/api_docs/build_api_docs.sh
113124
label: 'Build API Docs'
114125
agents:

.buildkite/scripts/steps/checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ if [[ "${FTR_ENABLE_FIPS_AGENT:-}" == "true" ]]; then
1010
fi
1111
.buildkite/scripts/steps/checks/saved_objects_compat_changes.sh
1212
.buildkite/scripts/steps/checks/saved_objects_definition_change.sh
13-
.buildkite/scripts/steps/capture_oas_snapshot.sh
1413
.buildkite/scripts/steps/code_generation/elastic_assistant_codegen.sh
1514
.buildkite/scripts/steps/code_generation/security_solution_codegen.sh
1615
.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh

.buildkite/scripts/steps/capture_oas_snapshot.sh renamed to .buildkite/scripts/steps/checks/capture_oas_snapshot.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -euo pipefail
44

5+
.buildkite/scripts/bootstrap.sh
6+
57
source .buildkite/scripts/common/util.sh
68

79
echo --- Capture OAS snapshot
@@ -14,5 +16,10 @@ if [[ $BUILDKITE_PULL_REQUEST != "false" && "$BUILDKITE_PULL_REQUEST_BASE_BRANCH
1416
cmd="$cmd --no-serverless"
1517
fi
1618

17-
eval "$cmd"
18-
check_for_changed_files "$cmd" true
19+
run_check() {
20+
eval "$cmd"
21+
}
22+
23+
retry 5 15 run_check
24+
25+
check_for_changed_files "$cmd" true

0 commit comments

Comments
 (0)