feat: print failed hook name

Add more details when a hook fails.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
pull/12440/head
Serge Logvinov 1 year ago
parent fe595b69d7
commit b0d163771e

@ -772,7 +772,7 @@ func (c *Client) waitForJob(obj runtime.Object, name string) (bool, error) {
if c.Type == batch.JobComplete && c.Status == "True" { if c.Type == batch.JobComplete && c.Status == "True" {
return true, nil return true, nil
} else if c.Type == batch.JobFailed && c.Status == "True" { } else if c.Type == batch.JobFailed && c.Status == "True" {
return true, errors.Errorf("job failed: %s", c.Reason) return true, errors.Errorf("job %s failed: %s", name, c.Reason)
} }
} }

Loading…
Cancel
Save