Skip to content

WINC-1967: OTE Migration Batch 2 - Monitoring & Observability - #4319

Open
rrasouli wants to merge 1 commit into
openshift:masterfrom
rrasouli:winc-1966-ote-batch2-monitoring
Open

WINC-1967: OTE Migration Batch 2 - Monitoring & Observability#4319
rrasouli wants to merge 1 commit into
openshift:masterfrom
rrasouli:winc-1966-ote-batch2-monitoring

Conversation

@rrasouli

@rrasouli rrasouli commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates 5 monitoring/observability tests from OTP to the OTE Ginkgo framework, continuing the batch migration tracked in WINC-1966. This PR stacks on Batch 1 (#4279).

New tests migrated:

  • OCP-33768 - Validates Prometheus alert rules are present and active for Windows nodes
  • OCP-60814 - Verifies containerd version on Windows nodes matches the Makefile
  • OCP-70922 - Monitors CPU, Memory, and Filesystem metrics for WMCO pods; verifies CPU utilisation recording rule correctness (OCPBUGS-85061)
  • OCP-77777 - Tests ServiceMonitor creation, HTTPS metrics on port 9182, WMCO log validation, and HTTP rejection
  • OCP-79251 - Validates provider ID consistency between nodes and machines (with BYOH skip)

Test removed (not migrated):

  • OCP-33779 (Node logs validation) - Removed because it is fully redundant with WMCO's existing e2e coverage in test/e2e/logs_test.go:testNodeLogs, which already validates the same 6 log paths via oc adm node-logs. Disabling in OTP tracked in WINC-1978.

Bug verification added:

  • OCPBUGS-85061 - OCP-70922 queries instance:node_cpu_utilisation:rate1m{job="windows-exporter"} from Prometheus and asserts the value is < 0.5, confirming the recording rule reports CPU utilization (not idle rate).

SSH Key Fix (CI Blocker)

The first aws-e2e-ote CI run failed all 10 tests because compat_otp.GetPrivateKey() in BeforeEach tries to read ../internal/config/keys/openshift-qe.pem, a path that only exists in Prow OTP environments. This blocked every test before it could run.

Fix: Removed compat_otp.GetPrivateKey()/GetPublicKey() from BeforeEach entirely. OTE tests use oc debug node/oc exec per WINC-1931, not SSH. The only test that needed a public key (OCP-32615) now derives it from the cloud-private-key cluster secret via ssh.ParsePrivateKey(), making the OTE binary portable across WMCO CI, Prow, and clusterBot.

OCP-60814 Fix: Skip on PR builds

OCP-60814 fetches the Makefile from GitHub using the WMCO commit hash to compare CONTAINERD_GIT_VERSION against node containerd versions. In PR CI builds, the WMCO version is X.Y.Z-HASH-dirty where HASH is a PR-only commit that does not exist on upstream GitHub, causing a 404.

Fix: Detect PR builds by checking for the -dirty suffix in the WMCO version string and g.Skip the test. The test runs normally against released builds (FBC image) where the commit hash exists on GitHub.

OCP-79251 Fix: isNone detection on AWS e2e

OCP-79251 was skipped on AWS e2e clusters because isNone() failed to detect Windows MachineSets. The original implementation searched for MachineSets by name substring ("winworker"/"windows"), but WMCO e2e tests create MachineSets named $infraID-e2e-wm which did not match.

Root cause: The machine.openshift.io/os-id=Windows label is on the Machine template (applied to Machines when created), not on the MachineSet's own metadata. Querying MachineSets by that label returns nothing.

Fix: isNone() now queries Machines (not MachineSets) with -l machine.openshift.io/os-id=Windows, matching the approach used by OTP at openshift-tests-private/test/extended/winc/utils.go:955. If Windows Machines exist, the cluster has Machine API support and the test runs. If none exist (BYOH-only / platform None), the test is skipped.

OTE Test Validation (AWS e2e CI)

Test                                                          Result   Duration
OCP-33768 (Prometheus alerts ignore Windows nodes)            PASSED   11.0s
OCP-60814 (containerd version properly reported)              SKIPPED  (PR build)
OCP-70922 (pod metrics + OCPBUGS-85061: rate1m = 0.098698)    PASSED   29.6s
OCP-77777 (metrics config, HTTPS, HTTP rejection)             PASSED   36.9s
OCP-79251 (provider ID match between nodes and machines)      PASSED   12.9s

OCP-60814 correctly skips on PR CI (commit hash not on upstream GitHub) and passes on clusterBot with released builds.

Key Changes

SSH key removal from BeforeEach

Removed compat_otp.GetPrivateKey()/GetPublicKey() calls and the privateKey/publicKey package variables. Added derivePublicKeyFromSecret() that reads the cloud-private-key Kubernetes secret and derives the public key using ssh.ParsePrivateKey(). This secret exists wherever WMCO is installed, making tests environment-agnostic.

OCP-60814: GitHub fetch with PR build skip

Fetches CONTAINERD_GIT_VERSION from the upstream GitHub Makefile using the WMCO build commit hash. Skips with g.Skip when the WMCO version ends with -dirty (PR builds), since the commit hash only exists in the PR branch and not on upstream GitHub.

OCP-79251: isNone queries Machines instead of MachineSets

isNone() now queries Machines with label machine.openshift.io/os-id=Windows instead of searching MachineSets by name. This correctly detects Windows machines regardless of MachineSet naming convention (e2e-wm, winworker, etc.).

OCPBUGS-85061 verification in OCP-70922

Queries the instance:node_cpu_utilisation:rate1m recording rule via compat_otp.NewPrometheusMonitor and asserts the value represents CPU utilization (< 0.5), not idle rate. Uses the same Prometheus access pattern as OCP-38188.

New generic execInPod() helper (WINC-1931)

Replaces SSH/bastion access pattern with oc exec into any pod. Used by OCP-33768 (prometheus pod), OCP-32554 and OCP-77777 (WMCO pod). Aligns with WINC-1931 refactoring initiative.

Extracted wmcoDeployment variable

"deployment.apps/windows-machine-config-operator" extracted to a reusable variable, eliminating 5+ hardcoded occurrences.

Simplified truncatedVersion() with regex

Replaced truncatedVersion + removeOuterQuotes (17 lines, 2 functions) with a single 7-line regex-based truncatedVersion. removeOuterQuotes deleted as unused.

New utility functions (all with comments)

  • derivePublicKeyFromSecret - Reads cloud-private-key secret and derives SSH public key
  • getContainerdVersion - Node containerRuntimeVersion field parsing
  • getValueFromText - Line search and delimiter-based value extraction (with safe empty return)
  • isNone - Platform None / no Windows Machines detection (queries Machines by label)
  • extractInstanceID - JSON provider ID parsing for nodes and machines
  • waitUntilWMCOStatusChanged - WMCO log polling with timeout
  • isBYOH - BYOH label detection on nodes

Additional improvements

  • IPv6-safe URL construction using net.JoinHostPort for metrics endpoint
  • g.Skip when < 2 Windows nodes for cross-node HTTP rejection test
  • execInPod errors logged instead of silently discarded
  • Error wrapping with %w instead of %v in extractInstanceID

Documentation

All 17 functions in utils.go now have one-line comments.

Test list (11 total: 6 batch 1 + 5 batch 2)

OCP-25074 - Verify kubelet version label on Windows nodes (Batch 1)
OCP-32554 - Verify WMCO metrics are exposed (Batch 1)
OCP-32615 - Generate userData secret (Batch 1)
OCP-33612 - Verify Windows node readiness (Batch 1)
OCP-37362 - Verify WMCO golang version (Batch 1)
OCP-38188 - Get Windows instance/core number and CPU arch (Batch 1)
OCP-33768 - Verify Prometheus alert rules for Windows [NEW]
OCP-60814 - Verify containerd version matches Makefile [NEW]
OCP-70922 - Monitor pod metrics + CPU utilisation rule (OCPBUGS-85061) [NEW]
OCP-77777 - Verify ServiceMonitor, HTTPS metrics, HTTP rejection [NEW]
OCP-79251 - Verify provider ID matching [NEW]

Jira

  • Epic: WINC-1966 - OTE Migration
  • Story: WINC-1967 - Batch 2 Monitoring & Observability
  • Bug: OCPBUGS-85061 - CPU utilisation recording rule fix verification
  • Related: WINC-1931 - Replace SSH/bastion with oc exec
  • Follow-up: WINC-1978 - Disable OCP-33779 in OTP

Dependencies

Stacked on Batch 1 PR #4279 - must merge first.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 13, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 13, 2026

Copy link
Copy Markdown

@rrasouli: This pull request references WINC-1967 which is a valid jira issue.

Details

In response to this:

Summary

Migrates 4 monitoring/observability tests from OTP to the OTE Ginkgo framework, continuing the batch migration tracked in WINC-1966. This PR stacks on Batch 1 (#4279).

New tests migrated:

  • OCP-33768 - Validates Prometheus alert rules are present and active for Windows nodes
  • OCP-60814 - Verifies containerd version on Windows nodes matches upstream Makefile
  • OCP-77777 - Tests ServiceMonitor creation, HTTPS metrics on port 9182, WMCO log validation, and HTTP rejection
  • OCP-79251 - Validates provider ID consistency between nodes and machines (with BYOH skip)

Test removed (not migrated):

  • OCP-33779 (Node logs validation) - Removed because it is fully redundant with WMCO's existing e2e coverage in test/e2e/logs_test.go:testNodeLogs, which already validates the same 6 log paths via oc adm node-logs. Disabling in OTP tracked in WINC-1978.

Key Changes

New generic execInPod() helper (WINC-1931)

Replaces SSH/bastion access pattern with oc exec into any pod. Used by OCP-33768 (prometheus pod), OCP-32554 and OCP-77777 (WMCO pod). Aligns with WINC-1931 refactoring initiative.

Extracted wmcoDeployment variable

"deployment.apps/windows-machine-config-operator" extracted to a reusable variable, eliminating 5+ hardcoded occurrences.

Simplified truncatedVersion() with regex

Replaced truncatedVersion + removeOuterQuotes (17 lines, 2 functions) with a single 7-line regex-based truncatedVersion. removeOuterQuotes deleted as unused.

New utility functions (all with comments)

  • getContainerdVersion - Node containerRuntimeVersion field parsing
  • getValueFromText - Line search and delimiter-based value extraction
  • isNone - Platform None / missing MachineSet detection
  • extractInstanceID - JSON provider ID parsing for nodes and machines
  • waitUntilWMCOStatusChanged - WMCO log polling with timeout
  • isBYOH - BYOH label detection on nodes

Documentation

All 17 functions in utils.go now have one-line comments.

Test list (9 total: 5 batch 1 + 4 batch 2)

OCP-25074 - Verify kubelet version label on Windows nodes (Batch 1)
OCP-32554 - Verify WMCO metrics are exposed (Batch 1)
OCP-33612 - Verify Windows node readiness (Batch 1)
OCP-33768 - Verify Prometheus alert rules for Windows [NEW]
OCP-42636 - Verify go language version on Windows (Batch 1)
OCP-47717 - Verify kubelet version matches (Batch 1)
OCP-60814 - Verify containerd version matches upstream [NEW]
OCP-77777 - Verify ServiceMonitor and HTTPS metrics [NEW]
OCP-79251 - Verify provider ID matching [NEW]

Jira

  • Epic: WINC-1966 - OTE Migration
  • Story: WINC-1967 - Batch 2 Monitoring & Observability
  • Related: WINC-1931 - Replace SSH/bastion with oc exec
  • Follow-up: WINC-1978 - Disable OCP-33779 in OTP

Dependencies

Stacked on Batch 1 PR #4279 - must merge first.

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 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 Jul 13, 2026
@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

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

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

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), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: bbfa5cb4-a1fe-47e7-9ad2-a18112b1f96b

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

The Windows e2e utilities now provide cluster queries, version parsing, Prometheus metric extraction, WMCO log parsing, pod execution, provider ID extraction, platform detection, and BYOH checks. Existing tests use shared WMCO deployment helpers. New tests validate Prometheus rules, containerd versions, windows-exporter configuration and HTTPS behavior, and provider ID consistency between Windows Nodes and Machines.

Suggested reviewers: jrvaldes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 4 warnings)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error New logs print node hostnames, raw node/machine JSON, provider IDs, and internal IPs, exposing internal cluster identifiers. Redact or remove those values from logs; keep only counts, statuses, or sanitized identifiers, and never dump raw JSON or host/IP data.
Go Best Practices & Build Tags ⚠️ Warning utils.go still returns fmt.Errorf(... %v) in getKubeletVersionWithRetry, violating the required %w error wrapping; build tags are absent as expected. Change the return to fmt.Errorf("failed to get kubelet version after retries: %w", err).
Platform-Specific Requirements ⚠️ Warning The PR adds generic Windows observability tests, but no vSphere/AWS/Azure/GCP-specific checks or limitation docs; only a BYOH/platform-none skip exists. Add platform-conditional coverage and docs: vSphere naming limits, AWS EC2LaunchV2, Azure cloud-node-manager, GCP hostname script, and explicit limitation notes.
Test Structure And Quality ⚠️ Warning Several It blocks mix unrelated checks (notably 33612, 32615, 77777), and many Expect(err).NotTo(HaveOccurred()) calls lack diagnostic messages. Split multi-behavior tests into focused Its, add cleanup for any mutated state, and add context-rich messages to bare Expect(err) assertions.
Microshift Test Compatibility ⚠️ Warning Added Windows e2e tests call config.openshift.io, openshift-monitoring, and Machine API resources with no MicroShift skip/tag guard. Add [Skipped:MicroShift] or [apigroup:config.openshift.io]/[apigroup:machine.openshift.io] tags, or gate early with exutil.IsMicroShiftCluster()+g.Skip().
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Security: Secrets, Ssh & Csr ✅ Passed The PR only migrates e2e tests; it uses oc exec instead of SSH, and secret/public-key data is compared without logging contents.
Kubernetes Controller Patterns ✅ Passed PR touches only e2e test utilities/suites; no controller/reconcile, finalizer, status, predicate, or owner-ref logic is in scope.
Windows Service Management ✅ Passed PR only adds Windows e2e monitoring/version/provider-ID tests; no service priority/dependency/cleanup/SCM logic is introduced, so this check is not applicable.
Stable And Deterministic Test Names ✅ Passed All Ginkgo titles in ote/test/e2e are static string literals; no fmt.Sprintf/concatenated or runtime-derived names were found.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only 77777 needs 2 Windows nodes, and it explicitly g.Skips when fewer exist; the other added tests don’t require HA or multi-node topology.
Topology-Aware Scheduling Compatibility ✅ Passed Only e2e tests/helpers changed; no manifests, operator code, or controllers were modified, and there are no affinity, topology-spread, replica, or nodeSelector changes.
Ote Binary Stdout Contract ✅ Passed No stdout writes appear in main/TestMain/BeforeSuite paths; new fmt/log calls are inside It/BeforeEach only, and OTE main uses logs.InitLogs() (stderr by default).
Ipv6 And Disconnected Network Test Compatibility ✅ Passed New tests use cluster-internal services only, and IPv6-sensitive URLs use net.JoinHostPort; no hardcoded IPv4 or public-internet calls found.
No-Weak-Crypto ✅ Passed No MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons were added; remaining string compares are for versions only.
Container-Privileges ✅ Passed PR only changes Go e2e helpers/tests; no container/K8s manifests or securityContext privilege flags were added.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main goal: migrating Batch 2 monitoring and observability tests to OTE.
✨ 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.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2026
@rrasouli

