Skip to content

Fix nightly update workflow: retry and decouple downstream dispatches - #9756

Closed
timosachsenberg wants to merge 1 commit into
developfrom
claude/laughing-wozniak-2dvz0n
Closed

timosachsenberg wants to merge 1 commit into
developfrom
claude/laughing-wozniak-2dvz0n

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

The scheduled "Update nightly from develop" run on 2026-07-18 (run 29625727900) failed at the "Deploy container images" step:

could not create workflow dispatch event: HTTP 500: Failed to run workflow dispatch (https://api.github.com/repos/OpenMS/OpenMS/actions/workflows/44484323/dispatches)
##[error]Process completed with exit code 1.

Root cause: this step calls gh workflow run containerdeploy.yml --ref nightly to trigger the container deploy workflow. This explicit dispatch is actually necessary (not redundant) — containerdeploy.yml also has a push: branches: [nightly] trigger, but GitHub suppresses new workflow runs triggered by pushes made with the workflow's own token, so the git push origin nightly earlier in the job does not fire it. That day, GitHub's Actions API returned a transient HTTP 500 on the dispatch call, and since the step had no retry logic, the whole job aborted — no container images were built for nightly that day. Checking the last 30 days of Deploy container images runs confirms there is normally exactly one run per day; 2026-07-18 has none.

A second, related problem: each of the five downstream gh workflow run steps (Call CI, Build Develop for cache, Build wheels, Deploy to Bioconda, Deploy container images) ran sequentially with no continue-on-error. A transient failure on any one of them (not just the last) would have aborted the job and skipped triggering the remaining downstream workflows too, even though they are logically independent of each other.

Fix

  • Added .github/workflows/scripts/dispatch_with_retry.sh, a small helper that retries a gh workflow run dispatch up to 3 times with exponential backoff, to absorb transient GitHub API errors like the 500 seen above.
  • Each downstream dispatch step now uses this helper and sets continue-on-error: true, so a failure on one dispatch no longer prevents the others from being attempted.
  • Added a final "Verify all downstream workflow dispatches succeeded" step that checks the outcome of every dispatch step and fails the job if any of them did not ultimately succeed after retries — so persistent/real failures are still surfaced and not silently swallowed.

This is not a workaround to force CI green: the job will still fail (with a clear ::error:: per workflow) if a dispatch genuinely cannot be triggered after retries. It only adds resilience against transient upstream API errors and removes an unnecessary coupling between independent dispatch steps.

Checklist

  • New script passes bash -n syntax check; workflow YAML validated with yaml.safe_load
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes (workflow-only change; no unit tests apply)
  • Updated or added python bindings for changed or new classes (not applicable — CI workflow change only)

Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability of nightly workflow triggers with automatic retries.
    • Added verification to detect failed downstream workflow dispatches.
    • Ensured nightly updates report failures clearly when required workflows do not start successfully.

…ndent

The 2026-07-18 nightly run failed because `gh workflow run
containerdeploy.yml --ref nightly` hit a transient HTTP 500 from the
GitHub API. Since each downstream dispatch step ran without retry and
without continue-on-error, a single flaky dispatch call aborted the
whole job outright, even after the nightly branch had already been
fast-forwarded and (in this case) some downstream workflows had
already been triggered.

Add a small retry-with-backoff helper for `gh workflow run` calls and
make each downstream dispatch step independent (continue-on-error), so
a transient failure on one dispatch no longer prevents the others from
running. A final verification step still fails the job if any dispatch
did not ultimately succeed, so real, persistent failures are still
surfaced rather than silently swallowed.
@github-actions

Copy link
Copy Markdown
Contributor

@timosachsenberg The following names might be missing from the AUTHORS file:

  • Claude

Please consider applying the following patch:

--- AUTHORS	2026-07-18 03:40:10.492487924 +0000
+++ AUTHORS.new	2026-07-18 03:40:15.668080514 +0000
@@ -27,6 +27,7 @@
  - Chris Bielow
  - Christian Ehrlich
  - Christie Mathews
+ - Claude
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9be28fea-9d83-4b8e-8308-63946ceab293

📥 Commits

Reviewing files that changed from the base of the PR and between 3c2d585 and 249256c.

📒 Files selected for processing (2)
  • .github/workflows/scripts/dispatch_with_retry.sh
  • .github/workflows/update_nightly.yml

📝 Walkthrough

Walkthrough

The change adds a retrying GitHub workflow dispatch script and updates nightly orchestration to use it for five downstream workflows. Dispatch steps continue on error, while a final verification step fails the workflow if any dispatch remains unsuccessful.

Changes

Nightly dispatch reliability

Layer / File(s) Summary
Retrying workflow dispatch utility
.github/workflows/scripts/dispatch_with_retry.sh
Adds strict Bash handling, positional workflow/ref arguments, up to three dispatch attempts, exponential backoff, and success or failure exit statuses.
Nightly dispatch integration and verification
.github/workflows/update_nightly.yml
Routes CI, cache, wheel, Bioconda, and container dispatches through the retry utility with GH_TOKEN; records outcomes and aggregates them in a final validation step.

Sequence Diagram(s)

sequenceDiagram
  participant update_nightly.yml
  participant dispatch_with_retry.sh
  participant gh
  participant DownstreamWorkflows
  update_nightly.yml->>dispatch_with_retry.sh: dispatch workflow and ref
  dispatch_with_retry.sh->>gh: run workflow dispatch
  gh->>DownstreamWorkflows: trigger workflow
  dispatch_with_retry.sh-->>update_nightly.yml: return outcome
  update_nightly.yml->>update_nightly.yml: verify dispatch outcomes
Loading

Poem

I’m a rabbit with retries in my code,
Hopping dispatches down the workflow road.
If one fails, I wait and try,
Then check each outcome by and by.
Nightly hops onward when all pass!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main workflow change: adding retries and decoupling downstream dispatches.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/laughing-wozniak-2dvz0n

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants