-
Bug
-
Resolution: Done
-
Critical
-
None
-
4.12.0
-
None
-
Critical
-
None
-
3
-
OTA 223
-
1
-
False
-
Description of problem:
Risks defined like this get serialized like:
$ curl -s 'https://api.openshift.com/api/upgrades_info/graph?channel=candidate-4.11' | jq -c '.conditionalEdges[].risks[].matchingRules[] | select(.type == "Always")' | sort | uniq -c 3 {"type":"Always","promql":{"promql":""}}
But we want just {"type": "Always"} to avoid:
W0817 01:12:29.073438 1 cincinnati.go:221] Conditional update to 4.11.0, risk "RPMOSTreeTimeout", has empty pruned matchingRules; dropping this target to avoid rejections when pushing to the Kubernetes API server. Pruning results: the 'promql' property is not valid for 'type: Always' conditions
Version-Release number of selected component (if applicable):
5.0.0
How reproducible:
100%
Steps to Reproduce:
1. Point Cincinnati at the current graph-data tip, or any recent tip, because we have had things like this since June:
$ git --no-pager log -G 'type: Always' --date=short --format='%ad %h %s' blocked-edges 2022-08-16 18582fb Adding Conditional update edge from 4.10 to 4.11 because of BZ:2111817 2022-06-16 8467cfc Adding conditional risk ClusterVersionPreconditionCheck for 4.11.0-fc.0
Actual results:
$ curl -s 'https://api.openshift.com/api/upgrades_info/graph?channel=candidate-4.11' | jq -c '.conditionalEdges[].risks[].matchingRules[] | select(.type == "Always")' | sort | uniq -c 3 {"type":"Always","promql":{"promql":""}}
Expected results:
$ curl -s 'https://api.openshift.com/api/upgrades_info/graph?channel=candidate-4.11' | jq -c '.conditionalEdges[].risks[].matchingRules[] | select(.type == "Always")' | sort | uniq -c 3 {"type":"Always"}
Additional info:
Need something like omitempty around here.