Copy link
Copy Markdown
Contributor Author

/approve cancel

@openshift-ci openshift-ci Bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Nitpick comments (1)
ote/test/e2e/utils.go (1)

268-305: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

wait.Poll is deprecated.

wait.Poll (line 274) is deprecated in favor of context-aware polling (wait.PollUntilContextTimeout) and is documented as "Will be removed in a future release" in k8s.io/apimachinery. Since apimachinery is already pinned at v0.35.1 in go.mod, consider migrating now to avoid a forced rewrite later.

🤖 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 `@ote/test/e2e/utils.go` around lines 268 - 305, The waitUntilWMCOStatusChanged
function still uses deprecated wait.Poll; migrate this polling call to
wait.PollUntilContextTimeout using an appropriate context and the existing poll
interval and timeout, while preserving the current log retrieval, retry
behavior, and final assertion.
🤖 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 `@ote/cmd/wmco-tests-ext/main.go`:
- Around line 34-35: Ensure the error paths in main, including the additional
occurrence around the referenced later lines, flush logs before calling
os.Exit(1). Update the control flow around logs.FlushLogs and os.Exit so
deferred cleanup is not relied upon when terminating the process.

In `@ote/test/e2e/utils.go`:
- Around line 219-226: Update the error construction in the jq execution flow
around cmd.Output() to wrap err with %w instead of %v, preserving
errors.Is/errors.As unwrapping while retaining the existing resourceType context
and logging.
- Around line 173-184: Update getValueFromText to handle the case where no line
contains searchVal before indexing the split result. Return a safe empty value
(or otherwise preserve the caller’s expected clean-failure behavior) when
searchVal is absent, while retaining the existing trimmed substring behavior
when it is found.

