Skip to content

Commit 1078eb3

Browse files
chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@cb96797 (#788)
Reference-to: stackabletech/operator-templating@cb96797 (Bump stackabletech/actions to v0.16.3 to improve SBOMs)
1 parent be2ebff commit 1078eb3

4 files changed

Lines changed: 50 additions & 26 deletions

File tree

.github/workflows/build.yaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Check for changed files
5050
id: check
51-
uses: stackabletech/actions/detect-changes@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
51+
uses: stackabletech/actions/detect-changes@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
5252
with:
5353
patterns: |
5454
- '.github/workflows/build.yaml'
@@ -164,7 +164,7 @@ jobs:
164164

165165
- name: Build Container Image
166166
id: build
167-
uses: stackabletech/actions/build-container-image@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
167+
uses: stackabletech/actions/build-container-image@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
168168
with:
169169
image-name: ${{ env.OPERATOR_NAME }}
170170
image-index-manifest-tag: ${{ steps.version.outputs.OPERATOR_VERSION }}
@@ -173,7 +173,7 @@ jobs:
173173

174174
- name: Publish Container Image to oci.stackable.tech
175175
if: ${{ !github.event.pull_request.head.repo.fork }}
176-
uses: stackabletech/actions/publish-image@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
176+
uses: stackabletech/actions/publish-image@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
177177
with:
178178
image-registry-uri: oci.stackable.tech
179179
image-registry-username: robot$sdp+github-action-build
@@ -184,7 +184,7 @@ jobs:
184184

185185
- name: Publish Container Image to quay.io
186186
if: ${{ !github.event.pull_request.head.repo.fork }}
187-
uses: stackabletech/actions/publish-image@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
187+
uses: stackabletech/actions/publish-image@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
188188
with:
189189
image-registry-uri: quay.io
190190
image-registry-username: stackable+robot_sdp_github_action_build
@@ -216,7 +216,7 @@ jobs:
216216

217217
- name: Publish and Sign Image Index to oci.stackable.tech
218218
id: publish-oci
219-
uses: stackabletech/actions/publish-image-index-manifest@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
219+
uses: stackabletech/actions/publish-image-index-manifest@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
220220
with:
221221
image-registry-uri: oci.stackable.tech
222222
image-registry-username: robot$sdp+github-action-build
@@ -226,7 +226,7 @@ jobs:
226226

227227
- name: Publish and Sign Image Index to quay.io
228228
id: publish-quay
229-
uses: stackabletech/actions/publish-image-index-manifest@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
229+
uses: stackabletech/actions/publish-image-index-manifest@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
230230
with:
231231
image-registry-uri: quay.io
232232
image-registry-username: stackable+robot_sdp_github_action_build
@@ -311,7 +311,7 @@ jobs:
311311
submodules: recursive
312312

313313
- name: Package, Publish, and Sign Helm Chart to oci.stackable.tech
314-
uses: stackabletech/actions/publish-helm-chart@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
314+
uses: stackabletech/actions/publish-helm-chart@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
315315
with:
316316
chart-registry-uri: oci.stackable.tech
317317
chart-registry-username: robot$sdp-charts+github-action-build
@@ -323,7 +323,7 @@ jobs:
323323
publish-and-sign: ${{ !github.event.pull_request.head.repo.fork }}
324324

325325
- name: Package, Publish, and Sign Helm Chart to quay.io
326-
uses: stackabletech/actions/publish-helm-chart@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
326+
uses: stackabletech/actions/publish-helm-chart@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
327327
with:
328328
chart-registry-uri: quay.io
329329
chart-registry-username: stackable+robot_sdp_charts_github_action_build
@@ -354,13 +354,13 @@ jobs:
354354
runs-on: ubuntu-latest
355355
steps:
356356
- name: Run OpenShift Preflight Check for oci.stackable.tech
357-
uses: stackabletech/actions/run-openshift-preflight@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
357+
uses: stackabletech/actions/run-openshift-preflight@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
358358
with:
359359
image-index-uri: oci.stackable.tech/sdp/${{ env.OPERATOR_NAME }}:${{ needs.build-container-image.outputs.operator-version }}
360360
image-architecture: ${{ matrix.arch }}
361361

362362
- name: Run OpenShift Preflight Check for quay.io
363-
uses: stackabletech/actions/run-openshift-preflight@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
363+
uses: stackabletech/actions/run-openshift-preflight@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
364364
with:
365365
image-index-uri: quay.io/stackable/sdp/${{ env.OPERATOR_NAME }}:${{ needs.build-container-image.outputs.operator-version }}
366366
image-architecture: ${{ matrix.arch }}
@@ -402,11 +402,20 @@ jobs:
402402
persist-credentials: false
403403

404404
- name: Send Notification
405-
uses: stackabletech/actions/send-slack-notification@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
405+
uses: stackabletech/actions/send-slack-notification@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
406406
with:
407407
publish-helm-chart-result: ${{ needs.publish-helm-chart.result }}
408408
publish-manifests-result: ${{ needs.publish-index-manifest.result }}
409409
build-result: ${{ needs.build-container-image.result }}
410+
# Provenance is generated per registry, but the notification only has a
411+
# single field for it, so the two results are collapsed into the worst
412+
# one. 'failure' must be reported verbatim, otherwise the notification
413+
# is not marked as failed.
414+
generate-provenance-result: >-
415+
${{ (needs.provenance-oci.result == 'failure' || needs.provenance-quay.result == 'failure') && 'failure'
416+
|| (needs.provenance-oci.result == 'cancelled' || needs.provenance-quay.result == 'cancelled') && 'cancelled'
417+
|| (needs.provenance-oci.result == 'skipped' || needs.provenance-quay.result == 'skipped') && 'skipped'
418+
|| 'success' }}
410419
slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
411420
channel-id: C07UG6JH44F # notifications-container-images
412421
type: container-image-build

.github/workflows/integration-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# TODO: Enable the scheduled runs which hard-code what profile to use
4444
- name: Run Integration Test
4545
id: test
46-
uses: stackabletech/actions/run-integration-test@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
46+
uses: stackabletech/actions/run-integration-test@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
4747
with:
4848
replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }}
4949
test-mode-input: ${{ inputs.test-mode-input }}
@@ -53,7 +53,7 @@ jobs:
5353

