[release-4.14] OCPBUGS-90614: Fix JSON annotation parsing to prevent OperatorHub crash - #16659
Conversation
Harden annotation parsing for OperatorHub page to prevent TypeError when PackageManifest annotations contain malformed or non-array JSON. - Add parseJSONArrayAnnotation() with type validation - Guard .reduce()/.map() calls on parsed annotation data - Add optional chaining to installModesFor() for missing status/channels - Add unit tests for annotation parsing edge cases Backport of fix from PR openshift#14260 (OCPBUGS-35744) adapted for 4.16. Assisted-by: 🤖 Claude Opus/Sonnet 4.6
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-88027 has been cloned as Jira Issue OCPBUGS-90614. Will retitle bug to link to clone. DetailsIn 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. |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-90614, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn 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. |
|
/jira refresh |
|
/retest |
|
@cardil: This pull request references Jira Issue OCPBUGS-90614, which is invalid:
Comment DetailsIn 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. |
|
This backport is stuck on the jira-lifecycle-plugin's sequential-backport-chain check. OCPBUGS-90614 targets 4.14.z, but its "is blocked by" link points to OCPBUGS-88027, which targets 4.16.z — two versions away, not the adjacent 4.15.z the check expects. No 4.15.z clone of OCPBUGS-88027 exists, because release-4.15 is a non-EUS release currently in CVE-only maintenance, so this defect isn't being backported there. There's nothing to link to and nothing to backport further. /assign @germanparente /assign @cajieh |
|
Related #16660 |
|
@cardil I think that cherry pick is jumping from 4.16 to 4.14 to 4.12 and not considering needed silent releases. I can skip but this has to be fixed in all the releases. |
|
/label jira/skip-dependent-bug-check |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-90614, which is valid. The bug has been moved to the POST state. 4 validation(s) were run on this bug
DetailsIn 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. |
|
/retest |
Oh, really? I thought I should skip 4.15 and 4.13 as EoL. But you say otherwise, so I just file cherry pick to those missing releases as well. |
|
@germanparente Just wanted to clarify — exact dates, per Red Hat's official life-cycle dates: 4.13 has been EOL since 2024-11-17, 4.15 since 2025-08-27. 4.12 and 4.14 are still in EUS phase. I'm filing those cherry-picks, but are you sure that's the right thing to do? |
|
/jira refresh |
|
@cardil: This pull request references Jira Issue OCPBUGS-90614, which is valid. 4 validation(s) were run on this bug
DetailsIn 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. |
|
@cardil yes, we fix 4.13 and 4.15 releases since they are silent and we use to do EUS-to-EUS upgrade, like for example from 4.14 to 4.16, we need to upgrade the masters to 4.15 first and only temporarily. So, we fix all the cve's also in 4.15 and we deliver the release silently. |
|
/test e2e-gcp-console |
2 similar comments
|
/test e2e-gcp-console |
|
/test e2e-gcp-console |
|
/retest |
|
@openshift-cherrypick-robot: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
This is an automated cherry-pick of #16588
/assign cardil