In `@ote/test/e2e/winc.go`:
- Around line 311-317: Replace the assertion on len(winInternalIPs) in the
“Verifying HTTP is not allowed on metrics endpoint” test with a conditional skip
when fewer than two Windows internal IPs are available. Keep the cross-node curl
and response validation unchanged for clusters with at least two nodes.
- Around line 311-317: Update the metrics endpoint URL construction in the HTTP
rejection test to use IPv6-safe host/port joining via the existing
net.JoinHostPort pattern, preserving the winInternalIPs[1] address, port 9182,
and /metrics path.
- Line 193: The call sites invoking execInPod in the relevant test cases discard
execution errors; capture and log the returned error before evaluating the
command output. Update both the curl check and the other execInPod call noted by
the review, preserving their existing stdout assertions while ensuring transport
or execution failures are visible.
- Around line 262-285: Remove the public GitHub request from the
“Smokerun-Author:rrasouli-Medium-60814-Check containerd version is properly
reported” test and source the expected containerd version from an already
available in-cluster WMCO artifact via the existing oc-based helpers. Preserve
the comparison against getContainerdVersion for each Windows host, and ensure
any retained HTTP request uses a bounded timeout and response cleanup.
- Around line 113-117: Replace the shell-based file read in the smokerun test
with direct os.ReadFile(publicKey), adding the os import as needed. Preserve the
existing error assertion and public-key parsing behavior after reading the file.

