Skip to content

WINC-1836: Use WinServer 2025 template in vsphere tests#3914

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
mansikulkarni96:WINC-1836
Apr 9, 2026
Merged

WINC-1836: Use WinServer 2025 template in vsphere tests#3914
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
mansikulkarni96:WINC-1836

Conversation

@mansikulkarni96
Copy link
Copy Markdown
Member

@mansikulkarni96 mansikulkarni96 commented Apr 2, 2026

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

  • Chores
    • Updated Windows Server templates for vSphere MachineSet and testing configurations from version 2022 to version 2025.

@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 Apr 2, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 2, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (2)
  • do-not-merge/work-in-progress
  • do-not-merge/hold

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 31f0b002-13a2-493d-b276-bb1b5fba7d56

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This 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)

Check name Status Explanation Resolution
Platform-Specific Requirements ⚠️ Warning vSphere handler exhibits platform-specific inconsistencies: TODO blocks Windows Server 2025 despite default template using it; get_vsphere_ms() ignores winver parameter unlike AWS/Azure/GCP; missing validation for 15-char machine name and 9-char MachineSet limits. Remove TODO and allow windows.Server2025 in version gate; refactor get_vsphere_ms() with case statement mapping winver to templates; add validation and documentation for vSphere naming constraints.
Go Best Practices & Build Tags ❓ Inconclusive Sandbox environment lacks access to actual modified files, preventing verification of Go error handling patterns, build tag compliance, and nil checks in the vsphere.go and machineset.sh changes. Access the actual file contents to verify: (1) build tags in test/e2e/providers/vsphere/vsphere.go; (2) GenerateMachineSet() error handling with fmt.Errorf; (3) proper Windows Server 2025 version gating alongside Server2022.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating vSphere tests to use Windows Server 2025 template instead of 2022, which aligns with the changeset modifications across both test and automation files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Security: Secrets, Ssh & Csr ✅ Passed PR updates golden image template names from Windows Server 2022 to 2025 in configuration files with no security-critical code modifications.
Kubernetes Controller Patterns ✅ Passed The Kubernetes Controller Patterns check is not applicable to this PR. The modifications are limited to build/development scripts and E2E test helpers that generate MachineSet manifests, not controller reconciliation logic with watch predicates, finalizers, owner references, or status conditions.
Windows Service Management ✅ Passed The PR changes only update vSphere golden image template references from Windows Server 2022 to 2025; no Windows service handling, dependencies, priority ordering, or Service Control Manager interactions are modified.

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

@mansikulkarni96 mansikulkarni96 changed the title Use WinServer 2025 template in vsphere tests WINC-1836: Use WinServer 2025 template in vsphere tests Apr 2, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 2, 2026

@mansikulkarni96: This pull request references WINC-1836 which is a valid jira issue.

Details

In response to this:

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.

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 2, 2026
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 2, 2026
@mansikulkarni96
Copy link
Copy Markdown
Member Author

/test ci/prow/vsphere-e2e-operator

@mansikulkarni96 mansikulkarni96 marked this pull request as ready for review April 2, 2026 03:53
@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 Apr 2, 2026
@openshift-ci openshift-ci bot requested a review from jrvaldes April 2, 2026 03:53
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 2, 2026

@mansikulkarni96: This pull request references WINC-1836 which is a valid jira issue.

Details

In response to this:

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

  • Chores
  • Updated Windows Server templates for vSphere MachineSet and testing configurations from version 2022 to version 2025.

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.

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 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

📥 Commits

Reviewing files that changed from the base of the PR and between c676971 and a22a4dc.

📒 Files selected for processing (2)
  • hack/machineset.sh
  • test/e2e/providers/vsphere/vsphere.go

Comment thread hack/machineset.sh Outdated
Comment on lines 308 to 310
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"
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

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"
As per coding guidelines, "hack/**/*: Review development and build scripts: ... Verify MachineSet generation logic".

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.

Comment thread test/e2e/providers/vsphere/vsphere.go Outdated
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"
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

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.

@mansikulkarni96
Copy link
Copy Markdown
Member Author

/test ci/prow/vsphere-e2e-operator

@mansikulkarni96
Copy link
Copy Markdown
Member Author

/test vsphere-e2e-operator

3 similar comments
@mansikulkarni96
Copy link
Copy Markdown
Member Author

/test vsphere-e2e-operator

@jrvaldes
Copy link
Copy Markdown
Contributor

jrvaldes commented Apr 6, 2026

/test vsphere-e2e-operator

@mansikulkarni96
Copy link
Copy Markdown
Member Author

/test vsphere-e2e-operator

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.
@jrvaldes
Copy link
Copy Markdown
Contributor

jrvaldes commented Apr 7, 2026

/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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 7, 2026

@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

Details

In response to this:

/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

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
Copy link
Copy Markdown
Member Author

/test vsphere-proxy-e2e-operator

@jrvaldes
Copy link
Copy Markdown
Contributor

jrvaldes commented Apr 8, 2026

@mansikulkarni96 testing with /test vsphere-e2e-operator does not provide CI signal with Windows Server 2025 til openshift/release#77502 merges right?

Copy link
Copy Markdown
Contributor

@jrvaldes jrvaldes left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [jrvaldes,mansikulkarni96]

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

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 42ae9d5 and 2 for PR HEAD fc4164e in total

@mansikulkarni96
Copy link
Copy Markdown
Member Author

/override ci/prow/wicd-unit-vsphere

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere

Details

In response to this:

/override ci/prow/wicd-unit-vsphere

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.

@jrvaldes
Copy link
Copy Markdown
Contributor

jrvaldes commented Apr 8, 2026

/retest

@mansikulkarni96
Copy link
Copy Markdown
Member Author

/override ci/prow/wicd-unit-vsphere

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere

Details

In response to this:

/override ci/prow/wicd-unit-vsphere

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.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 9f50310 and 1 for PR HEAD fc4164e in total

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD f16069f and 0 for PR HEAD fc4164e in total

@mansikulkarni96
Copy link
Copy Markdown
Member Author

/override ci/prow/wicd-unit-vsphere

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/hold

Revision fc4164e was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 8, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere

Details

In response to this:

/override ci/prow/wicd-unit-vsphere

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
Copy link
Copy Markdown
Member Author

/override ci/prow/vsphere-proxy-e2e-operator

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/vsphere-proxy-e2e-operator

Details

In response to this:

/override ci/prow/vsphere-proxy-e2e-operator

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
Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 8, 2026
@mansikulkarni96
Copy link
Copy Markdown
Member Author

/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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

@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

Details

In response to this:

/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

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
Copy link
Copy Markdown
Member Author

/override ci/prow/wicd-unit-vsphere

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 9, 2026

@mansikulkarni96: Overrode contexts on behalf of mansikulkarni96: ci/prow/wicd-unit-vsphere

Details

In response to this:

/override ci/prow/wicd-unit-vsphere

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 823db4a into openshift:master Apr 9, 2026
19 checks passed
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 9, 2026

@mansikulkarni96: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants