Skip to content

ci: also auto-retry TheRock Multi-Arch CI on failed/flaky jobs - #12511

Merged
davidd-amd merged 1 commit into
developfrom
users/todavis/ci-auto-retry-multi-arch
Sep 28, 2026
Merged

davidd-amd merged 1 commit into
developfrom
users/todavis/ci-auto-retry-multi-arch

Conversation

@tony-davis

Copy link
Copy Markdown
Contributor

Summary

TheRock Multi-Arch CI became the default per-PR presubmit in #11542, but it was never added to the auto-retry watcher's workflows: list, so the presubmit auto-retry added in #10763 silently stopped applying. Every failed Multi-Arch CI run today sits at attempt 1 until a human clicks "Re-run failed jobs." This adds it to the watch list with the same per-PR cap TheRock CI had: 1 auto-retry, 2 total attempts.

Risk Assessment

Risk 2. One-file change to an isolated CI orchestration workflow; no product code, reusable-workflow interface, or build/test lane is touched. It only acts on runs that already concluded failure, and the per-workflow attempt cap bounds worst-case runner usage. This is the same mechanism already proven on the nightlies (#9174, #9658) and on TheRock CI (#10763), applied to one more workflow name.

Related

ISSUE ID: #12510

Device / Architecture Coverage

Architecture-independent. This is CI orchestration only (it calls the GitHub API to re-run jobs); it runs no device code and needs no per-arch verification.

Testing Summary

  • Confirmed the gap is real: the last 15 failed TheRock Multi-Arch CI runs are all at attempt=1, while TheRock Multi-Arch Nightly CI failures reach attempt=4 under the existing watcher.
  • Confirmed "re-run failed jobs" actually works on a Multi-Arch CI run, which is not obvious given its jobs come from reusable workflows in ROCm/TheRock. Run 35893574070 was manually re-run this way: attempt 2 re-executed only the failed test jobs (started 2026-09-24T00:22Z) while the setup jobs kept their attempt-1 timestamps (2026-09-23T17:52Z), and the re-run test jobs passed.
  • That run also confirms artifact addressing survives a retry: TheRock's build and test jobs key S3 artifacts on github.run_id, not run_attempt, so test jobs re-run roughly 6.5 hours later still found attempt 1's build output.
  • actionlint type-checks the if: expression. I verified the linter is actually reading it by breaking contains into containz on a scratch copy and watching it fail.
  • Functional behavior can only be exercised on the default branch, because workflow_run always uses the copy of this file on develop. Plan: watch the first Multi-Arch CI failure after merge and confirm it gets exactly one auto-retry.

Testing Checklist

  • actionlint - actionlint .github/workflows/auto-retry-failed.yml - Status: Passed
  • pre-commit (formatting/yaml) - pre-commit run --files .github/workflows/auto-retry-failed.yml - Status: Passed
  • PR CI - GitHub PR checks - Status: Pending
  • Post-merge observation - confirm a failed TheRock Multi-Arch CI run gets exactly 1 auto-retry - Status: Pending

Flags / Guardrails

Per-workflow attempt cap via run_attempt: the per-PR workflows (TheRock CI, TheRock Multi-Arch CI) get run_attempt < 2 (1 auto-retry, 2 total attempts); the two nightlies keep run_attempt < 4 (unchanged). Only fires on conclusion == 'failure'; cancelled (concurrency / superseded runs) and startup_failure are excluded. No new permissions; reuses the existing actions: write grant.

Adjacent Tests Considered

No product or test code changes. Checked that Multi-Arch CI's cancel-in-progress: true concurrency interacts safely with a queued retry: a new push cancels a stale retry, which is the behavior we want. Also checked the two ASAN workflows (TheRock Multi-Arch CI ASAN and TheRock Multi-Arch CI ASAN Nightly), which are likewise unwatched; they are left out of this PR to keep the change on the default presubmit path, and are noted as follow-up in the issue.

Risk Acceptance / Waivers

W-BUILD: CI orchestration only, no product behavior change; mirrors the already-proven pattern from #9174, #9658, and #10763.

Technical Changes

  • Add "TheRock Multi-Arch CI" to the workflow_run.workflows list in .github/workflows/auto-retry-failed.yml.
  • Replace the == 'TheRock CI' / != 'TheRock CI' attempt-cap branch with two explicit contains(fromJSON(...)) name lists, one per cap. The old fallback branch gave the nightly cap of 4 to any watched workflow that was not literally TheRock CI, so adding Multi-Arch CI without this rework would have granted presubmit 3 auto-retries. A watched workflow in neither list now gets no auto-retry at all, which fails safe on runner spend.
  • Update the header comment, which named TheRock CI as the only per-PR workflow.

`TheRock Multi-Arch CI` became the default per-PR presubmit in #11542, but it
was never added to the auto-retry watcher's `workflows:` list, so the
presubmit auto-retry added in #10763 stopped applying. Every failed Multi-Arch
CI run sits at attempt 1 until a human clicks "Re-run failed jobs."

Add it to the watch list with the same per-PR cap as `TheRock CI`: 1
auto-retry, 2 total attempts. The nightlies keep their cap of 4.

The attempt cap is now driven by two explicit workflow-name lists instead of
`== 'TheRock CI'` / `!= 'TheRock CI'`, whose fallback branch would otherwise
have given the new workflow the looser nightly cap. A watched workflow missing
from both lists now gets no auto-retry, which fails safe on runner spend.

Closes #12510

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added github actions project: none Does not target any component labels Sep 24, 2026
@therock-pr-bot

therock-pr-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@tony-davis
tony-davis marked this pull request as ready for review September 24, 2026 17:50
@tony-davis
tony-davis requested a review from a team as a code owner September 24, 2026 17:50
Copilot AI lite review requested due to automatic review settings September 24, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

What changed in this PR

Updates CI auto-retry handling to cover TheRock Multi-Arch CI with the intended retry limits.

Changes:

  • Adds Multi-Arch CI to watched workflows.
  • Separates per-PR and nightly retry caps.
  • Updates explanatory comments.
File Description
.github/​workflows/​auto-retry-failed.yml Extends retry monitoring and applies correct retry caps.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@davidd-amd
davidd-amd merged commit 4761a51 into develop Sep 28, 2026
478 of 491 checks passed
@davidd-amd
davidd-amd deleted the users/todavis/ci-auto-retry-multi-arch branch September 28, 2026 17:17
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: auto-retry TheRock Multi-Arch CI on failed/flaky jobs

3 participants