Skip to content

Commit 5fd101f

Browse files
committed
test/extended/cli/adm_upgrade/recommend: TestRiskA PromQL use max_over_time
Avoid failing on rare flakes like [1]: : [Serial][sig-cli] oc adm upgrade recommend When the update service has conditional recommendations runs successfully with conditional recommendations to the --version target [Suite:openshift/conformance/serial] 22s ... Could not evaluate exposure to update risk TestRiskA (invalid PromQL result length must be one, but is 0) where there was presumably some kind of hiccup in scraping the cluster-version operator. Instead of expecting to find cluster_version at the single point in time "now", accept it if we find that metric anywhere in the past hour. [1]: https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-techpreview-serial/1959321955551154176
1 parent cc8ae10 commit 5fd101f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/extended/cli/adm_upgrade/recommend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ No updates available. You may still upgrade to a specific release image.*`)
141141
"url": "https://example.com/testRiskA",
142142
"name": "TestRiskA",
143143
"message": "This is a test risk.",
144-
"matchingRules": [{"type": "PromQL", "promql": {"promql": "group(cluster_version)"}}]
144+
"matchingRules": [{"type": "PromQL", "promql": {"promql": "group(max_over_time(cluster_version[1h]))"}}]
145145
}
146146
]
147147
}

0 commit comments

Comments
 (0)