Skip to content

Commit

Permalink
fix nil ref when pipeline is still running (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: kyrylomiro <[email protected]>
  • Loading branch information
kyrylomiro and kyrylomiro authored Mar 5, 2024
1 parent ec845be commit 03bc288
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/actionsmetrics/event_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,14 @@ func (reader *EventReader) fetchAndParseWorkflowJobLogs(ctx context.Context, e *
completedTime, _ = time.Parse(time.RFC3339, timestamp)
}
}()
if startedTime == nil {
return &ParseResult{
ExitCode: exitCode,
QueueTime: startedTime.Sub(queuedTime),
RunTime: time.Duration(0),
}, nil

}
return &ParseResult{
ExitCode: exitCode,
QueueTime: startedTime.Sub(queuedTime),
Expand Down

0 comments on commit 03bc288

Please sign in to comment.