From e36bcac7bf0064abd499ecfa9a90567deb9d20b4 Mon Sep 17 00:00:00 2001 From: Trey Ivy Date: Tue, 12 Nov 2024 20:11:28 +0000 Subject: [PATCH] finish processing checks --- pkg/summary/summarizer.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/summary/summarizer.go b/pkg/summary/summarizer.go index 611926b..47bd84e 100644 --- a/pkg/summary/summarizer.go +++ b/pkg/summary/summarizer.go @@ -84,6 +84,19 @@ func (s Summarizer) summarize(it *events.BuildEventIterator) (*Summary, error) { func (s Summarizer) FinishProcessing() (*Summary, error) { // If problems are ignored for the exit code, return immediately. slog.Debug("processing", "err", "none") + + if s.summary.EndedAt == nil { + now := time.Now() + s.summary.EndedAt = &now + } + + if s.summary.ExitCode == nil { + s.summary.ExitCode = &ExitCode{ + Code: 1000, + Name: "UNKNOWN", + } + } + if !shouldIgnoreProblems(s.summary.ExitCode) { slog.Debug("problems found", "err", "none") // Add any detected test problems.