Skip to content

Commit

Permalink
keep processing partial discovery result when failure occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
roycaihw committed Jun 15, 2020
1 parent 631eedf commit 8efafc3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/trigger/discovery_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ func (mt *MigrationTrigger) processDiscovery(ctx context.Context) {
return true, nil
})
if err != nil {
utilruntime.HandleError(fmt.Errorf("Abort processing discovery document: %v", err))
return
if resources == nil {
utilruntime.HandleError(fmt.Errorf("Abort processing discovery document: %v", err))
return
}
klog.V(4).Infof("got partial error retrieving discovery document: %v; processing partial result", r)
}
mt.heartbeat = metav1.Now()
for _, l := range resources {
Expand Down

0 comments on commit 8efafc3

Please sign in to comment.