CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
60 lines
2.3 KiB
YAML
60 lines
2.3 KiB
YAML
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# Automatically re-runs the failed jobs of a watched CI run, up to a fixed
|
|
# number of attempts. This mirrors clicking "Re-run failed jobs" in the web UI:
|
|
# `gh run rerun --failed` calls the same rerun-failed-jobs API, so each retry
|
|
# lands on a fresh runner and is recorded as a new attempt on the SAME run
|
|
# (prior attempts stay visible in the run's attempt history).
|
|
#
|
|
# The retry loop is self-capping: `workflow_run` fires whenever an attempt of
|
|
# the watched run completes, so a failed attempt N triggers this workflow with
|
|
# run_attempt == N, which re-runs and produces attempt N+1, and so on until the
|
|
# run_attempt cap below is reached.
|
|
#
|
|
# Motivation: most nightly failures are infrastructure flakes (no GPU assigned,
|
|
# an overloaded/wedged machine, or a network blip during artifact fetch) rather
|
|
# than real test regressions. Those clear on a fresh runner, which a same-runner
|
|
# step retry cannot provide.
|
|
#
|
|
# NOTE: `workflow_run` always uses the copy of this file on the repository's
|
|
# default branch, and only fires for runs there. It has no effect from a PR
|
|
# branch until merged.
|
|
|
|
name: Auto-retry failed CI
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- "TheRock CI Nightly"
|
|
- "TheRock Multi-Arch Nightly CI"
|
|
types:
|
|
- completed
|
|
|
|
permissions:
|
|
# Required to trigger a re-run of the watched workflow run.
|
|
actions: write
|
|
contents: read
|
|
|
|
jobs:
|
|
rerun-failed:
|
|
name: Rerun failed jobs
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 5
|
|
# Only genuine failures under the attempt cap. run_attempt < 4 allows up to
|
|
# 4 total attempts (the original run plus 3 auto-retries). 'cancelled'
|
|
# (concurrency / superseded runs) and 'startup_failure' are intentionally
|
|
# excluded so we never retry work that was deliberately abandoned.
|
|
if: >-
|
|
github.event.workflow_run.conclusion == 'failure' &&
|
|
github.event.workflow_run.run_attempt < 4
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
RUN_ID: ${{ github.event.workflow_run.id }}
|
|
ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
|
|
steps:
|
|
- name: Re-run failed jobs
|
|
run: |
|
|
echo "Run ${RUN_ID} failed on attempt ${ATTEMPT}; re-running failed jobs on fresh runners."
|
|
gh run rerun "${RUN_ID}" --failed --repo "${{ github.repository }}"
|