Answer stability round 2: 0 🔴, 4 🟡 (0 misread); each survivor it named has a test that kills it
This commit is contained in:
@@ -53,15 +53,16 @@ merge merges the pull request in its turn: the chunks of one project on this
|
||||
ruling, since that ruling read a head that no longer merges;
|
||||
- where a check fails, or, on Gitea, where the checks have not all passed within 30
|
||||
minutes; on GitHub, gh watches them until they end;
|
||||
- where another pull request still holds the turn after 30 minutes, naming it;
|
||||
- where other pull requests still hold the turn after 30 minutes, naming the last;
|
||||
- with `wait-for-approval`: where a reviewer requested changes, where the protection
|
||||
requires no review, on Gitea, where it cannot read the config, and after 90 minutes
|
||||
without an approval;
|
||||
- with `wait-for-approval`, approved or not: where a reviewer's comment waits for an
|
||||
answer, which is a review thread nobody resolved whose last comment is not the pull
|
||||
request author's. Answer it in its thread and push any fix.
|
||||
A run can last the 30 minutes in the queue, the checks and the 90 minutes together. One
|
||||
killed before that left the branch pushed, so run it again.
|
||||
A run that waits for an approval takes two turns, so it can last the 90 minutes and,
|
||||
twice, the 30 minutes in the queue and the checks. One killed before that left the
|
||||
branch pushed, so run it again.
|
||||
clean acts once the forge reports the branch's pull request merged at the commit checked out,
|
||||
by any merge method. It fetches origin, fast-forwards the main checkout to origin's
|
||||
default branch, removes the chunk's worktree, then deletes the local branch; origin's
|
||||
@@ -337,7 +338,7 @@ def merged(run: Run, sleep: typing.Callable[[float], None] = time.sleep, finishe
|
||||
if ready:
|
||||
return done if isinstance(done, Failure) else f"Merged pull request #{number} ({method.removeprefix('--')}).{absent}"
|
||||
except Held as held:
|
||||
return Failure(f"pull request #{held.args[0] or '?'} has held the merge queue for {QUEUE_SECONDS // 60} minutes, so this one took no turn; run chunk-pr merge again")
|
||||
return Failure(f"the merge queue stayed held for {QUEUE_SECONDS // 60} minutes, last by pull request #{held.args[0] or '?'}, so this one took no turn; run chunk-pr merge again")
|
||||
except OSError as failure:
|
||||
return Failure(f"cannot take a turn in the merge queue, {file}: {failure.strerror}")
|
||||
waited = approved(number, run, sleep)
|
||||
@@ -357,7 +358,7 @@ def unplanned(run: Run, finishes: typing.Sequence[list[str]]) -> str | Failure:
|
||||
|
||||
|
||||
class Held(Exception):
|
||||
"""Another pull request, whose number is the argument, kept the merge queue for QUEUE_SECONDS."""
|
||||
"""Other merges kept the queue for QUEUE_SECONDS; the argument is the number of the pull request that held it last."""
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
||||
Reference in New Issue
Block a user