---

Nitpick comments:
In `@ote/test/e2e/utils.go`:
- Around line 268-305: The waitUntilWMCOStatusChanged function still uses
deprecated wait.Poll; migrate this polling call to wait.PollUntilContextTimeout
using an appropriate context and the existing poll interval and timeout, while
preserving the current log retrieval, retry behavior, and final assertion.
🪄 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: cfd8a973-dd13-441c-acd4-2059efa5ed34

📥 Commits

Reviewing files that changed from the base of the PR and between d6aac66 and 76a75f1.

⛔ Files ignored due to path filters (1)
  • ote/go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • ote/OWNERS
  • ote/cmd/wmco-tests-ext/main.go
  • ote/go.mod
  • ote/test/e2e/utils.go
  • ote/test/e2e/winc.go
  • ote/test/extended/cli/cli.go
  • ote/test/extended/cluster.go
💤 Files with no reviewable changes (2)
  • ote/test/extended/cli/cli.go
  • ote/test/extended/cluster.go

Comment thread ote/cmd/wmco-tests-ext/main.go
Comment thread ote/test/e2e/utils.go Outdated
Comment thread ote/test/e2e/utils.go Outdated
Comment thread ote/test/e2e/winc.go Outdated
Comment thread ote/test/e2e/winc.go Outdated
Comment thread ote/test/e2e/winc.go
Comment thread ote/test/e2e/winc.go
@rrasouli
rrasouli force-pushed the winc-1966-ote-batch2-monitoring branch 4 times, most recently from 221c5b3 to f08a92b Compare July 15, 2026 17:41
@rrasouli

