Repository navigation
Retry gh workflow dispatches in nightly-sync job on transient API errors - #9759
timosachsenberg wants to merge 1 commit into
Conversation
The nightly build orchestrator (update_nightly.yml) failed on 2026-07-18 because `gh workflow run containerdeploy.yml` hit a transient GitHub API HTTP 500, aborting the job outright even though the actual nightly build matrix (openms-ci-full on the nightly branch) built and tested cleanly. Wrap each downstream `gh workflow run` dispatch in a shared retry-with- backoff script so a one-off API hiccup no longer fails the whole pipeline. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bg6MhKkxUPexR4NwYcVJUX
|
@timosachsenberg The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-07-19 03:40:10.761091608 +0000
+++ AUTHORS.new 2026-07-19 03:40:15.695046095 +0000
@@ -27,6 +27,7 @@
- Chris Bielow
- Christian Ehrlich
- Christie Mathews
+ - Claude
- Clemens Groepl
- Cornelia Friedle
- Daniel Jameson |
📝 WalkthroughWalkthroughChangesNightly dispatch reliability
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/scripts/gh_dispatch_retry.sh (1)
6-7: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd argument validation to prevent cryptic errors.
Because
set -uis enabled, if the script is ever executed with fewer than two arguments, it will fail with an unhelpfulunbound variableerror before it can do anything. Validating the argument count makes the script more robust and self-documenting.♻️ Proposed fix
+if [ "$#" -ne 2 ]; then + echo "Usage: $0 <workflow> <ref>" >&2 + exit 1 +fi + workflow="$1" ref="$2"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/scripts/gh_dispatch_retry.sh around lines 6 - 7, Add argument-count validation before the workflow and ref assignments in gh_dispatch_retry.sh, requiring at least two arguments and exiting with a clear usage message when they are missing. Preserve the existing assignments for valid invocations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/scripts/gh_dispatch_retry.sh:
- Around line 6-7: Add argument-count validation before the workflow and ref
assignments in gh_dispatch_retry.sh, requiring at least two arguments and
exiting with a clear usage message when they are missing. Preserve the existing
assignments for valid invocations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 92508cb7-ff85-4854-977f-5bea79491e0c
📒 Files selected for processing (2)
.github/scripts/gh_dispatch_retry.sh.github/workflows/update_nightly.yml
Summary
Investigated the "nightly build CI" and found the actual nightly build matrix (
openms-ci-fullon thenightlybranch) has been green every night — all build/test/package/deploy jobs (Linux, macOS, Windows, ARM, docs, KNIME, installer) passed on 2026-07-18.The failure was in the orchestrator,
Update nightly from develop(.github/workflows/update_nightly.yml), which fast-forwardsnightlytodevelopand then dispatches the downstream workflows (CI, wheels, Bioconda, container images). On 2026-07-18 its last step failed:This is a transient GitHub API error on the
gh workflow run containerdeploy.yml --ref nightlycall, not a code/test defect — everything before it (the nightly branch fast-forward, and dispatchingopenms-ci-full,pyopenms-wheels-cibuildwheel, andDeploy to Bioconda) had already succeeded that run. But because GitHub Actions steps stop the job on the first failing step, a single flaky dispatch call aborts the whole job and (had it happened earlier in the sequence) would have silently skipped the remaining dispatches too.Fix
Added
.github/scripts/gh_dispatch_retry.sh, a small retry-with-backoff wrapper aroundgh workflow run <workflow> --ref <ref>(5 attempts, linear backoff), and updated each of the five dispatch steps inupdate_nightly.ymlto use it. A dispatch call now only fails the job after 5 unsuccessful attempts, which tolerates one-off API hiccups like the one observed while still surfacing a genuine, persistent failure (no error suppression — the job still fails loudly if the API stays down).Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/update_nightly.yml'))"— YAML parsesbash -n .github/scripts/gh_dispatch_retry.sh— script syntax checkCo-Authored-By: Claude Sonnet 5 [email protected]
Generated by Claude Code
Summary by CodeRabbit