Skip to content

Commit e035df3

Browse files
committed
Fix spinner race condition and remove unused autoSelected field
- Clear lastStatus in stopLocked() to prevent idle timer callback from restarting spinner after Stop() - Remove unused autoSelected field from logTarget struct
1 parent 776eb45 commit e035df3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pkg/cmd/ci/logs.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ type logTarget struct {
182182
jobStatus string
183183
workflowPath string
184184
noLogsMessage string
185-
autoSelected bool
186185
hasAlternates bool
187186
alternateLabel string
188187
}
@@ -291,6 +290,7 @@ func (r *logFollowReporter) stopLocked() {
291290
}
292291
r.spinner.Stop()
293292
r.spinner = nil
293+
r.lastStatus = ""
294294
}
295295

296296
type followLogWriter struct {
@@ -575,7 +575,6 @@ func resolveLogTarget(resp *civ1.GetRunStatusResponse, originalID, jobKey, workf
575575
jobKey: targetJob.JobKey,
576576
jobStatus: targetJob.Status,
577577
workflowPath: workflowPath,
578-
autoSelected: jobKey == "",
579578
hasAlternates: len(targetJob.Attempts) > 1,
580579
alternateLabel: alternateLabel,
581580
}, nil

0 commit comments

Comments
 (0)