Skip to content

Commit

Permalink
Issue #1132 - Fix panic in ttl controller (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmt authored Dec 28, 2018
1 parent e09d9ad commit e078032
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion workflow/ttlcontroller/ttlcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ func (c *Controller) processNextWorkItem() bool {

// enqueueWF conditionally queues a workflow to the ttl queue if it is within the deletion period
func (c *Controller) enqueueWF(obj interface{}) {
wf, err := util.FromUnstructured(obj.(*unstructured.Unstructured))
un, ok := obj.(*unstructured.Unstructured)
if !ok {
log.Warnf("'%v' is not an unstructured", obj)
return
}
wf, err := util.FromUnstructured(un)
if err != nil {
log.Warnf("Failed to unmarshal workflow %v object: %v", obj, err)
return
Expand Down

0 comments on commit e078032

Please sign in to comment.