WINC-1836: Use WinServer 2025 template in vsphere tests#3914
WINC-1836: Use WinServer 2025 template in vsphere tests#3914openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis pull request updates vSphere Windows template references across the codebase from Windows Server 2022 to Windows Server 2025. Specifically, the MachineSet golden image template in the shell script and the default VM template in the end-to-end test provider both reference the newer template variant. The control flow, error handling, and all other logic remain unchanged; only the template version strings are updated. 🚥 Pre-merge checks | ✅ 6 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (6 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 |
|
@mansikulkarni96: This pull request references WINC-1836 which is a valid jira issue. 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 ci/prow/vsphere-e2e-operator |
|
@mansikulkarni96: This pull request references WINC-1836 which is a valid jira issue. 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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@hack/machineset.sh`:
- Around line 308-310: get_vsphere_ms() currently hardcodes the
"windows-server-2025-template-ipv6-disabled" template so passing -w 2022 still
emits a 2025 MachineSet; update get_vsphere_ms() (and the surrounding machineset
generation logic that sets the template variable) to select the correct template
based on the winver variable (map supported versions like "2022","2025" to their
respective template names) and add validation that errors out (error-exit) for
unsupported winver values; also update the script's default/help text to reflect
the supported vSphere Windows versions and the new mapping/failure behavior so
defaults and usage are consistent.
In `@test/e2e/providers/vsphere/vsphere.go`:
- Line 60: GenerateMachineSet() currently rejects OS versions other than
windows.Server2022, causing runs using the new vmTemplate
("windows-golden-images/windows-server-2025-template-ipv6-disabled") to fail;
update the version gate inside GenerateMachineSet (and the other similar checks
around the same block) to allow windows.Server2025 as well as windows.Server2022
by adding windows.Server2025 to the acceptable-case(s) or conditional(s) that
currently only reference windows.Server2022 so GenerateMachineSet() will proceed
for Server2025 templates.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a7a5ca42-ecd4-45b6-8ca4-4a52e1e35684
📒 Files selected for processing (2)
hack/machineset.shtest/e2e/providers/vsphere/vsphere.go
| template="windows-golden-images/windows-server-2025-template-ipv6-disabled" | ||
| if [ "$winver" == "2019" ]; then | ||
| error-exit "No template available for Windows Server 2019 in DevQE vCenter" |
There was a problem hiding this comment.
winver behavior is inconsistent for vSphere
get_vsphere_ms() hardcodes the 2025 template, so -w 2022 still produces a 2025 MachineSet. Either map versions explicitly or fail fast for unsupported vSphere versions, and align the default/help text.
Suggested fix
- # set golden image template name
- template="windows-golden-images/windows-server-2025-template-ipv6-disabled"
- if [ "$winver" == "2019" ]; then
- error-exit "No template available for Windows Server 2019 in DevQE vCenter"
- fi
+ # set golden image template name
+ case "$winver" in
+ "2019")
+ error-exit "No template available for Windows Server 2019 in DevQE vCenter"
+ ;;
+ "2022"|"2025")
+ template="windows-golden-images/windows-server-2025-template-ipv6-disabled"
+ ;;
+ *)
+ error-exit "Unsupported Windows version '$winver' for vSphere"
+ ;;
+ esac-winver="2022"
+winver="2025"Also applies to: 421-428
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@hack/machineset.sh` around lines 308 - 310, get_vsphere_ms() currently
hardcodes the "windows-server-2025-template-ipv6-disabled" template so passing
-w 2022 still emits a 2025 MachineSet; update get_vsphere_ms() (and the
surrounding machineset generation logic that sets the template variable) to
select the correct template based on the winver variable (map supported versions
like "2022","2025" to their respective template names) and add validation that
errors out (error-exit) for unsupported winver values; also update the script's
default/help text to reflect the supported vSphere Windows versions and the new
mapping/failure behavior so defaults and usage are consistent.
| vmTemplate := os.Getenv("VM_TEMPLATE") | ||
| if vmTemplate == "" { | ||
| vmTemplate = "windows-golden-images/windows-server-2022-template-ipv6-disabled" | ||
| vmTemplate = "windows-golden-images/windows-server-2025-template-ipv6-disabled" |
There was a problem hiding this comment.
Allow windows.Server2025 in the version gate
The default VM template now targets Windows Server 2025, but GenerateMachineSet() still errors for any version except windows.Server2022. That blocks explicit 2025 runs.
Suggested fix
func (p *Provider) GenerateMachineSet(withIgnoreLabel bool, replicas int32, windowsServerVersion windows.ServerVersion) (*mapi.MachineSet, error) {
- // TODO: (vsphere) add support for Windows Server 2025 when golden image is available for 2025
- if windowsServerVersion != windows.Server2022 {
+ if windowsServerVersion != windows.Server2022 && windowsServerVersion != windows.Server2025 {
return nil, fmt.Errorf("vSphere does not support Windows Server %s", windowsServerVersion)
}Also applies to: 112-115
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@test/e2e/providers/vsphere/vsphere.go` at line 60, GenerateMachineSet()
currently rejects OS versions other than windows.Server2022, causing runs using
the new vmTemplate
("windows-golden-images/windows-server-2025-template-ipv6-disabled") to fail;
update the version gate inside GenerateMachineSet (and the other similar checks
around the same block) to allow windows.Server2025 as well as windows.Server2022
by adding windows.Server2025 to the acceptable-case(s) or conditional(s) that
currently only reference windows.Server2022 so GenerateMachineSet() will proceed
for Server2025 templates.
a22a4dc to
7eb525b
Compare
|
/test ci/prow/vsphere-e2e-operator |
|
/test vsphere-e2e-operator |
3 similar comments
|
/test vsphere-e2e-operator |
|
/test vsphere-e2e-operator |
|
/test vsphere-e2e-operator |
7eb525b to
ccf2a25
Compare
This commit adds support for Windows Server 2025 in machineSet.sh and vSphere tests to use the newly created 2025 golden image template in vcenter.
ccf2a25 to
fc4164e
Compare
|
/override ci/prow/aws-e2e-operator ci/prow/azure-e2e-operator ci/prow/azure-e2e-upgrade ci/prow/gcp-e2e-operator ci/prow/nutanix-e2e-operator |
|
@jrvaldes: Overrode contexts on behalf of jrvaldes: ci/prow/aws-e2e-operator, ci/prow/azure-e2e-operator, ci/prow/azure-e2e-upgrade, ci/prow/gcp-e2e-operator, ci/prow/nutanix-e2e-operator 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 kubernetes-sigs/prow repository. |
|
/test vsphere-proxy-e2e-operator |
|
@mansikulkarni96 testing with |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jrvaldes, mansikulkarni96 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 |
|
/override ci/prow/wicd-unit-vsphere |
|
@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere 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 kubernetes-sigs/prow repository. |
|
/retest |
|
/override ci/prow/wicd-unit-vsphere |
|
@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere 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 kubernetes-sigs/prow repository. |
|
/override ci/prow/wicd-unit-vsphere |
|
/hold Revision fc4164e was retested 3 times: holding |
|
@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere 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 kubernetes-sigs/prow repository. |
|
/override ci/prow/vsphere-proxy-e2e-operator |
|
@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/vsphere-proxy-e2e-operator 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 kubernetes-sigs/prow repository. |
|
/hold cancel |
|
/override ci/prow/aws-e2e-operator ci/prow/azure-e2e-operator ci/prow/azure-e2e-upgrade ci/prow/gcp-e2e-operator ci/prow/nutanix-e2e-operator ci/prow/platform-none-vsphere-e2e-operator ci/prow/vsphere-disconnected-e2e-operator ci/prow/vsphere-e2e-operator ci/prow/wicd-unit-vsphere |
|
@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/aws-e2e-operator, ci/prow/azure-e2e-operator, ci/prow/azure-e2e-upgrade, ci/prow/gcp-e2e-operator, ci/prow/nutanix-e2e-operator, ci/prow/platform-none-vsphere-e2e-operator, ci/prow/vsphere-disconnected-e2e-operator, ci/prow/vsphere-e2e-operator, ci/prow/wicd-unit-vsphere 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 kubernetes-sigs/prow repository. |
|
/override ci/prow/wicd-unit-vsphere |
|
@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere 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 kubernetes-sigs/prow repository. |
|
@mansikulkarni96: 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. |
This commit adds support for Windows Server 2025 in machineSet.sh and vSphere tests to use the newly created 2025 golden image template in vcenter.
Summary by CodeRabbit