Merge pull request #1815 from fiunchinho/bugfix/incorrect_log_messages

Logging real name of the failing hook
pull/1817/head
Matt Butcher 8 years ago committed by GitHub
commit 6f77869d41

@ -871,14 +871,14 @@ func (s *ReleaseServer) execHook(hs []*release.Hook, name, namespace, hook strin
b := bytes.NewBufferString(h.Manifest) b := bytes.NewBufferString(h.Manifest)
if err := kubeCli.Create(namespace, b); err != nil { if err := kubeCli.Create(namespace, b); err != nil {
log.Printf("warning: Release %q pre-install %s failed: %s", name, h.Path, err) log.Printf("warning: Release %q %s %s failed: %s", name, hook, h.Path, err)
return err return err
} }
// No way to rewind a bytes.Buffer()? // No way to rewind a bytes.Buffer()?
b.Reset() b.Reset()
b.WriteString(h.Manifest) b.WriteString(h.Manifest)
if err := kubeCli.WatchUntilReady(namespace, b, timeout); err != nil { if err := kubeCli.WatchUntilReady(namespace, b, timeout); err != nil {
log.Printf("warning: Release %q pre-install %s could not complete: %s", name, h.Path, err) log.Printf("warning: Release %q %s %s could not complete: %s", name, hook, h.Path, err)
return err return err
} }
h.LastRun = timeconv.Now() h.LastRun = timeconv.Now()

Loading…
Cancel
Save