always print name of resources created by must-gather#22561
always print name of resources created by must-gather#22561deads2k merged 2 commits intoopenshift:masterfrom
Conversation
sanchezl
commented
Apr 12, 2019
| if !o.Keep { | ||
| defer func() { | ||
| err = o.Client.CoreV1().Namespaces().Delete(ns.Name, nil) | ||
| if err = o.Client.CoreV1().Namespaces().Delete(ns.Name, nil); err == nil { |
There was a problem hiding this comment.
Don't pretend to scope to the if.
| if !o.Keep { | ||
| defer func() { | ||
| err = o.Client.RbacV1().ClusterRoleBindings().Delete(clusterRoleBinding.Name, &metav1.DeleteOptions{}) | ||
| if err = o.Client.RbacV1().ClusterRoleBindings().Delete(clusterRoleBinding.Name, &metav1.DeleteOptions{}); err == nil { |
There was a problem hiding this comment.
this would stomp the failing if from above. seems like you may want a channel?
038f9db to
ed1c99d
Compare
| err2 := o.Client.CoreV1().Namespaces().Delete(ns.Name, nil) | ||
| if err2 != nil { | ||
| if err != nil { | ||
| err = fmt.Errorf("%v\n%v", err, err2) |
There was a problem hiding this comment.
yeah... don't do this. use a channel if we need a channel. For now, just suppress the error code and fmt.Printf() it out.
ed1c99d to
85475e8
Compare
| defer func() { | ||
| err = o.Client.CoreV1().Namespaces().Delete(ns.Name, nil) | ||
| if err := o.Client.CoreV1().Namespaces().Delete(ns.Name, nil); err != nil { | ||
| fmt.Printf("%v", err) |
There was a problem hiding this comment.
On monday, use Fprintf to direct to the error stream and put a newline on it, but this better than where we are today and in the hopes of landing for a beta build I'll merge.
|
/retest lgetm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, sanchezl The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
1 similar comment
|
/retest |
|
we need a debug tool to debug the failures this is flaking on. merging |