OCPBUGS-72592: fix Helm chart created in incorrect namespace - #17040
OCPBUGS-72592: fix Helm chart created in incorrect namespace#17040platex-rehor-bot wants to merge 1 commit into
Conversation
Preserve URL query params (chartURL, indexEntry) when changing namespace on the Create Helm Release page. Previously, handleNamespaceChange navigated to /helm/ns/<new-ns> without carrying forward location.search, causing the chart context to be lost and the namespace in the submit payload to remain stale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@platex-rehor-bot: This pull request references Jira Issue OCPBUGS-72592, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yapei@redhat.com), skipping review request. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. WalkthroughHelm install and upgrade namespace navigation now preserves the current URL query string for specific namespaces. Tests verify preserved queries, same-namespace no-op behavior, and query removal for all namespaces. ChangesHelm namespace navigation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized fix preserves Helm chart query parameters when changing namespaces and adds focused unit tests; no actionable merge-blocking risk remains beyond normal checks and review. Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@platex-rehor-bot: This pull request references Jira Issue OCPBUGS-72592, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yapei@redhat.com), skipping review request. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: platex-rehor-bot 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 |
|
Hi @platex-rehor-bot. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
@platex-rehor-bot: This pull request references Jira Issue OCPBUGS-72592. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state. 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. |
|
For anyone else coming here late, this PR was apparently superseded by #17041. |
Analysis / Root cause:
When the user changes the namespace on the Create Helm Release page (via the project dropdown),
handleNamespaceChangenavigates to/helm/ns/<new-ns>— stripping thechartURL,indexEntry, and all other query params from the URL. This causes:namespacevariable captured at render time via URL params becomes staleRoot cause analysis by @jhadvig in the Jira ticket.
Solution description:
Preserve
location.search(query parameters) when navigating to the new namespace inhandleNamespaceChange:This ensures that when the namespace changes, the URL retains all query params (
chartURL,indexEntry, etc.), the component re-renders with the correct namespace, and the submit handler uses the updated namespace value.Added unit tests to verify:
Screenshots / screen recording:
Test setup:
No special setup required. Navigate to Developer > +Add > Helm Chart > select any chart > Create.
Test cases:
foo, open a Helm chart from catalog, on Create page switch to namespacebarvia project dropdown, click Create → chart should be created inbarBrowser conformance:
Additional info:
Fixes OCPBUGS-72592
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests