Skip to content

Commit 3fded0a

Browse files
committed
Match socket emit messages to current latest in main
1 parent 53ab5a8 commit 3fded0a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/cli-v3/src/entryPoints/deploy-run-controller.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,7 @@ class ProdWorker {
822822
socket.emit("SET_STATE", {
823823
version: "v1",
824824
attemptFriendlyId: this.attemptFriendlyId,
825+
attemptNumber: this.attemptNumber ? String(this.attemptNumber) : undefined,
825826
});
826827

827828
try {
@@ -853,9 +854,21 @@ class ProdWorker {
853854
return;
854855
}
855856

857+
if (!this.attemptNumber) {
858+
logger.error("Missing attempt number", { status: this.#status });
859+
860+
this.#emitUnrecoverableError(
861+
"NoAttemptNumber",
862+
"Attempt number not set while resuming from paused state"
863+
);
864+
865+
return;
866+
}
867+
856868
socket.emit("READY_FOR_RESUME", {
857-
version: "v1",
869+
version: "v2",
858870
attemptFriendlyId: this.attemptFriendlyId,
871+
attemptNumber: this.attemptNumber,
859872
type: this.nextResumeAfter,
860873
});
861874

0 commit comments

Comments
 (0)