Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.9] 🌱 Refine v1beta2 summary #11499

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion util/conditions/v1beta2/merge_strategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func (d *defaultMergeStrategy) Merge(conditions []ConditionWithOwnerInfo, condit
if condition.Message != "" {
m += indentIfMultiline(condition.Message)
} else {
m += " No additional info provided"
m += fmt.Sprintf(" %s", condition.Reason)
}
messages = append(messages, m)
}
Expand Down
6 changes: 3 additions & 3 deletions util/conditions/v1beta2/summary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func TestSummary(t *testing.T) {
options: []SummaryOption{ForConditionTypes{"A", "B", "!C"}, NegativePolarityConditionTypes{"!C"}},
want: &metav1.Condition{
Type: clusterv1.AvailableV1Beta2Condition,
Status: metav1.ConditionFalse, // False because there is one issue
Reason: issuesReportedReason, // Using a generic reason
Message: "* !C: No additional info provided", // messages from all the issues & unknown conditions (info dropped); since message is empty, a default one is added
Status: metav1.ConditionFalse, // False because there is one issue
Reason: issuesReportedReason, // Using a generic reason
Message: "* !C: Reason-!C", // messages from all the issues & unknown conditions (info dropped); since message is empty, a default one is added
},
},
{
Expand Down