Skip to content

Register libvirt-s390x-vpn-oz cluster profile#5225

Open
ibm-adarsh wants to merge 1 commit into
openshift:mainfrom
ibm-adarsh:cluster-profile-vpn
Open

Register libvirt-s390x-vpn-oz cluster profile#5225
ibm-adarsh wants to merge 1 commit into
openshift:mainfrom
ibm-adarsh:cluster-profile-vpn

Conversation

@ibm-adarsh
Copy link
Copy Markdown

@ibm-adarsh ibm-adarsh commented Jun 2, 2026

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-oz cluster profile constant to pkg/api/clusterprofile.go and wires it through all necessary cluster-profile mappings:

  • Maps the profile to the cluster type string libvirt-s390x-vpn-oz
  • Maps it to the Boskos lease resource libvirt-s390x-vpn-oz-quota-slice for resource quota management
  • Registers it in the LeaseTypeFromClusterType() function so Boskos can properly resolve the lease resource for this profile

Impact:
CI operators and test developers can now use this new cluster profile in their test configurations. When jobs request the libvirt-s390x-vpn-oz profile, Boskos will automatically manage resource allocation through the corresponding quota-slice lease, enabling s390x architecture testing in the Orange Zone VPN environment.

Map the Orange Zone M83 libvirt VPN profile to libvirt-s390x-vpn-oz-quota-slice
for Boskos lease acquisition.
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

📝 Walkthrough

Walkthrough

This PR adds a new ClusterProfileLibvirtS390xVPNOZ constant and registers it across all cluster-profile mapping functions in pkg/api/clusterprofile.go. The new profile is wired to map to the cluster type string libvirt-s390x-vpn-oz and its corresponding quota-slice lease type.

Changes

ClusterProfileLibvirtS390xVPNOZ Addition

Layer / File(s) Summary
Profile constant and mappings
pkg/api/clusterprofile.go
New ClusterProfileLibvirtS390xVPNOZ constant is defined, added to ClusterProfiles(), mapped in ClusterType() to libvirt-s390x-vpn-oz, mapped in LeaseType() to libvirt-s390x-vpn-oz-quota-slice, and recognized in LeaseTypeFromClusterType() for quota-slice lease derivation.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 17
✅ Passed checks (17 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: registering a new cluster profile constant and wiring it through cluster-profile mappings.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Go Error Handling ✅ Passed PR adds only constant and string mappings with no new error handling code; existing LeaseTypeFromClusterType() error handling is properly implemented using fmt.Errorf.
Test Coverage For New Features ✅ Passed New pure mapping functions are tested via TestClusterProfilesConfig which iterates all ClusterProfiles() and validates ClusterType/LeaseType outputs using cmp.Diff comparison.
Stable And Deterministic Test Names ✅ Passed PR adds cluster profile constants and functions with no Ginkgo tests. The custom check applies only to Ginkgo test names; no test code exists in this PR.
Test Structure And Quality ✅ Passed PR does not contain Ginkgo test code. Repository uses standard Go testing (testing.T) exclusively. Check for Ginkgo test quality is not applicable.
Microshift Test Compatibility ✅ Passed PR does not add any new Ginkgo e2e tests—only a cluster profile constant and mappings in non-test file pkg/api/clusterprofile.go.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests are present in this PR. Changes are limited to pkg/api/clusterprofile.go, which only adds a cluster profile constant and mapping functions. The custom check does not apply.
Topology-Aware Scheduling Compatibility ✅ Passed PR only modifies pkg/api/clusterprofile.go - an API constant/type definition file with no deployment manifests, operator code, controllers, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR adds only a constant definition and mapping functions with no stdout writes, init() functions, or package-level executable code that could corrupt the OTE binary-openshift-tests JSON contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds no Ginkgo e2e tests, only modifies pkg/api/clusterprofile.go cluster profile mappings. Check is not applicable.
No-Weak-Crypto ✅ Passed PR contains only string constant and mapping logic with no cryptographic operations, weak algorithms, or non-constant-time secret comparisons.
Container-Privileges ✅ Passed PR modifies only pkg/api/clusterprofile.go, a Go source file with cluster profile constants. No container or Kubernetes manifests were changed. File contains no privilege configurations.
No-Sensitive-Data-In-Logs ✅ Passed No logging statements that expose sensitive data found. The PR only adds constant definitions and pure mapping functions that return hardcoded cluster profile names and lease types.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 2, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ibm-adarsh
Once this PR has been reviewed and has the lgtm label, please assign psalajova for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 2, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 2, 2026

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 kubernetes-sigs/prow repository.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between afd490e and aad95f9.

📒 Files selected for processing (1)
  • pkg/api/clusterprofile.go

Comment thread pkg/api/clusterprofile.go
Comment on lines +623 to +624
case ClusterProfileLibvirtS390xVPNOZ:
return "libvirt-s390x-vpn-oz"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ 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.

Comment thread pkg/api/clusterprofile.go
Comment on lines +967 to +968
case ClusterProfileLibvirtS390xVPNOZ:
return "libvirt-s390x-vpn-oz-quota-slice"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

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.

@ibm-adarsh ibm-adarsh marked this pull request as ready for review June 3, 2026 09:19
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 3, 2026
@openshift-ci openshift-ci Bot requested review from danilo-gemoli and deepsm007 June 3, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant