Skip to content

Commit e25a08e

Browse files
committed
make attempt number update more explicit, improve logs
1 parent 06a7899 commit e25a08e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,12 @@ export class RunExecution {
469469

470470
// Also set or update the attempt number - we do this to detect illegal attempt number changes, e.g. from stalled runners coming back online
471471
const attemptNumber = start.data.run.attemptNumber;
472-
if (attemptNumber) {
472+
if (attemptNumber && attemptNumber > 0) {
473473
this.currentAttemptNumber = attemptNumber;
474474
} else {
475-
this.sendDebugLog("ERROR: no attempt number returned from start attempt");
475+
this.sendDebugLog("ERROR: invalid attempt number returned from start attempt", {
476+
attemptNumber: String(attemptNumber),
477+
});
476478
}
477479

478480
const metrics = this.measureExecutionMetrics({

0 commit comments

Comments
 (0)