Copy link
Copy Markdown
Contributor Author

@CodeRabbit full review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
ote/test/e2e/winc.go (1)

275-279: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

getContainerdVersion(oc, winhost) is called twice per host.

The comparison calls it once, and the Failf message calls it again — doubling the remote exec cost per host and risking a slightly inconsistent message if the value could change between calls. Cache it once per iteration; also prefer != over strings.Compare(...) != 0 for equality checks.

♻️ Proposed fix
 for _, winhost := range getWindowsHostNames(oc) {
-    if strings.Compare(submoduleContainerdVersion, getContainerdVersion(oc, winhost)) != 0 {
-        e2e.Failf("Containerd version mismatch expected %s actual %s", submoduleContainerdVersion, getContainerdVersion(oc, winhost))
-    }
+    actualVersion := getContainerdVersion(oc, winhost)
+    if submoduleContainerdVersion != actualVersion {
+        e2e.Failf("Containerd version mismatch expected %s actual %s", submoduleContainerdVersion, actualVersion)
+    }
 }
🤖 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 `@ote/test/e2e/winc.go` around lines 275 - 279, Within the host loop, update
the version check around getContainerdVersion to assign its result to a local
variable once, then compare that cached value directly with != against
submoduleContainerdVersion and reuse it in e2e.Failf. Remove the unnecessary
strings.Compare call while preserving the existing mismatch message and
behavior.
🤖 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 `@ote/test/e2e/utils.go`:
- Line 155: Update the error construction in the kubelet-version retry flow to
use `%w` for the underlying err instead of `%v`, preserving the existing context
message and enabling callers to unwrap the error with errors.Is or errors.As.
- Around line 214-266: Update extractInstanceID to replace the jq subprocess
with native gjson parsing of .items, extracting each metadata.name and
spec.providerID while preserving the existing validation, logging, and error
behavior. Compile the providerID regex once before iterating over items, then
reuse it for every entry instead of calling regexp.MustCompile inside the loop.

