Skip to content

Commit

Permalink
Merge pull request #11661 from sbueringer/pr-hook-msg
Browse files Browse the repository at this point in the history
🌱 Fix formatting of blocking lifecycle hook condition message
  • Loading branch information
k8s-ci-robot authored Jan 10, 2025
2 parents da04ac5 + dcede42 commit 5a7ab0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exp/topology/scope/hookresponsetracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ func (h *HookResponseTracker) AggregateMessage() string {

hookAndMessages := []string{}
for hook, message := range blockingHooks {
hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking: %s", hook, message))
if message == "" {
hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking", hook))
} else {
hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking: %s", hook, message))
}
}
return strings.Join(hookAndMessages, "; ")
}

0 comments on commit 5a7ab0b

Please sign in to comment.