You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 45bff7a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/implementation/merge-handoff.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ A rebase moves the pull request's base. The guarded merge would then scan only t
63
63
| Cancel while waiting | the wait stops at once; the task closes; the job ends `cancelled`|
64
64
| Cancel during the guarded merge | before GitHub is asked, the merge stops and the job ends `cancelled`; once a merge attempt is submitting, a cancel is refused, as before |
65
65
| Shutdown | in shutdown's first, synchronous step, before requests drain, the job is told to stop: a wait ends at once, and nothing after it asks GitHub to merge. A preparation in progress stops only when preparation does, after the drain, as for a `prepare-merge` click; the job then stops without merging. The job is awaited before the store closes. While preparing or waiting, it stays `running` on disk. A guarded merge in progress stops as a click's does: if GitHub was not asked yet, the job stays `running`; if it was, the job ends as the merge attempt records it: `blocked` if GitHub refused (`failed` if the head changed, or the review changed while GitHub was asked), otherwise `submitted`, and the attempt reconciles as before |
66
-
| Ending the job fails | if the write that ends a job fails (a store error, not shutdown), the server logs "Could not end merge job …; it shows as running until the server restarts". The job stays `running` on disk: the page keeps following it, and a new click is refused while it runs. The next start settles it as below |
66
+
| Ending the job fails | if the write that ends a job fails, or reading the task after the job failed does, the server logs "Could not end merge job …; it shows as running until the server restarts" with the store's message. The job stays `running` on disk: the page keeps following it, and a new click is refused while it runs. The next start settles it as below |
67
67
| Restart | a `running` job that had not asked GitHub to merge becomes `failed` ("The server restarted before the merge finished"). One that had (its merge action ID is saved before the guarded merge starts) ends as its merge attempt records it: `merged`, `queued`, `submitted`, or `blocked` after a refusal, which also moves the task to approved, merge blocked (`failed`, task unchanged, when the head changed or the review changed while GitHub was asked). A `prepare-merge` action and a push marker are settled as before |
@@ -144,7 +147,7 @@ export class MergeJobCoordinator {
144
147
145
148
/** Startup settles a job that could not be ended now; until then it shows as running and a new click is refused. */
146
149
#unended(id: string,error: unknown): void{
147
-
if(!this.#closing)console.error(`Could not end merge job ${id}; it shows as running until the server restarts: ${(errorasError)?.message??String(error)}`);
150
+
console.error(`Could not end merge job ${id}; it shows as running until the server restarts: ${JSON.stringify((errorasError)?.message??String(error))}`);
Copy file name to clipboardExpand all lines: test/merge-job.test.ts
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -344,6 +344,7 @@ it.each([false, true])('ends submitted, not merged or queued, when GitHub accept
344
344
it.each(['finish','block']asconst)('reports a job it could not end (%s), which stays running and refuses a new click until startup settles it',asynckind=>{
expect(logged).toHaveBeenCalledWith(expect.stringMatching(newRegExp(`Could not end merge job ${started.id}; it shows as running until the server restarts: disk full`)));
357
+
expect(logged).toHaveBeenCalledWith(`Could not end merge job ${started.id}; it shows as running until the server restarts: "disk full"`);
0 commit comments