Skip to content

Commit 453d267

Browse files
committed
add previous run id to more debug logs
1 parent 0538f85 commit 453d267

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/cli-v3/src/entryPoints/managed/controller.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ export class ManagedRunController {
253253

254254
this.waitForNextRunLock = true;
255255

256+
const previousRunId = this.runFriendlyId;
257+
256258
try {
257259
if (!this.warmStartClient) {
258260
this.sendDebugLog({
@@ -262,8 +264,6 @@ export class ManagedRunController {
262264
this.exitProcess(this.successExitCode);
263265
}
264266

265-
const previousRunId = this.runFriendlyId;
266-
267267
if (this.currentExecution?.taskRunEnv) {
268268
this.sendDebugLog({
269269
runId: this.runFriendlyId,
@@ -307,14 +307,14 @@ export class ManagedRunController {
307307
};
308308

309309
this.sendDebugLog({
310-
runId: this.runFriendlyId,
310+
runId: previousRunId,
311311
message: "waitForNextRun: connected to warm start service",
312312
properties: warmStartConfig,
313313
});
314314

315315
if (!connectionTimeoutMs || !keepaliveMs) {
316316
this.sendDebugLog({
317-
runId: this.runFriendlyId,
317+
runId: previousRunId,
318318
message: "waitForNextRun: warm starts disabled after connect",
319319
properties: warmStartConfig,
320320
});
@@ -329,7 +329,7 @@ export class ManagedRunController {
329329

330330
if (!nextRun) {
331331
this.sendDebugLog({
332-
runId: this.runFriendlyId,
332+
runId: previousRunId,
333333
message: "waitForNextRun: warm start failed, shutting down",
334334
properties: warmStartConfig,
335335
});
@@ -339,7 +339,7 @@ export class ManagedRunController {
339339
this.warmStartCount++;
340340

341341
this.sendDebugLog({
342-
runId: this.runFriendlyId,
342+
runId: previousRunId,
343343
message: "waitForNextRun: got next run",
344344
properties: {
345345
...warmStartConfig,
@@ -356,7 +356,7 @@ export class ManagedRunController {
356356
}).finally(() => {});
357357
} catch (error) {
358358
this.sendDebugLog({
359-
runId: this.runFriendlyId,
359+
runId: previousRunId,
360360
message: "waitForNextRun: unexpected error",
361361
properties: { error: error instanceof Error ? error.message : String(error) },
362362
});

0 commit comments

Comments
 (0)