Skip to content

Add e2e test for vSphere multi-vCenter Day 2 using openshift-tests-ex… - #66

Open
jcpowermac wants to merge 3 commits into
openshift:mainfrom
jcpowermac:e2e-multi-vcenter-day2
Open

Add e2e test for vSphere multi-vCenter Day 2 using openshift-tests-ex…#66
jcpowermac wants to merge 3 commits into
openshift:mainfrom
jcpowermac:e2e-multi-vcenter-day2

Conversation

@jcpowermac

@jcpowermac jcpowermac commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

…tension

Adds an OTE-integrated e2e test that exercises adding a second vCenter
to a running cluster via the VmwareCloudFoundationMigration CR. The test
verifies the full cloud config pipeline: Infrastructure CR, cloud-provider-config
in openshift-config, kube-cloud-config in openshift-config-managed (CCCMO),
cloud-conf in openshift-cloud-controller-manager (CCM), and pod health.

The test is gated behind [OCPFeatureGate:VSphereMultiVCenterDay2] and
[platform:vsphere] so it only runs on vSphere clusters with the feature
gate enabled and a pre-created Migration CR.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Summary by CodeRabbit

  • New Features
    • Added vSphere multi-vCenter Day 2 end-to-end test coverage, including migration state handling, multi-site configuration verification, configuration propagation checks, and component health validation.
    • Added an end-to-end test extension and dedicated command for running the vSphere multi-vCenter scenario.
  • Documentation
    • Added a testing plan covering setup, validation steps, and verification.
  • Chores
    • Refined linting exclusions for vSphere end-to-end tests.
    • Updated project tooling to support the new test workflow.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Walkthrough

Adds an OpenShift tests extension binary, a vSphere Multi-VCenter Day 2 Ginkgo suite, helper utilities, build and lint wiring, and a test plan.

Changes

vSphere Multi-VCenter Day 2 E2E

