OCPBUGS-97603: Use framework-managed namespace for workload test#31366
OCPBUGS-97603: Use framework-managed namespace for workload test#31366andfasano wants to merge 2 commits into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@andfasano: This pull request references Jira Issue OCPBUGS-97603, 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. |
|
cc @bfournie |
|
/test ? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe internal release image test now uses the framework namespace instead of creating a separate namespace, and project setup skips image-registry expectations when the registry operator is removed. ChangesInternal release image test flow
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@andfasano: This pull request references Jira Issue OCPBUGS-97603, 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. |
|
/test verify |
|
Scheduling required tests: |
|
Testing this in an installed ISO_NO_REGISTRY cluster, I see a timeout waiting for the default SA I tested a fix to test/extended/util/client.go to skip the default SA in This worked... |
Nice catch @bfournie ! Thanks for your suggestion, I've updated the code to reflect it. Can you please have another look? |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/extended/util/client.go (1)
415-425: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the typed imageregistry client here
imageregistry.NewForConfig(c.AdminConfig()).ImageregistryV1().Configs().Get(...).Spec.ManagementStateavoids shelling out tooc get ... -o jsonpathfor this check and removes the brittle string parsing.🤖 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 `@test/extended/util/client.go` around lines 415 - 425, The image registry management-state check is shelling out through c.AsAdmin().Run("get") and parsing jsonpath output, which is brittle. Update the logic in client.go to use the typed imageregistry client from imageregistry.NewForConfig(c.AdminConfig()).ImageregistryV1().Configs().Get(...) and read Spec.ManagementState directly, then keep the existing Removed handling and logging around imageRegistryEnabled.
🤖 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.
Inline comments:
In `@test/extended/util/client.go`:
- Around line 417-424: The image registry state check in client.go is using
c.AsAdmin().Run("get").Args(...).Output(), which can mix stderr into the result
and break the Removed comparison. Update this block to use Outputs() in the
image registryEnabled branch, then compare only the trimmed stdout against
"Removed" before clearing imageRegistryEnabled; keep the existing logging and
control flow around the check.
---
Nitpick comments:
In `@test/extended/util/client.go`:
- Around line 415-425: The image registry management-state check is shelling out
through c.AsAdmin().Run("get") and parsing jsonpath output, which is brittle.
Update the logic in client.go to use the typed imageregistry client from
imageregistry.NewForConfig(c.AdminConfig()).ImageregistryV1().Configs().Get(...)
and read Spec.ManagementState directly, then keep the existing Removed handling
and logging around imageRegistryEnabled.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: a6c1af68-0f6b-451d-9076-f3afec4f15e8
📒 Files selected for processing (3)
test/extended/internalreleaseimage/helper.gotest/extended/internalreleaseimage/internalreleaseimage.gotest/extended/util/client.go
🚧 Files skipped from review as they are similar to previous changes (2)
- test/extended/internalreleaseimage/internalreleaseimage.go
- test/extended/internalreleaseimage/helper.go
|
Scheduling required tests: |
|
/retest-required |
Co-authored-by: Bob Fournier <bfournie@redhat.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: andfasano, bfournie 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 |
|
Scheduling required tests: |
|
@andfasano: The following tests 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. |
|
/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. |
This patch covers the occasional issue related to the test namespace creation.
Assisted-by: Claude
Summary by CodeRabbit
Removedas disabled).