-
Notifications
You must be signed in to change notification settings - Fork 205
OTA-1627: pkg/cincinnati: Centralize release metadata parsing #1231
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
base: main
Are you sure you want to change the base?
Conversation
@wking: This pull request references OTA-1627 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wking The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
763a55e
to
b200ebc
Compare
Instead of carring similar code in the payload and Cincinnati packages, centralize in one place to make maintenance easier. And with the logic centralized, I've also put some time into hardening the channel parsing, to grumble about some possible issues. For payload loading, errors get a logged warning, but are not fatal. Having the CVO come up with logged warnings still allows cluster admins to update into a fix. But a crash-looping CVO would not notice ClusterVersion spec.desiredUpdate changes or be able to roll out a requested update into a fix. For Cincinnati processing, errors are fatal. Cluster admins can take the ClusterVersion RetrievedUpdates=False message and complain to their Update Service maintainers, who can fix the metadata.
b200ebc
to
b3f754f
Compare
@wking: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Testing with a $ oc get -o jsonpath-as-json='{.status.desired}' clusterversion version
[
{
"image": "registry.build11.ci.openshift.org/ci-ln-mwhnlck/release@sha256:5c287af573279895ba93fe562345bb0b38caae30c79a79a23b7abf66e3337fc4",
"version": "4.21.0-0-2025-09-19-155315-test-ci-ln-mwhnlck-latest"
}
]
$ curl -s https://github.com/raw/wking/cincinnati-graph-data/refs/heads/demo/cincinnati-graph.json | jq '.nodes[0]'
{
"payload": "registry.build11.ci.openshift.org/ci-ln-mwhnlck/release@sha256:5c287af573279895ba93fe562345bb0b38caae30c79a79a23b7abf66e3337fc4",
"version": "4.21.0-0-2025-09-19-155315-test-ci-ln-mwhnlck-latest",
"metadata": {
"url": "https://example.com/current",
"io.openshift.upgrades.graph.release.channels": "channel-a,channel-current"
}
}
$ oc patch clusterversion version --type json -p '[{"op": "add", "path": "/spec/channel", "value": "whatever"}, {"op": "add", "path": "/spec/upstream", "value": "https://github.com/raw/wking/cincinnati-graph-data/refs/heads/demo/cincinnati-graph.json"}]'
$ oc adm upgrade recommend
Upstream update service: https://github.com/raw/wking/cincinnati-graph-data/refs/heads/demo/cincinnati-graph.json
Channel: whatever (available channels: channel-a, channel-current)
Updates to 4.22:
VERSION ISSUES
4.22.1-always-recommended no known issues relevant to this cluster
4.22.0-always-recommended no known issues relevant to this cluster
$ oc get -o json clusterversion version | jq '.status.availableUpdates[]'
{
"image": "quay.io/openshift-release-dev/ocp-release@sha256:1111111111111111111111111111111111111111111111111111111111111111",
"version": "4.22.1-always-recommended"
}
{
"channels": [
"channel-0",
"channel-a"
],
"image": "quay.io/openshift-release-dev/ocp-release@sha256:0000000000000000000000000000000000000000000000000000000000000000",
"url": "https://example.com/0",
"version": "4.22.0-always-recommended"
} Looks good to me. I haven't reproduced the original issue, so I'm not sure this pull fixes anything. I suspect earlier tests might have missed pullspec-digest matching in the mock update service data, since we use digest matching when merging release metadata. But even if this isn't a user-visible fix, I think it's still worth unifying the parsing for tech-debt reduction and easier future maintenance. /verified by @wking |
@wking: This PR has been marked as verified by In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/payload-job periodic-ci-openshift-release-master-nightly-4.21-e2e-aws-ovn-serial |
@wking: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/d94eb820-9581-11f0-91b5-e05e7629a7c5-0 |
/cc |
/label qe-approved |
@wking: This pull request references OTA-1627 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Instead of carring similar code in the payload and Cincinnati packages, centralize in one place to make maintenance easier. And with the logic centralized, I've also put some time into hardening the channel parsing, to grumble about some possible issues.
For payload loading, errors get a logged warning, but are not fatal. Having the CVO come up with logged warnings still allows cluster admins to update into a fix. But a crash-looping CVO would not notice ClusterVersion
spec.desiredUpdate
changes or be able to roll out a requested update into a fix.For Cincinnati processing, errors are fatal. Cluster admins can take the ClusterVersion
RetrievedUpdates=False
message and complain to their Update Service maintainers, who can fix the metadata.