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 10d93ee
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(listener): let stock's mail hold replace the manager ready window
The listener mails a just-deployed manager at once. Interchange's
hub-sessions sidecar handler parks mail to a run whose deploy is not
recorded, redrives it when the deploy records the run's key, and drops it
after HUB_MAIL_HOLD_TTL_MS. The listener's ready window, wake poll and its
unwoken, retry and unwokenAgain steps are gone, as are the listener and
manager waits #713 published in release.json.
HUB_MAIL_HOLD_TTL_MS keeps its fifteen-minute default and is the one source
for the hub's start grace, the time a manager may sit on its sidecar
unstarted, the hold on a new deploy ask and the time a queued head may wait
to start, so a failed manager start is asked again once the hold lapses.
Copy file name to clipboardExpand all lines: .env.example
+3-9Lines changed: 3 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -52,20 +52,12 @@ HUB_DATA_DIR=./tmp/hub-data
52
52
# TRIAGE_RECONCILE_INTERVAL_MS=
53
53
# Milliseconds before a pass that could not reach a listener tries again, doubling to two minutes. Default 15000.
54
54
# TRIAGE_RECONCILE_RETRY_MS=
55
-
# Milliseconds a listener waits for a just-deployed manager to reach a sidecar before it gives up on it. Default 120000.
56
-
# TRIAGE_MANAGER_READY_MS=
57
-
# Milliseconds a just-deployed manager may have no sidecar and still hold its pull request. Default 120000.
58
-
# TRIAGE_MANAGER_START_GRACE_MS=
59
-
# Milliseconds a manager waiting on CI or a reviewer waits between checks. Default 30000.
60
-
# TRIAGE_MANAGER_POLL_MS=
61
-
# Milliseconds between a listener's checks on whether its manager reached a sidecar. Default 2000.
62
-
# TRIAGE_WAKE_POLL_MS=
63
55
64
56
# Pull request heads the reconciler lets a tenant have queued or running at once. Default 5.
65
57
# TRIAGE_MAX_IN_FLIGHT=
66
58
# Milliseconds after a head is capped by runs that never started before it gets a fresh set of attempts. Default 21600000.
67
59
# TRIAGE_CAPPED_RETRY_MS=
68
-
# Milliseconds without a new webhook event before a pull request's events go out as one triage run; at most four times this after the first. Default 30000.
60
+
# Milliseconds without a new webhook event before a pull request's events go out as one triage run; at most four times this after the first, which must stay under HUB_MAIL_HOLD_TTL_MS. Default 30000.
69
61
# TRIAGE_COALESCE_QUIET_MS=
70
62
# Milliseconds a pull request may wait for Triage to start before the hub logs triage_stalled, shows it in the portal and emails the workspace's owners and admins. Default 300000.
awaitdb.execute(sql`UPDATE corbits_triage.manager_state SET state = state || ${JSON.stringify({overdueWokenAt: earlier.toISOString(),deployAskedAt: earlier.toISOString(),claimedAt: newDate(earlier.getTime()+1_000).toISOString()})}::jsonb WHERE key = ${`mgr:github:${RECORD.name}#7`}`);
287
288
awaitwakeOverdue(TENANT);
288
289
expect(mailed).toEqual([woken,woken]);
@@ -332,7 +333,7 @@ test("PostgreSQL: an overdue wake is recorded only once it succeeded, and one pu
332
333
333
334
test("PostgreSQL: a manager deployed without a sidecar past the startup window is not mailed, and the listener is",async()=>{
awaitdb.execute(sql`UPDATE corbits_triage.manager_state SET state = jsonb_set(state, '{receivedAt}', to_jsonb(${earlier}::text)) WHERE key LIKE '%:run_reviewer'`);
test("PostgreSQL: a manager on its sidecar five minutes without running gives up the pull request, and the reaper ends it but never the listener",async()=>{
473
+
test("PostgreSQL: a manager on its sidecar past the mail hold without running gives up the pull request, and the reaper ends it but never the listener",async()=>{
0 commit comments