Skip to content

Commit de01df4

Browse files
committed
ToSquash: Fix annotation key runbook_url
1 parent 7c4de67 commit de01df4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/cvo/availableupdates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ func alertsToRisks(alerts []prometheusv1.Alert) []configv1.ConditionalUpdateRisk
566566

567567
var runbook string
568568
alertURL := "https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound"
569-
if runbook = string(alert.Annotations["runbook"]); runbook == "" {
569+
if runbook = string(alert.Annotations["runbook_url"]); runbook == "" {
570570
runbook = "<alert does not have a runbook_url annotation>"
571571
} else {
572572
alertURL = runbook

pkg/cvo/availableupdates_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ func Test_evaluateAlertConditions(t *testing.T) {
10111011
model.LabelName("summary"): model.LabelValue("summary"),
10121012
model.LabelName("description"): model.LabelValue("description"),
10131013
model.LabelName("message"): model.LabelValue("message"),
1014-
model.LabelName("runbook"): model.LabelValue("http://runbook.example.com/runbooks/abc.md"),
1014+
model.LabelName("runbook_url"): model.LabelValue("http://runbook.example.com/runbooks/abc.md"),
10151015
},
10161016
ActiveAt: t1,
10171017
},
@@ -1033,7 +1033,7 @@ func Test_evaluateAlertConditions(t *testing.T) {
10331033
model.LabelName("summary"): model.LabelValue("summary"),
10341034
model.LabelName("description"): model.LabelValue("description"),
10351035
model.LabelName("message"): model.LabelValue("message"),
1036-
model.LabelName("runbook"): model.LabelValue("http://runbook.example.com/runbooks/bbb.md"),
1036+
model.LabelName("runbook_url"): model.LabelValue("http://runbook.example.com/runbooks/bbb.md"),
10371037
},
10381038
ActiveAt: t1,
10391039
},
@@ -1049,7 +1049,7 @@ func Test_evaluateAlertConditions(t *testing.T) {
10491049
model.LabelName("summary"): model.LabelValue("summary"),
10501050
model.LabelName("description"): model.LabelValue("description"),
10511051
model.LabelName("message"): model.LabelValue("message"),
1052-
model.LabelName("runbook"): model.LabelValue("http://runbook.example.com/runbooks/bbb.md"),
1052+
model.LabelName("runbook_url"): model.LabelValue("http://runbook.example.com/runbooks/bbb.md"),
10531053
},
10541054
ActiveAt: t2,
10551055
},

0 commit comments

Comments
 (0)