Skip to content

Commit cbaaa3b

Browse files
nicktrnmatt-aitken
authored andcommitted
Fix restored container names
1 parent 26e872a commit cbaaa3b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

apps/coordinator/src/checkpointer.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,15 @@ export class Checkpointer {
422422

423423
this.#logger.log("Checkpointing:", { options });
424424

425-
const containterName = this.#getRunContainerName(runId, attemptNumber);
425+
const containterName = this.#getRunContainerName(runId);
426+
const containterNameWithAttempt = this.#getRunContainerName(runId, attemptNumber);
426427

427428
// Create checkpoint (docker)
428429
if (this.#dockerMode) {
429430
try {
430431
if (this.opts.forceSimulate || !this.#canCheckpoint) {
431432
this.#logger.log("Simulating checkpoint");
432-
this.#logger.debug(await $$`docker pause ${containterName}`);
433+
this.#logger.debug(await $$`docker pause ${containterNameWithAttempt}`);
433434
} else {
434435
if (this.simulateCheckpointFailure) {
435436
if (performance.now() < this.simulateCheckpointFailureSeconds * 1000) {
@@ -440,11 +441,11 @@ export class Checkpointer {
440441

441442
if (leaveRunning) {
442443
this.#logger.debug(
443-
await $$`docker checkpoint create --leave-running ${containterName} ${exportLocation}`
444+
await $$`docker checkpoint create --leave-running ${containterNameWithAttempt} ${exportLocation}`
444445
);
445446
} else {
446447
this.#logger.debug(
447-
await $$`docker checkpoint create ${containterName} ${exportLocation}`
448+
await $$`docker checkpoint create ${containterNameWithAttempt} ${exportLocation}`
448449
);
449450
}
450451
}

0 commit comments

Comments
 (0)