Skip to content

Commit dc144aa

Browse files
authored
Show actual log during custom wait rule if asked specifically (#1038)
Signed-off-by: Rohit Aggarwal <[email protected]>
1 parent 52d3484 commit dc144aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/kapp/resourcesmisc/custom_waiting_resource.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (s CustomWaitingResource) IsDoneApplying() DoneApplyState {
131131
}
132132

133133
unblockChangeMsg := ""
134+
message := "No failing or successful conditions found"
134135

135136
// If no failure conditions found, check on successful ones
136137
for _, condMatcher := range s.waitRule.ConditionMatchers {
@@ -151,6 +152,9 @@ func (s CustomWaitingResource) IsDoneApplying() DoneApplyState {
151152
cond.Type, condMatcher.Status, cond.Reason)
152153
continue
153154
}
155+
if cond.Message != "" {
156+
message = cond.Message
157+
}
154158
}
155159
}
156160
}
@@ -164,7 +168,7 @@ func (s CustomWaitingResource) IsDoneApplying() DoneApplyState {
164168
return DoneApplyState{Done: false, UnblockChanges: true, Message: unblockChangeMsg}
165169
}
166170

167-
return DoneApplyState{Done: false, Message: "No failing or successful conditions found"}
171+
return DoneApplyState{Done: false, Message: message}
168172
}
169173

170174
func (s CustomWaitingResource) hasTimeoutOccurred(timeout string, key string) bool {

0 commit comments

Comments
 (0)