Repository navigation
[release-4.22] OCPBUGS-122042: Strip existing OCI tag before appending new version + fix CSP violation crash - #17345
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@sowmya-sl: This pull request references Jira Issue OCPBUGS-105603, 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. |
Make getFullChartURL idempotent by stripping any existing version tag before appending, so URLs like oci://registry/chart:1.0.0 don't become chart:1.0.0:1.0.0. Move version stripping out of the useEffect in HelmURLChartForm to avoid mutating the URL field while the user types.
Use a case-insensitive regex for the OCI scheme check so uppercase or mixed-case OCI URLs (e.g. OCI://registry/chart) are handled correctly when appending the version tag. Co-authored-by: Cursor <cursoragent@cursor.com>
…-reappend Only append the version tag when it's not already present, rather than stripping and re-adding it. Combines all conditions into a single ternary expression per review feedback. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace any existing tag in the OCI URL before appending chartVersion, so changing the version from 1.0.0 to 2.0.0 produces chart:2.0.0 instead of chart:1.0.0:2.0.0. Registry ports are preserved since the regex only matches the last colon with no trailing slashes. Co-authored-by: Cursor <cursoragent@cursor.com>
861c839 to
7126dc6
Compare
|
/retest |
webbnh
left a comment
There was a problem hiding this comment.
/lgtm
One question: it doesn't look like all of these changes (e.g., the tests) are in main...do you have a plan for getting them there?
|
Scheduling tests matching the |
|
@sowmya-sl: This pull request references Jira Issue OCPBUGS-122042, which is valid. 7 validation(s) were run on this bug
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. |
SecurityPolicyViolationEvent.blockedURI (and sourceFile) are not always absolute URLs; they can be tokens such as "inline", "eval", or an empty string. useCSPViolationDetector's sameHostname() called new URL() on these values without handling that case, throwing an uncaught "Failed to construct 'URL': Invalid URL" TypeError that crashed the whole React tree. This was discovered while investigating e2e CI failures on helm-release.feature in openshift#17155: the Helm Form View install page triggers an inline-style CSP violation, which hits this code path and crashes the app, cascading into unrelated timeouts (DataViewFilters, topology empty state, etc.) across the rest of that spec file. Wrap the URL parsing in try/catch and return false for non-URL tokens instead of throwing. Export sameHostname and add direct unit test coverage for the previously-unhandled token values. Co-authored-by: Cursor <cursoragent@cursor.com>
7126dc6 to
9343ca7
Compare
|
/test backend |
|
/verified by @sowmya-sl |
|
@sowmya-sl: This PR has been marked as verified by 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. |
|
/pipeline required |
|
Scheduling tests matching the |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, sowmya-sl, webbnh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@sowmya-sl: all tests passed! 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. |
|
/label backport-risk-assessed |
06881d2
into
openshift:release-4.22
|
@sowmya-sl: Jira Issue Verification Checks: Jira Issue OCPBUGS-122042 Jira Issue OCPBUGS-122042 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
|
Fix included in release 4.22.0-0.nightly-2026-10-06-081053 |
Supersedes #17155, which includes this PR's commits plus a fix for an unrelated CSP-violation crash (
Failed to construct 'URL': Invalid URLinuseCSPViolationDetector) that was causing thehelm-release.featuree2e failures seen in #17155's CI run.