diff --git a/cmd/schedule-builder/cmd/markdown.go b/cmd/schedule-builder/cmd/markdown.go index 15e8e356de6..e35bcea890f 100644 --- a/cmd/schedule-builder/cmd/markdown.go +++ b/cmd/schedule-builder/cmd/markdown.go @@ -173,6 +173,11 @@ func updatePatchSchedule(refTime time.Time, schedule PatchSchedule, eolBranches removeSchedules := []int{} for i, sched := range schedule.Schedules { for { + if sched.Next == nil { + logrus.Warnf("Next release not set for %s, skipping", sched.Release) + break + } + eolDate, err := time.Parse(refDate, sched.EndOfLifeDate) if err != nil { return fmt.Errorf("parse end of life date: %w", err) diff --git a/cmd/schedule-builder/cmd/markdown_test.go b/cmd/schedule-builder/cmd/markdown_test.go index ea60d5578b6..6c817f56183 100644 --- a/cmd/schedule-builder/cmd/markdown_test.go +++ b/cmd/schedule-builder/cmd/markdown_test.go @@ -366,6 +366,9 @@ func TestUpdatePatchSchedule(t *testing.T) { EndOfLifeDate: "2025-01-01", MaintenanceModeStartDate: "2024-12-01", }, + { // next not set + Release: "1.29", + }, { // EOL Release: "1.20", EndOfLifeDate: "2023-01-01", @@ -423,6 +426,9 @@ func TestUpdatePatchSchedule(t *testing.T) { }, }, }, + { + Release: "1.29", + }, }, UpcomingReleases: []*PatchRelease{ {