diff options
Diffstat (limited to 'third_party/gerrit-queue/submitqueue')
-rw-r--r-- | third_party/gerrit-queue/submitqueue/runner.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/third_party/gerrit-queue/submitqueue/runner.go b/third_party/gerrit-queue/submitqueue/runner.go index 6e4a54a71bb9..5ac4b04db0fd 100644 --- a/third_party/gerrit-queue/submitqueue/runner.go +++ b/third_party/gerrit-queue/submitqueue/runner.go @@ -128,6 +128,10 @@ func (r *Runner) Trigger(fetchOnly bool) error { // we now need to check CI feedback: // wipSerie might have failed CI in the meantime for _, c := range r.wipSerie.ChangeSets { + if c == nil { + l.Error("BUG: changeset is nil") + continue + } if c.Verified < 0 { l.WithField("failingChangeset", c).Warnf("wipSerie failed CI in the meantime, discarding.") r.wipSerie = nil @@ -137,6 +141,10 @@ func (r *Runner) Trigger(fetchOnly bool) error { // it might still be waiting for CI for _, c := range r.wipSerie.ChangeSets { + if c == nil { + l.Error("BUG: changeset is nil") + continue + } if c.Verified == 0 { l.WithField("pendingChangeset", c).Warnf("still waiting for CI feedback in wipSerie, going back to sleep.") // break the loop, take a look at it at the next trigger. @@ -158,8 +166,8 @@ func (r *Runner) Trigger(fetchOnly bool) error { } r.wipSerie = nil } else { - // should never be reached?! - log.Warnf("reached branch we should never reach") + l.Error("BUG: wipSerie is not autosubmittable") + r.wipSerie = nil } } |