Layer / File(s) Summary
Extension dependencies and entrypoint
go.mod, cmd/openshift-tests-extension/main.go, Makefile, .golangci.yml
Adds the OTE and Ginkgo dependencies, registers and filters the vSphere suite, adds build and run targets, and excludes ST1001 findings for test/e2e/*.
Configuration and pod test helpers
test/e2e/vsphere/helpers.go
Adds helpers to retrieve and parse cloud configuration and verify pod readiness.
Multi-VCenter migration validation
test/e2e/vsphere/multi_vcenter_day2.go
Adds feature-gated migration execution, condition polling, Infrastructure assertions, configuration propagation checks, and CCCMO and CCM pod health checks.
Test plan and verification
docs/plans/e2e-multi-vcenter-day2.md
Documents the test flow, OTE conventions, helper utilities, affected files, and verification commands.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: mtulio, vr4manta

Sequence Diagram(s)

sequenceDiagram
  participant Test as VSphereMultiVCenterDay2
  participant Migration as VmwareCloudFoundationMigration
  participant Infrastructure
  participant ConfigMaps
  participant Pods
  Test->>Migration: Set state to Running
  Test->>Migration: Poll MultiSiteConfigured=True
  Test->>Infrastructure: Verify vCenters and failure domains
  Test->>ConfigMaps: Verify propagated vCenter configuration
  Test->>Pods: Verify CCCMO and CCM readiness
Loading

Important

Pre-merge checks failed

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

❌ Failed checks (1 error, 3 warnings)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error GinkgoWriter prints raw vCenter server lists from cluster CRs and ConfigMaps (multi_vcenter_day2.go:102,145,166,181,206); these can be internal hostnames. Remove raw server values from GinkgoWriter and failure messages, or redact hostnames. Log only counts and non-sensitive verification results.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ⚠️ Warning The test updates a pre-existing Migration CR to Running without cleanup and has bare error assertions at lines 114, 171, 175, and 187; its five Eventually calls have explicit timeouts. Add AfterEach/DeferCleanup to restore or isolate the migration fixture and add diagnostic messages to every error assertion, including assertions inside Eventually.
Microshift Test Compatibility ⚠️ Warning The new Describe/It reads config.openshift.io Infrastructure and feature-gate data and uses OpenShift control-plane namespaces; no MicroShift skip, apigroup tag, or runtime guard exists. Add [apigroup:config.openshift.io] (and the migration API group if needed), [Skipped:MicroShift], or an IsMicroShiftCluster/g.Skip guard; otherwise run the MicroShift conformance job.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding an end-to-end vSphere multi-vCenter Day 2 test using openshift-tests-extension.
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.
Stable And Deterministic Test Names ✅ Passed The added Ginkgo Describe, It, and By titles are fixed string literals; pod, namespace, vCenter, and failure-domain values appear only in test logic or diagnostics.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The new Ginkgo test checks vSphere configuration, ConfigMaps, and pod readiness only; it does not require multiple nodes, node roles, placement, failover, or HA.
Topology-Aware Scheduling Compatibility ✅ Passed The PR adds an OTE CLI, E2E test/helpers, docs, Makefile targets, and dependencies; the complete diff adds no Kubernetes scheduling constraints or operator/controller manifests.
Ote Binary Stdout Contract ✅ Passed main.go has no direct stdout or logger writes; OTE configures GinkgoWriter and GinkgoLogr to os.Stderr, while added test output uses GinkgoWriter inside test hooks.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The new Ginkgo test uses only the cluster API and vCenter values read from existing cluster resources; it has no hardcoded IPv4 addresses, IP parsing, URL construction, or public-network access.
No-Weak-Crypto ✅ Passed PR code and changed vendor files add no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or secret/token comparisons; existing crypto use is TLS only.
Container-Privileges ✅ Passed The full PR diff adds no privileged, host namespace, SYS_ADMIN, or allowPrivilegeEscalation:true settings; existing operator manifests use runAsNonRoot:true and allowPrivilegeEscalation:false.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from mtulio and vr4manta June 24, 2026 14:45
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcpowermac

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:

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2026
@jcpowermac
jcpowermac force-pushed the e2e-multi-vcenter-day2 branch from fdba91f to 40a6bd7 Compare June 24, 2026 15:40

@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: 1

🧹 Nitpick comments (1)
docs/plans/e2e-multi-vcenter-day2.md (1)

20-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add a language to fenced code blocks.

The fenced blocks at Line 20 and Line 148 lack a language specifier (markdownlint MD040). Use ```text (or ```go / ```sh) as appropriate.

🤖 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 `@docs/plans/e2e-multi-vcenter-day2.md` around lines 20 - 22, The fenced code
blocks in this markdown plan are missing a language specifier and trigger
markdownlint MD040. Update the affected fenced blocks in the document, including
the one containing the dependency replacement near the top and the other
matching fence later in the file, by adding an appropriate label such as text,
go, or sh so the code fences are explicitly typed.

Source: Linters/SAST tools

🤖 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 `@test/e2e/vsphere/multi_vcenter_day2.go`:
- Around line 64-66: The platform guard in the vSphere e2e test is using the
non-authoritative infra.Spec.PlatformSpec.Type, which can be empty on installed
clusters and cause incorrect skips. Update the platform check in the test logic
that gates multi_vcenter_day2.go to use infra.Status.PlatformStatus.Type
instead, keeping the existing vSphere skip behavior but basing it on the
authoritative status field.

---

Nitpick comments:
In `@docs/plans/e2e-multi-vcenter-day2.md`:
- Around line 20-22: The fenced code blocks in this markdown plan are missing a
language specifier and trigger markdownlint MD040. Update the affected fenced
blocks in the document, including the one containing the dependency replacement
near the top and the other matching fence later in the file, by adding an
appropriate label such as text, go, or sh so the code fences are explicitly
typed.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9914b0c9-dbda-4c6d-a531-b0134c263ff7

📥 Commits

Reviewing files that changed from the base of the PR and between fdba91f and 40a6bd7.

⛔ Files ignored due to path filters (52)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/onsi/ginkgo/v2/OWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/spec_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/suite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/suite_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmd.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdimages/cmdimages.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdinfo/info.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdlist/list.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdrun/runsuite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdrun/runtest.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdupdate/update.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/dbtime/time.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extension.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/environment.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/result.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/result_writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/scheduler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/spec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/task.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/viewer.html is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/registry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/component.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/concurrency.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/environment.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/names.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/output.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/suite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/logging.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/parallel.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/junit/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/byte.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/empty.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int32.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int64.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/set.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/version/version.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (7)
  • .golangci.yml
  • Makefile
  • cmd/openshift-tests-extension/main.go
  • docs/plans/e2e-multi-vcenter-day2.md
  • go.mod
  • test/e2e/vsphere/helpers.go
  • test/e2e/vsphere/multi_vcenter_day2.go
✅ Files skipped from review due to trivial changes (1)
  • .golangci.yml
🚧 Files skipped from review as they are similar to previous changes (4)
  • cmd/openshift-tests-extension/main.go
  • test/e2e/vsphere/helpers.go
  • Makefile
  • go.mod

Comment thread test/e2e/vsphere/multi_vcenter_day2.go Outdated
@jcpowermac
jcpowermac force-pushed the e2e-multi-vcenter-day2 branch from 40a6bd7 to 7cf35b2 Compare June 24, 2026 16:22
  Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tension

  Adds an OTE-integrated e2e test that exercises adding a second vCenter
  to a running cluster via the VmwareCloudFoundationMigration CR. The test
  verifies the full cloud config pipeline: Infrastructure CR, cloud-provider-config
  in openshift-config, kube-cloud-config in openshift-config-managed (CCCMO),
  cloud-conf in openshift-cloud-controller-manager (CCM), and pod health.

  The test is gated behind [OCPFeatureGate:VSphereMultiVCenterDay2] and
  [platform:vsphere] so it only runs on vSphere clusters with the feature
  gate enabled and a pre-created Migration CR.

  Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  Spec.PlatformSpec.Type can be empty on installed clusters. Use the
  authoritative Status.PlatformStatus.Type field instead with a nil guard.

  Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jcpowermac
jcpowermac force-pushed the e2e-multi-vcenter-day2 branch from 7cf35b2 to 9dedcae Compare August 10, 2026 19:28
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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: 4

🤖 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 `@docs/plans/e2e-multi-vcenter-day2.md`:
- Around line 148-150: Update the command fence around the
openshift-tests-extension example to specify the shell language identifier,
changing the unlabeled fence to a shell-labeled fence while preserving the
command and surrounding documentation.

In `@test/e2e/vsphere/multi_vcenter_day2.go`:
- Around line 75-82: Update the VmwareCloudFoundationMigration selection after
crClient.List to avoid using unordered migrationList.Items[0]. Continue skipping
when no CR exists, then require exactly one migration CR or select the intended
resource by its configured name and namespace before changing its state.
- Around line 51-57: Regenerate and commit the API deepcopy output so
VmwareCloudFoundationMigration and VmwareCloudFoundationMigrationList implement
runtime.Object with DeepCopyObject methods. Ensure the generated methods are
available before migrationv1alpha1.AddToScheme registers the scheme in the test.
- Around line 100-103: Sanitize test logging in
test/e2e/vsphere/multi_vcenter_day2.go: at lines 100-103, 145, 166, 181, and
206, log only the counts of the parsed vCenter server collections or maps
instead of their contents; at lines 120-122, omit cond.Message or redact it
before logging. Preserve the existing assertions and status information while
ensuring no internal hostnames or unfiltered operator output is emitted.
🪄 Autofix

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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 50b05506-c968-411a-960f-80489cc17bae

📥 Commits

Reviewing files that changed from the base of the PR and between bd16f8e and 9dedcae.

⛔ Files ignored due to path filters (52)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/onsi/ginkgo/v2/OWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/spec_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/suite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/suite_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmd.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdimages/cmdimages.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdinfo/info.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdlist/list.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdrun/runsuite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdrun/runtest.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdupdate/update.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/dbtime/time.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extension.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/environment.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/result.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/result_writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/scheduler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/spec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/task.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/viewer.html is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/registry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/component.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/concurrency.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/environment.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/names.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/output.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/suite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/logging.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/parallel.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/junit/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/byte.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/empty.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int32.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int64.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/set.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/version/version.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (7)
  • .golangci.yml
  • Makefile
  • cmd/openshift-tests-extension/main.go
  • docs/plans/e2e-multi-vcenter-day2.md
  • go.mod
  • test/e2e/vsphere/helpers.go
  • test/e2e/vsphere/multi_vcenter_day2.go
🚧 Files skipped from review as they are similar to previous changes (5)
  • .golangci.yml
  • test/e2e/vsphere/helpers.go
  • go.mod
  • cmd/openshift-tests-extension/main.go
  • Makefile

Comment on lines +148 to +150
```
./bin/openshift-tests-extension run --suite example/tests
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language identifier to the command fence.

Line 148 has no language identifier. This fails markdownlint rule MD040. Use shell.

Proposed fix
-   ```
+   ```shell
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
./bin/openshift-tests-extension run --suite example/tests
```
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)

[warning] 148-148: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 `@docs/plans/e2e-multi-vcenter-day2.md` around lines 148 - 150, Update the
command fence around the openshift-tests-extension example to specify the shell
language identifier, changing the unlabeled fence to a shell-labeled fence while
preserving the command and surrounding documentation.

Source: Linters/SAST tools

Comment on lines +51 to +57
scheme := runtime.NewScheme()
err = migrationv1alpha1.AddToScheme(scheme)
Expect(err).NotTo(HaveOccurred(), "failed to add migration scheme")
err = configv1.Install(scheme)
Expect(err).NotTo(HaveOccurred(), "failed to install configv1 scheme")

crClient, err = client.New(cfg, client.Options{Scheme: scheme})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Regenerate the API deepcopy methods before registering this scheme.

The current package cannot type-check. Static analysis shows that VmwareCloudFoundationMigration and VmwareCloudFoundationMigrationList do not implement runtime.Object because they lack DeepCopyObject. Regenerate and commit the API deepcopy output before this test imports and registers the migration scheme.

🤖 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 `@test/e2e/vsphere/multi_vcenter_day2.go` around lines 51 - 57, Regenerate and
commit the API deepcopy output so VmwareCloudFoundationMigration and
VmwareCloudFoundationMigrationList implement runtime.Object with DeepCopyObject
methods. Ensure the generated methods are available before
migrationv1alpha1.AddToScheme registers the scheme in the test.

Source: Linters/SAST tools

Comment on lines +75 to +82
By("Finding VmwareCloudFoundationMigration CR")
migrationList := &migrationv1alpha1.VmwareCloudFoundationMigrationList{}
err = crClient.List(ctx, migrationList)
Expect(err).NotTo(HaveOccurred(), "failed to list VmwareCloudFoundationMigration CRs")
if len(migrationList.Items) == 0 {
Skip("skipping: no VmwareCloudFoundationMigration CR found in cluster")
}
migration = &migrationList.Items[0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Select one explicit migration CR before changing its state.

Line 82 selects the first item from an unordered list. If multiple migration CRs exist, this test can set spec.state to Running on the wrong resource. Skip when no CR exists, then require exactly one CR or select the intended CR by a configured name and namespace.

🤖 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 `@test/e2e/vsphere/multi_vcenter_day2.go` around lines 75 - 82, Update the
VmwareCloudFoundationMigration selection after crClient.List to avoid using
unordered migrationList.Items[0]. Continue skipping when no CR exists, then
require exactly one migration CR or select the intended resource by its
configured name and namespace before changing its state.

Comment on lines +100 to +103
baselineServers, err := parseVCenterServersFromConfig(baselineCM, "config")
Expect(err).NotTo(HaveOccurred(), "failed to parse baseline cloud-provider-config")
GinkgoWriter.Printf("Baseline vCenters in cloud-provider-config: %v\n", baselineServers)
GinkgoWriter.Printf("Baseline vCenters in Infrastructure CR: %d\n", initialVCenterCount)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Do not write vCenter server names or unfiltered condition messages to test logs.

GinkgoWriter output can retain internal vCenter hostnames. cond.Message is also unfiltered operator output. Log counts and safe identifiers instead, or redact sensitive values.

  • test/e2e/vsphere/multi_vcenter_day2.go#L100-L103: replace the baseline server list with a count.
  • test/e2e/vsphere/multi_vcenter_day2.go#L120-L122: omit or redact cond.Message.
  • test/e2e/vsphere/multi_vcenter_day2.go#L145-L145: replace the Infrastructure server map with a count.
  • test/e2e/vsphere/multi_vcenter_day2.go#L166-L166: replace the cloud-provider-config server list with a count.
  • test/e2e/vsphere/multi_vcenter_day2.go#L181-L181: replace the kube-cloud-config server list with a count.
  • test/e2e/vsphere/multi_vcenter_day2.go#L206-L206: replace the cloud-conf server list with a count.

As per coding guidelines, flag logging that may expose passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data.

📍 Affects 1 file
  • test/e2e/vsphere/multi_vcenter_day2.go#L100-L103 (this comment)
  • test/e2e/vsphere/multi_vcenter_day2.go#L120-L122
  • test/e2e/vsphere/multi_vcenter_day2.go#L145-L145
  • test/e2e/vsphere/multi_vcenter_day2.go#L166-L166
  • test/e2e/vsphere/multi_vcenter_day2.go#L181-L181
  • test/e2e/vsphere/multi_vcenter_day2.go#L206-L206
🤖 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 `@test/e2e/vsphere/multi_vcenter_day2.go` around lines 100 - 103, Sanitize test
logging in test/e2e/vsphere/multi_vcenter_day2.go: at lines 100-103, 145, 166,
181, and 206, log only the counts of the parsed vCenter server collections or
maps instead of their contents; at lines 120-122, omit cond.Message or redact it
before logging. Preserve the existing assertions and status information while
ensuring no internal hostnames or unfiltered operator output is emitted.

Source: Coding guidelines

@openshift-ci

openshift-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown

@jcpowermac: 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/e2e-vsphere-vcf-migration 9dedcae link false /test e2e-vsphere-vcf-migration

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant