From b9392e2087c5d1c4cb968d4c7eae111e12098377 Mon Sep 17 00:00:00 2001 From: kyrylomiro Date: Tue, 5 Mar 2024 14:00:45 +0100 Subject: [PATCH] Fix nil ref error --- pkg/actionsmetrics/event_reader.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/actionsmetrics/event_reader.go b/pkg/actionsmetrics/event_reader.go index 54f06c7ed8..6920a2ea5f 100644 --- a/pkg/actionsmetrics/event_reader.go +++ b/pkg/actionsmetrics/event_reader.go @@ -274,11 +274,8 @@ func (reader *EventReader) fetchAndParseWorkflowJobLogs(ctx context.Context, e * } if strings.HasPrefix(line, "Job is about to start running on the runner:") || strings.HasPrefix(line, "Current runner version:") { - if startedTime != nil { - st, err := time.Parse(time.RFC3339, timestamp) - if err != nil { - return - } + if startedTime == nil { + st, _ := time.Parse(time.RFC3339, timestamp) startedTime = &st continue }