OCPBUGS-86671: Fix InternalReleaseImage URL transform#6100
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@bfournie: This pull request references Jira Issue OCPBUGS-86671, which is valid. The bug has been moved to the POST state. 3 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughRefactors transformToAPIIntURL to parse host:port (trimming path) and rebuild the host as api-int.:; adds a table-driven TestTransformToAPIIntURL covering localhost, localhost.localdomain, portless, digest-path, and non-localhost-with-port cases. ChangesURL Transformation Parser
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
|
@bfournie: This pull request references Jira Issue OCPBUGS-86671, which is valid. 3 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. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/controller/internalreleaseimage/internalreleaseimage_controller_test.go (1)
485-489: ⚡ Quick winAdd regression cases for pullspecs containing
sha256:and for non-localhost hosts.The current “no port” case (
localhost) doesn’t catch the digest-colon parsing edge case. Please add cases likelocalhost/...@sha256:...(expect unchanged if no host port) and a non-localhost input (expect unchanged).Also applies to: 492-497
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/controller/internalreleaseimage/internalreleaseimage_controller_test.go` around lines 485 - 489, Update the test table entries around the "no port returns input unchanged" case to add regression cases that ensure inputs containing image digests and non-localhost hostnames are left unchanged: add a case with localhost plus a digest like "localhost/repo@sha256:abcdef..." (expected "localhost/repo@sha256:abcdef...") and add a non-localhost host case such as "registry.example.com/repo:tag" (expected unchanged). Mirror the same two new cases in the second group referenced (the block around lines ~492-497) so both test groups cover the sha256-colon parsing edge and non-localhost behavior; ensure the new cases use the same table structure and test name pattern so the existing test loop picks them up.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/controller/internalreleaseimage/internalreleaseimage_controller_test.go`:
- Around line 485-489: Update the test table entries around the "no port returns
input unchanged" case to add regression cases that ensure inputs containing
image digests and non-localhost hostnames are left unchanged: add a case with
localhost plus a digest like "localhost/repo@sha256:abcdef..." (expected
"localhost/repo@sha256:abcdef...") and add a non-localhost host case such as
"registry.example.com/repo:tag" (expected unchanged). Mirror the same two new
cases in the second group referenced (the block around lines ~492-497) so both
test groups cover the sha256-colon parsing edge and non-localhost behavior;
ensure the new cases use the same table structure and test name pattern so the
existing test loop picks them up.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 5a15d185-3b45-4149-94e9-23bcb5234803
📒 Files selected for processing (2)
pkg/controller/internalreleaseimage/aggregation.gopkg/controller/internalreleaseimage/internalreleaseimage_controller_test.go
The conversion of the image url from the MCN to IRI was not being done properly. For example if the MCN had: localhost.localdomain:22625/openshift/release-images@sha256:<id> The resulting IRI image was api-int.ostest.test.metalkube.org.localdomain:22625/openshift/release-images@sha256:<id> It should not contain "localdomain".
b763a1a to
78cf83b
Compare
|
Actionable comments posted: 0 |
|
/lgtm |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andfasano, bfournie 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 |
|
/verified by @bfournie |
|
@bfournie: 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. |
|
/test e2e-hypershift |
|
/test e2e-gcp-op-single-node |
|
@bfournie: 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. |
|
@bfournie: Jira Issue OCPBUGS-86671 is in an unrecognized state (Code Review) and will not be moved to the MODIFIED 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. |
The conversion of the image url from the MCN to IRI was not being done properly. For example if the MCN had:
localhost.localdomain:22625/openshift/release-images@sha256:
The resulting IRI image was
api-int.ostest.test.metalkube.org.localdomain:22625/openshift/release-images@sha256:
It should not contain "localdomain".
- What I did
- How to verify it
- Description for the changelog
Summary by CodeRabbit
Bug Fixes
Tests