Skip to content

Commit

Permalink
Issue argoproj#1132 - Fix panic in ttl controller (argoproj#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmt authored and jackywu committed Jan 15, 2019
1 parent 859fc6a commit a1e0252
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 a1e0252

Please sign in to comment.