Skip to content

Commit

Permalink
Show actual log during custom wait rule if asked specifically
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Aggarwal <[email protected]>
  • Loading branch information
rohitagg2020 committed Dec 9, 2024
1 parent 52d3484 commit 6daa95f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/kapp/resourcesmisc/custom_waiting_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func (s CustomWaitingResource) IsDoneApplying() DoneApplyState {
}

unblockChangeMsg := ""
message := "No failing or successful conditions found"

// If no failure conditions found, check on successful ones
for _, condMatcher := range s.waitRule.ConditionMatchers {
Expand All @@ -151,6 +152,9 @@ func (s CustomWaitingResource) IsDoneApplying() DoneApplyState {
cond.Type, condMatcher.Status, cond.Reason)
continue
}
if cond.Message != "" {
message = cond.Message
}
}
}
}
Expand All @@ -164,7 +168,7 @@ func (s CustomWaitingResource) IsDoneApplying() DoneApplyState {
return DoneApplyState{Done: false, UnblockChanges: true, Message: unblockChangeMsg}
}

return DoneApplyState{Done: false, Message: "No failing or successful conditions found"}
return DoneApplyState{Done: false, Message: message}
}

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

0 comments on commit 6daa95f

Please sign in to comment.