Skip to content

Commit

Permalink
fix: retry watcher failure causes infinite loop (#8786)
Browse files Browse the repository at this point in the history
(cherry picked from commit e873381)
  • Loading branch information
eecsliu authored and determined-ci committed Feb 1, 2024
1 parent 6a21d44 commit 5edfd81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion master/internal/rm/kubernetesrm/informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ func (i *informer) run(ctx context.Context) {
i.syslog.Debugf("%s informer is starting", i.name)
for {
select {
case event := <-i.resultChan:
case event, ok := <-i.resultChan:
if !ok {
i.syslog.Error("retry watcher stopped unexpectedly")
panic(fmt.Errorf("retry watcher on %s stopped unexpectedly", i.name))
}
if event.Type == watch.Error {
i.syslog.Warnf("%s informer emitted error %+v", i.name, event)
continue
Expand Down

0 comments on commit 5edfd81

Please sign in to comment.