OCPBUGS-70302: Fix handling of binary data in SecretFormWrapper#15882
OCPBUGS-70302: Fix handling of binary data in SecretFormWrapper#15882Leo6Leo wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@Leo6Leo: This pull request references CONSOLE-4631 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 story to target the "4.22.0" version, but no target version was set. 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. |
WalkthroughModified the reduce operation in SecretFormWrapper.tsx to handle binary data entries by continuing with the accumulator instead of returning null, preventing invalid results when filtering binary keys from stringData. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Leo6Leo 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 |
|
@Leo6Leo: 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. |
|
Close this PR as it is a duplicate fix of #15820 |
|
@Leo6Leo: This pull request references Jira Issue OCPBUGS-70302, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
Description
Fixed a JavaScript error that occurred when attempting to edit a Secret containing both binary files and text literals. The Console would crash with "Something wrong happened: Cannot set properties of null" instead of loading the Edit Secret form.
Root Cause
In SecretFormWrapper.tsx, the stringData initialization used a reduce function that returned null when encountering binary data. This broke the accumulator chain, causing subsequent text entries to fail when trying to set properties on null.
Steps to Reproduce
Before: Console crashes with "Cannot set properties of null (setting 'JGROUPS_KEYSTORE_PASSWORD')"
After: Edit Secret form loads successfully, displaying both entries
Note: this PR need to get backported to older versions to 4.14.