In `@ote/test/e2e/winc.go`:
- Around line 344-367: Update the lookup in the validation loop around
getWindowsHostNames and nodeProviderIDs so both use the same node identifier
field. Prefer returning .metadata.name from getWindowsHostNames, or otherwise
make its contract match the nodeProviderIDs key, while preserving the existing
provider-ID and Machine association checks.

---

Nitpick comments:
In `@ote/test/e2e/winc.go`:
- Around line 275-279: Within the host loop, update the version check around
getContainerdVersion to assign its result to a local variable once, then compare
that cached value directly with != against submoduleContainerdVersion and reuse
it in e2e.Failf. Remove the unnecessary strings.Compare call while preserving
the existing mismatch message and behavior.
🪄 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: c7ad0d25-e2d1-4879-8dd2-0e0b2d8df951

📥 Commits

Reviewing files that changed from the base of the PR and between f722a27 and f08a92b.

📒 Files selected for processing (2)
  • ote/test/e2e/utils.go
  • ote/test/e2e/winc.go

Comment thread ote/test/e2e/utils.go Outdated
Comment thread ote/test/e2e/utils.go
Comment thread ote/test/e2e/winc.go Outdated
@rrasouli
rrasouli force-pushed the winc-1966-ote-batch2-monitoring branch from f08a92b to 53b93b7 Compare July 15, 2026 20:04
@rrasouli
rrasouli marked this pull request as ready for review July 16, 2026 16:04
@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 Jul 16, 2026
@rrasouli
rrasouli force-pushed the winc-1966-ote-batch2-monitoring branch 4 times, most recently from efa210f to db56e27 Compare July 20, 2026 04:03
@rrasouli

Copy link
Copy Markdown
Contributor Author

/test vsphere-disconnected-e2e-operator

@wgahnagl

Copy link
Copy Markdown
Contributor

/lgtm

This looks great!

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2026
@rrasouli

Copy link
Copy Markdown
Contributor Author

/test aws-e2e-ote

@rrasouli
rrasouli force-pushed the winc-1966-ote-batch2-monitoring branch 4 times, most recently from 6767a9e to bb5619a Compare July 24, 2026 06:57
@rrasouli

Copy link
Copy Markdown
Contributor Author

/retest

Migrate 5 monitoring/observability Smokerun tests from OTP to WMCO OTE:

