Register libvirt-s390x-vpn-oz cluster profile#5225
Conversation
Map the Orange Zone M83 libvirt VPN profile to libvirt-s390x-vpn-oz-quota-slice for Boskos lease acquisition.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
📝 WalkthroughWalkthroughThis PR adds a new ChangesClusterProfileLibvirtS390xVPNOZ Addition
🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 17✅ Passed checks (17 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ibm-adarsh 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 @ibm-adarsh. 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. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@pkg/api/clusterprofile.go`:
- Around line 623-624: Add a table-driven test that verifies the new profile
wiring for ClusterProfileLibvirtS390xVPNOZ by asserting expected outputs from
ClusterProfiles(), ClusterType(), LeaseType(), and LeaseTypeFromClusterType();
create test cases (including the new ClusterProfileLibvirtS390xVPNOZ) and
iterate over them asserting equality for each function so regressions are
caught, and place the test alongside the existing cluster profile tests
complying with package test conventions.
- Around line 967-968: The new cluster profile emits the Boskos lease name
"libvirt-s390x-vpn-oz-quota-slice" (see LeaseType() and
LeaseTypeFromClusterType() handling of ClusterProfileLibvirtS390xVPNOZ), but
there is no corresponding Boskos resource downstream; add a matching Boskos
resource entry for "libvirt-s390x-vpn-oz-quota-slice" (and any other new names
emitted, e.g., the ones referenced around lines 1185–1186) into the
openshift/release Boskos config inputs
(core-services/prow/02_config/_boskos.yaml and generator inputs) so leases
requested by these profiles can be handed out. Ensure the resource name, type,
state, and any owner/expiration fields follow existing convention for similar
libvirt quota-slice entries.
🪄 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: a019b96d-ec6f-4ac3-976e-dfccb9c2de6c
📒 Files selected for processing (1)
pkg/api/clusterprofile.go
| case ClusterProfileLibvirtS390xVPNOZ: | ||
| return "libvirt-s390x-vpn-oz" |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
Add table-driven tests for the new profile wiring.
This change updates multiple pure mapping paths, but no regression coverage is included for the new profile. Please add a table-driven test that checks ClusterProfiles(), ClusterType(), LeaseType(), and LeaseTypeFromClusterType() for ClusterProfileLibvirtS390xVPNOZ. As per coding guidelines, **/*.go: New or modified functionality should include test coverage. Pure functions should always be tested. Prefer table-driven tests.
Also applies to: 967-968, 1185-1186
🤖 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/api/clusterprofile.go` around lines 623 - 624, Add a table-driven test
that verifies the new profile wiring for ClusterProfileLibvirtS390xVPNOZ by
asserting expected outputs from ClusterProfiles(), ClusterType(), LeaseType(),
and LeaseTypeFromClusterType(); create test cases (including the new
ClusterProfileLibvirtS390xVPNOZ) and iterate over them asserting equality for
each function so regressions are caught, and place the test alongside the
existing cluster profile tests complying with package test conventions.
| case ClusterProfileLibvirtS390xVPNOZ: | ||
| return "libvirt-s390x-vpn-oz-quota-slice" |
There was a problem hiding this comment.
Boskos resource for this new lease type is missing downstream.
LeaseType() and LeaseTypeFromClusterType() now emit libvirt-s390x-vpn-oz-quota-slice, but the linked openshift/release scan found no Boskos resource with that name in core-services/prow/02_config/_boskos.yaml or the generator inputs. That means jobs using this profile will request a lease Boskos cannot hand out, so the PR does not yet achieve its stated objective.
Also applies to: 1185-1186
🤖 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/api/clusterprofile.go` around lines 967 - 968, The new cluster profile
emits the Boskos lease name "libvirt-s390x-vpn-oz-quota-slice" (see LeaseType()
and LeaseTypeFromClusterType() handling of ClusterProfileLibvirtS390xVPNOZ), but
there is no corresponding Boskos resource downstream; add a matching Boskos
resource entry for "libvirt-s390x-vpn-oz-quota-slice" (and any other new names
emitted, e.g., the ones referenced around lines 1185–1186) into the
openshift/release Boskos config inputs
(core-services/prow/02_config/_boskos.yaml and generator inputs) so leases
requested by these profiles can be handed out. Ensure the resource name, type,
state, and any owner/expiration fields follow existing convention for similar
libvirt quota-slice entries.
Map the Orange Zone M83 libvirt VPN profile to libvirt-s390x-vpn-oz-quota-slice for Boskos lease acquisition.
openshift/release#79967
This PR registers a new cluster profile for libvirt s390x (IBM mainframe) clusters with VPN connectivity to the Orange Zone. The change enables Boskos, OpenShift CI's resource management system, to track and allocate leases for this cluster profile.
What changed:
The PR adds the
libvirt-s390x-vpn-ozcluster profile constant topkg/api/clusterprofile.goand wires it through all necessary cluster-profile mappings:libvirt-s390x-vpn-ozlibvirt-s390x-vpn-oz-quota-slicefor resource quota managementLeaseTypeFromClusterType()function so Boskos can properly resolve the lease resource for this profileImpact:
CI operators and test developers can now use this new cluster profile in their test configurations. When jobs request the
libvirt-s390x-vpn-ozprofile, Boskos will automatically manage resource allocation through the corresponding quota-slice lease, enabling s390x architecture testing in the Orange Zone VPN environment.