[release-5.0] OCPBUGS-114008: Strip version tag from OCI chart URL to prevent doubl… - #17097
Conversation
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>
|
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:
Comment |
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-105603 has been cloned as Jira Issue OCPBUGS-114008. 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-114008, 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. |
webbnh
left a comment
There was a problem hiding this comment.
/lgtm
WRT this comment, @sowmya-sl, this bug was introduced in OCP 4.22, right? So, you should add a release note to OCPBUGS-114008 (and tag Jocelyn in the Jira ticket).
And, if that's the case, then you should add the release note in OCPBUGS-105603, as well (and tag Jocelyn there, too). And, when this PR is merged, backport it again to 4.22 (and add the release note to that corresponding Jira ticket, too, with another tag for Jocelyn).
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, 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 |
|
@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 #16999
/assign sowmya-sl