Commit 04401ce
committed
pkg/monitortests/clusterversionoperator/legacycvomonitortests: Structured condition types
For reasons that are not clear to me, e065648 (switch operators to
use interval, 2021-03-22, #26034) moved testOperatorState from using:
condition := monitorapi.GetOperatorConditionStatus(event.Message)
to using:
strings.Contains(eventInterval.Message, fmt.Sprintf("%v", interestingCondition))
But that can lead to misidentification like [1]:
: [bz-service-ca] clusteroperator/service-ca should not change condition/Available
Run #0: Failed 1h24m4s
{ 1 unexpected clusteroperator state transitions during e2e test run
Oct 05 16:28:56.647 - 1s W clusteroperator/service-ca condition/Progressing reason/_ManagedDeploymentsAvailable status/True Progressing: \nProgressing: service-ca does not have available replicas}
That mentions "Available" as part of the reason, but the condition
type itself is Progressing, so it should not contribute to a "should
not change condition/Available" violation.
There's a chance that e065648's move away from
GetOperatorConditionStatus was because the function was broken at that
time, but e00ec39 (Port cluster operator state intervals,
2023-09-19, #28262) recently adjusted its implementation, and
pkg/monitortests/clusterversionoperator/operatorstateanalyzer/operator.go's
intervalsFromEvents_OperatorStatus has used GetOperatorConditionStatus
since the file was created in 4dfccfc (rebrand invariant tests as
monitor tests, 2023-08-14, #28185) and has all the way back to when
the intervalsFromEvents_OperatorStatus function was created in
bbd9949 (create operator intervals from events, 2021-03-22, #26034,
the same pull request as e065648).
[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-release-master-ci-4.15-e2e-azure-ovn-upgrade/17099449085649264641 parent d5d3596 commit 04401ce
File tree
1 file changed
+7
-1
lines changed- pkg/monitortests/clusterversionoperator/legacycvomonitortests
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
| |||
0 commit comments