Skip to content

Commit 7d4c6e0

Browse files
committed
fix: attribute fallback create failures and stop verifier before servers
Review follow-ups: the workload-create error log now carries the run id (fallback creates run outside the dequeue wide event, so the log was the only attribution), and the verifier stops before the workload server and session so its timer can't cold-create a workload mid-shutdown.
1 parent 520fe14 commit 7d4c6e0

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

apps/supervisor/src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,10 @@ class ManagedSupervisor {
606606
{ backend: this.workloadManagerBackend, outcome: "error" },
607607
(performance.now() - createStart) / 1000
608608
);
609-
this.logger.error("Failed to create workload", { error });
609+
this.logger.error("Failed to create workload", {
610+
runId: message.run.friendlyId,
611+
error,
612+
});
610613
}
611614
}
612615

@@ -691,9 +694,11 @@ class ManagedSupervisor {
691694

692695
async stop() {
693696
this.logger.log("Shutting down");
697+
// Stop the verifier first: its timer can otherwise fire mid-shutdown and
698+
// cold-create a workload on a node that is going down.
699+
this.warmStartVerifier?.stop();
694700
await this.workloadServer.stop();
695701
await this.workerSession.stop();
696-
this.warmStartVerifier?.stop();
697702

698703
// Optional services
699704
this.backpressureMonitor?.stop();

0 commit comments

Comments
 (0)