- OCP-33768: Prometheus alert rules ignore Windows nodes
- OCP-60814: Containerd version matches Makefile
- OCP-70922: Pod CPU/Memory/Filesystem metrics + OCPBUGS-85061
- OCP-77777: ServiceMonitor, HTTPS metrics, HTTP rejection
- OCP-79251: Provider ID matching between nodes and machines

Dropped OCP-33779 (node logs validation) - covered by WMCO e2e testNodeLogs.

CI fixes included:
- OCP-60814: Skip when WMCO version ends with -dirty (PR builds)
- OCP-79251: Fix isNone() to query Machines instead of MachineSets
- Fix OTE SSH key loading for CI environments
- Fix OTE build for local and CI environments
@rrasouli
rrasouli force-pushed the winc-1966-ote-batch2-monitoring branch from bb5619a to 9e966c1 Compare July 26, 2026 11:14
@jrvaldes

Copy link
Copy Markdown
Contributor

/hold

@rrasouli aws-e2e-ote — Job failed. PTAL

@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 Jul 28, 2026
@rrasouli

Copy link
Copy Markdown
Contributor Author

/hold

@rrasouli aws-e2e-ote — Job failed. PTAL

@jrvaldes failed due to bug https://redhat.atlassian.net/browse/WINC-2009

@rrasouli

Copy link
Copy Markdown
Contributor 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 Jul 28, 2026
@mansikulkarni96

Copy link
Copy Markdown
Member

@rrasouli can you point me to the log where it says the test failed due to kubelet mismatch?

@jrvaldes

Copy link
Copy Markdown
Contributor

/test vsphere-disconnected-e2e-operator

@rrasouli I dont think the changes introduced in the PR are affect in the e2e test suite.

please open a PR in the release repo skipping the e2e test for changes in /ote dir

@jrvaldes

Copy link
Copy Markdown
Contributor

/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/vsphere-proxy-e2e-operator ci/prow/images ci/prow/lint ci/prow/security ci/prow/unit ci/prow/wicd-unit-vsphere ci/prow/ci-bundle-wmco-bundle

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@jrvaldes: Overrode contexts on behalf of jrvaldes: ci/prow/aws-e2e-operator, ci/prow/azure-e2e-operator, ci/prow/azure-e2e-upgrade, ci/prow/ci-bundle-wmco-bundle, ci/prow/gcp-e2e-operator, ci/prow/images, ci/prow/lint, ci/prow/nutanix-e2e-operator, ci/prow/platform-none-vsphere-e2e-operator, ci/prow/security, ci/prow/unit, ci/prow/vsphere-disconnected-e2e-operator, ci/prow/vsphere-e2e-operator, ci/prow/vsphere-proxy-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/vsphere-proxy-e2e-operator ci/prow/images ci/prow/lint ci/prow/security ci/prow/unit ci/prow/wicd-unit-vsphere ci/prow/ci-bundle-wmco-bundle

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

@rrasouli aws-e2e-ote — Job failed. PTAL

@jrvaldes failed due to bug https://redhat.atlassian.net/browse/WINC-2009

@rrasouli this is not a bug and is already tracked by https://redhat.atlassian.net/browse/WINC-1992

@rrasouli

Copy link
Copy Markdown
Contributor Author

@rrasouli aws-e2e-ote — Job failed. PTAL

@jrvaldes failed due to bug https://redhat.atlassian.net/browse/WINC-2009

@rrasouli this is not a bug and is already tracked by https://redhat.atlassian.net/browse/WINC-1992

@jrvaldes anyway this issue is failing the test and the entire job @mansikulkarni96

@jrvaldes

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2026
@rrasouli

Copy link
Copy Markdown
Contributor Author

/approve

@rrasouli

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rrasouli
Once this PR has been reviewed and has the lgtm label, please ask for approval from jrvaldes. 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

@rrasouli

Copy link
Copy Markdown
Contributor Author

/lgtm

can you approve as well? please

@rrasouli

Copy link
Copy Markdown
Contributor Author

/test aws-e2e-test

@rrasouli

Copy link
Copy Markdown
Contributor Author

/test aws-e2e-ote

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@rrasouli: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/aws-e2e-ote 9e966c1 link false /test aws-e2e-ote

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

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.

5 participants