5454
- name: Send Notification
5555
if: ${{ failure() || github.run_attempt > 1 }}
56-
uses: stackabletech/actions/send-slack-notification@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
56+
uses: stackabletech/actions/send-slack-notification@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
5757
with:
5858
slack-token: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }}
5959
failed-tests: ${{ steps.test.outputs.failed-tests }}

.github/workflows/pr_prek.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
persist-credentials: false
2929
submodules: recursive
3030
fetch-depth: 0
31-
- uses: stackabletech/actions/run-prek@a8af17a19bdcc3b5da0065f76e73827ba0c072ce # v0.16.0
31+
- uses: stackabletech/actions/run-prek@dc83bb926cc464f0f32454e934777116bd1c7768 # v0.16.3
3232
with:
3333
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
3434
hadolint: ${{ env.HADOLINT_VERSION }}

scripts/auto-retry-tests.py

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from contextlib import contextmanager
2626
from dataclasses import asdict, dataclass
2727
from datetime import datetime
28+
from enum import Enum
2829
from pathlib import Path
2930
from typing import Dict, List, Optional, Tuple
3031

@@ -43,6 +44,14 @@ class TestConstants:
4344
FAILED_TEST_PATTERN = r"--- FAIL: kuttl/harness/([^\s]+)"
4445

4546

47+
class InitOutcome(Enum):
48+
"""Outcome of the initialization phase, i.e. what the retry logic should do next."""
49+
50+
RETRY = "retry" # There are failed tests to retry
51+
DONE = "done" # Nothing left to do, the run succeeded
52+
ABORTED = "aborted" # The run could not be completed (setup/infrastructure error)
53+
54+
4655
@dataclass
4756
class RuntimeHistory:
4857
"""Tracks runtime history for a specific test."""
@@ -1047,15 +1056,15 @@ def create_test_summary(
10471056
self.test_summaries[test_name] = summary
10481057
return summary
10491058

1050-
def initialize_run_mode(self) -> bool:
1059+
def initialize_run_mode(self) -> InitOutcome:
10511060
"""Initialize the test run based on mode (resume, rerun, or fresh)."""
10521061
# Check if we're resuming from a previous state
10531062
if self.failed_tests: # This will be populated if we loaded state
10541063
print("Resuming from previous state...")
10551064
print(f"Found {len(self.failed_tests)} failed tests to continue with:")
10561065
for i, test in enumerate(self.failed_tests, 1):
10571066
print(f" {i}. {test}")
1058-
return True
1067+
return InitOutcome.RETRY
10591068

10601069
# Check if we're rerunning only failed tests
10611070
elif self.args.rerun_failed:
@@ -1066,7 +1075,7 @@ def initialize_run_mode(self) -> bool:
10661075
# Run initial test suite
10671076
return self._run_initial_test_suite()
10681077

1069-
def _load_failed_tests_for_rerun(self) -> bool:
1078+
def _load_failed_tests_for_rerun(self) -> InitOutcome:
10701079
"""Load failed tests for rerun mode."""
10711080
# Load failed tests from the specified state file
10721081
failed_tests = self.state_manager.load_failed_tests_from_state(
@@ -1075,17 +1084,17 @@ def _load_failed_tests_for_rerun(self) -> bool:
10751084

10761085
if not failed_tests:
10771086
print("❌ No failed tests found to rerun")
1078-
return False
1087+
return InitOutcome.ABORTED
10791088

10801089
print(f"Found {len(failed_tests)} failed tests to rerun:")
10811090
for i, test in enumerate(failed_tests, 1):
10821091
print(f" {i}. {test}")
10831092

10841093
# Store failed tests for the retry process
10851094
self.failed_tests = failed_tests
1086-
return True
1095+
return InitOutcome.RETRY
10871096

1088-
def _run_initial_test_suite(self) -> bool:
1097+
def _run_initial_test_suite(self) -> InitOutcome:
10891098
"""Run the initial test suite."""
10901099
print("\nStep 1: Running initial full test suite...")
10911100
initial_result = self.test_executor.run_single_test_suite(
@@ -1095,7 +1104,7 @@ def _run_initial_test_suite(self) -> bool:
10951104
if initial_result.success:
10961105
print(" All tests passed on initial run!")
10971106
self.report_generator.generate_and_save_final_report(self, self.start_time)
1098-
return False # No need to continue
1107+
return InitOutcome.DONE # No need to continue
10991108

11001109
# Parse failed tests
11011110
print("\nStep 2: Parsing failed tests...")
@@ -1104,15 +1113,15 @@ def _run_initial_test_suite(self) -> bool:
11041113
)
11051114

11061115
if not failed_tests:
1107-
print(" No failed tests found in output but run-tests exited with code 1")
1116+
print(" No failed tests found in output but run-tests exited with code 1")
11081117
print(
11091118
" This indicates an infrastructure or setup issue that prevents tests from running"
11101119
)
11111120
print(
11121121
" Check the log file for connection errors, missing dependencies, or cluster issues"
11131122
)
11141123
print(f" Log file: {initial_result.log_file}")
1115-
return False
1124+
return InitOutcome.ABORTED
11161125

11171126
print(f" Found {len(failed_tests)} failed tests:")
11181127
for i, test in enumerate(failed_tests, 1):
@@ -1121,7 +1130,7 @@ def _run_initial_test_suite(self) -> bool:
11211130
# Store failed tests and initial result log for state persistence
11221131
self.failed_tests = failed_tests
11231132
self.initial_result_log = initial_result.log_file
1124-
return True
1133+
return InitOutcome.RETRY
11251134

11261135
def execute_parallel_retries(self) -> Dict[str, List[TestResult]]:
11271136
"""Execute parallel retry attempts for failed tests."""
@@ -1263,8 +1272,14 @@ def run(self) -> int:
12631272
print("=" * 46)
12641273

12651274
# Initialize based on run mode
1266-
if not self.initialize_run_mode():
1267-
return 0 # Early exit (e.g., all tests passed initially)
1275+
outcome = self.initialize_run_mode()
1276+
if outcome is InitOutcome.DONE:
1277+
return 0 # All tests passed initially
1278+
if outcome is InitOutcome.ABORTED:
1279+
# The test run never got to a point where retrying makes sense
1280+
# (e.g. release installation or test generation failed).
1281+
print("\n❌ Test run aborted, see above for details.")
1282+
return 1
12681283

12691284
# Execute test retries
12701285
if not self.execute_test_retries():

0 commit comments

Comments
 (0)