Repository navigation
Multi-repo runs wait on each PR's CI; the CI wait loop is capped - #214
Merged
Merged
Conversation
… loop stops after about a day of checks instead of looping forever
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A run that opened pull requests in two repositories sat in
awaiting_cifor hours, re-checking every two minutes: "Could not read branch head" then "A workflow passed but others are still running". Resume had no multi-repo handling: the run record holds onerepoand onebranch, and here they belonged to different repositories, so the head couldn't be read and CI never looked complete. The 24-hour backstop never fired because it measured time since the record's last write, and every check rewrites the record.Changes
resume.rs:resume_multi_repo(): a run with more than one entry inpr_urlschecks each pull request's own head. All green: every open pull request is marked ready and the run completes. Any failure: the run is handed to a person with a note naming the failing pull requests (the CI fix loop works within one repository). Otherwise it checks again later. Closed pull requests are skipped.may_poll_again()/MAX_RESUME_POLLS(720, about a day at two minutes):send_delayed_resume()counts each re-arm on the run record (ci_resume_polls); past the cap it hands off instead (hand_off_after_ci_wait(): pull requests marked ready, a note, the run completes). This covers single- and multi-repo waits, and record writes can't reset it.Verification
cargo clippy -p worker --all-targets -D warningsclean;cargo test -p worker: 431 passed, 0 failed.repoone repository,branchthe other's branch,pr_urlswith both pull requests.