Skip to content

Commit b6c35ac

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 950cd26 commit b6c35ac

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
@@ -586,7 +586,10 @@ class ManagedSupervisor {
586586
createStart,
587587
error instanceof Error ? error : new Error(String(error))
588588
);
589-
this.logger.error("Failed to create workload", { error });
589+
this.logger.error("Failed to create workload", {
590+
runId: message.run.friendlyId,
591+
error,
592+
});
590593
}
591594
}
592595

@@ -671,9 +674,11 @@ class ManagedSupervisor {
671674

672675
async stop() {
673676
this.logger.log("Shutting down");
677+
// Stop the verifier first: its timer can otherwise fire mid-shutdown and
678+
// cold-create a workload on a node that is going down.
679+
this.warmStartVerifier?.stop();
674680
await this.workloadServer.stop();
675681
await this.workerSession.stop();
676-
this.warmStartVerifier?.stop();
677682

678683
// Optional services
679684
this.backpressureMonitor?.stop();

0 commit comments

Comments
 (0)