Skip to content

Commit

Permalink
Skip unfinished jobs in krel history
Browse files Browse the repository at this point in the history
We skip those jobs now and don't error-out to still produce usable
results.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
  • Loading branch information
saschagrunert committed Dec 1, 2023
1 parent 3801935 commit ab091c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/gcp/gcb/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ func (h *History) Run() error {
end := job.Timing["BUILD"].EndTime
logs := job.LogUrl

if start == "" || end == "" {
logrus.Infof("Skipping unfinished job from %s with ID: %s", job.CreateTime, job.Id)
continue
}

// Calculate the duration of the job
const layout = "2006-01-02T15:04:05.99Z"
tStart, err := h.impl.ParseTime(layout, start)
Expand Down

0 comments on commit ab091c9

Please sign in to comment.