Skip to content

Conversation

@sunzhaohua2
Copy link
Contributor

@sunzhaohua2 sunzhaohua2 commented Nov 26, 2025

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate cluster-capi-operator's E2E tests into the OpenShift origin test framework.

For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.

This is already adopted by other components:

replace #274 to move the tests-extension pkg to a separate module

Local Tests

Get extension usage

$ bin/cluster-capi-operator-ext     [10:29:54]
Cluster CAPI Operator tests extension for OpenShift

Usage:
   [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  images      List test images
  info        Display extension metadata
  list        List items
  run-suite   Run a group of tests by suite. This is more limited than origin, and intended for light local development use. Orchestration parameters, scheduling, isolation, etc are not obeyed, and Ginkgo tests are executed serially.
  run-test    Runs tests by name
  update      Update test metadata

Flags:
  -h, --help   help for this command

Use " [command] --help" for more information about a command.

Get extension definition info

$ bin/cluster-capi-operator-ext info
{
    "apiVersion": "v1.1",
    "source": {
        "commit": "",
        "build_date": "",
        "git_tree_state": ""
    },
    "component": {
        "product": "openshift",
        "type": "payload",
        "name": "cluster-capi-operator"
    },
    "suites": [
        {
            "name": "capio/conformance/parallel",
            "description": "",
            "qualifiers": [
                "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
            ]
        },
        {
            "name": "capio/conformance/serial",
            "description": "",
            "qualifiers": [
                "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
            ]
        },
        {
            "name": "capio/e2e",
            "description": "",
            "qualifiers": [
                "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (name.contains(\"[Feature:ClusterAPI]\") || name.contains(\"[OCPFeatureGate:MachineAPIMigration]\"))"
            ]
        }
    ],
    "images": null
}

List test cases


$ bin/cluster-capi-operator-ext list tests --suite capio/e2e --platform gcp
[
  {
    "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:gcp][Disruptive] Cluster API GCP MachineSet should be able to run a machine",
    "labels": {
      "Conformance": {},
      "Serial": {}
    },
    "resources": {
      "isolation": {}
    },
    "source": "openshift:payload:cluster-capi-operator",
    "codeLocations": [
      "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:26",
      "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:31",
      "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:39",
      "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:50"
    ],
    "lifecycle": "blocking",
    "environmentSelector": {
      "include": "platform==\"gcp\""
    }
  }
]

Run test suites

$ bin/cluster-capi-operator-ext run-test -n "Cluster API AWS MachineSet should be able to run a machine with a default provider spec"
  Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator
  ================================================================================
  Random Seed: 1754022163 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  Cluster API AWS MachineSet should be able to run a machine with a default provider spec
  /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:60
    STEP: Creating AWS machine template @ 08/01/25 12:22:46.259
    STEP: Creating MachineSet "aws-machineset" @ 08/01/25 12:22:47.061
    STEP: Waiting for MachineSet machines "aws-machineset" to enter Running phase @ 08/01/25 12:22:47.611
    STEP: Comparing instances created by MAPI and CAPI @ 08/01/25 12:26:53.233
  Instances created by MAPI and CAPI are not equal
    ec2.Instance{
        ... // 2 ignored and 17 identical fields
  -     InstanceLifecycle: &"spot",
  +     InstanceLifecycle: nil,
        InstanceType:      &"m6i.xlarge",
        Ipv6Address:       nil,
        ... // 1 ignored and 4 identical fields
        MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
        Monitoring:      &{State: &"disabled"},
        NetworkInterfaces: []*ec2.InstanceNetworkInterface{
                &{
                        ... // 2 identical fields
                        ConnectionTrackingConfiguration: nil,
                        Description:                     &"",
                        Groups: []*ec2.GroupIdentifier{
                                &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
  -                             (
  -                                     s"""
  -                                     {
  -                                       GroupId: "sg-050993867b2317f8d",
  -                                       GroupName: "xxia-1-xzx9p-lb"
  -                                     }
  -                                     s"""
  -                             ),
                        },
                        InterfaceType: &"interface",
                        Ipv4Prefixes:  nil,
                        ... // 4 ignored and 8 identical fields
                },
        },
        OutpostArn: nil,
        Placement:  &{AvailabilityZone: &"us-east-2a", GroupName: &"", Tenancy: &"default"},
        ... // 2 ignored and 7 identical fields
        RootDeviceName: &"/dev/xvda",
        RootDeviceType: &"ebs",
        SecurityGroups: []*ec2.GroupIdentifier{
                &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
  -             (
  -                     s"""
  -                     {
  -                       GroupId: "sg-050993867b2317f8d",
  -                       GroupName: "xxia-1-xzx9p-lb"
  -                     }
  -                     s"""
  -             ),
        },
        SourceDestCheck:       &true,
  -     SpotInstanceRequestId: &"sir-c6ez5xin",
  +     SpotInstanceRequestId: nil,
        SriovNetSupport:       nil,
        State:                 &{Code: &16, Name: &"running"},
        ... // 2 ignored and 7 identical fields
    }
    STEP: Deleting MachineSet "aws-machineset" @ 08/01/25 12:26:56.869
    STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 08/01/25 12:26:57.368
    STEP: Deleting /aws-machine-template @ 08/01/25 12:27:55.123
  • [312.054 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 312.056 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Blocks

openshift/origin#30568

Summary by CodeRabbit

  • New Features

    • Added an OpenShift tests extension and included its compressed artifact in the container image.
  • Improvements

    • Enhanced image metadata with a display name and OpenShift tags.
    • Standardized test metadata (platform, Conformance, Serial), added common test initialization, tightened validations and cleanup, and increased test timeouts.
  • Chores

    • Added a build target for the tests extension and updated module/vendor metadata.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci-robot
Copy link

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

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

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 26, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2025

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

replace #274 to move the tests-extension pkg to a separate module

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.

@coderabbitai
Copy link

coderabbitai bot commented Nov 26, 2025

📝 Walkthrough

Walkthrough

Adds an OpenShift tests extension and CLI, includes its gzipped binary in the RHEL image, updates Makefile and vendoring to build the extension, adds InitCommonVariables() calls and test metadata labels across many e2e suites, and bumps/syncs several Go module dependencies.

Changes

Cohort / File(s) Summary
Container & Build
Dockerfile.rhel, Makefile, hack/vendor.sh
Builder gzips bin/cluster-capi-operator-ext; final image includes bin/cluster-capi-operator-ext.gz and label changes; Makefile adds tests-ext target and makes build depend on it; hack/vendor.sh includes openshift-tests-extension in module lists.
New extension module & CLI
openshift-tests-extension/cmd/main.go, openshift-tests-extension/go.mod, openshift-tests-extension/...
New module and CLI that builds an extension registry/payload, registers suites, builds Ginkgo specs, scans for [platform:...] tags, applies PlatformEquals selectors, attaches filtered specs, and exposes a Cobra root command; module adds deps and replace directives.
E2E suites & tests
e2e/*.go, e2e/machine_migration_*.go, e2e/machineset_migration_*.go, e2e/machine_migration_capi_authoritative.go, e2e/machineset_migration_capi_authoritative.go
Many Describe blocks updated with tags (e.g., [sig-cluster-lifecycle], [Feature:ClusterAPI], [platform:...], [Disruptive]) and Label("Conformance")/Label("Serial"); InitCommonVariables() added in BeforeAll; small logic tweaks (Azure subscriptionID cast, GCP SA assertion reorder, narrowed cleanup, PowerVS network/type checks, minor error message fixes).
Framework & minor docs
e2e/framework/cluster.go
Public comment adjusted to reference CreateCoreCluster; no signature or logic changes.
Dependency / tooling updates
go.mod, e2e/go.mod, hack/tools/go.mod, manifests-gen/go.mod, hack/vendor.sh
sigs.k8s.io/cluster-api-provider-azure bumped to v1.20.2 (root and e2e), kustomize/tool deps bumped, removed an indirect golang.org/x/mod entry, and tooling vendoring lists updated; go.mod adjustments across helper modules.
Miscellaneous
Dockerfile.rhel, other module files
Explicit COPY of compressed extension binary added to final image; no exported/public API signatures changed across the diff.

Sequence Diagram

sequenceDiagram
    actor Main as Extension Main
    participant Registry as Extension Registry
    participant Payload as Extension Payload
    participant Ginkgo as OpenShift Ginkgo
    participant Scanner as Platform Scanner
    participant Selector as PlatformEquals Selector
    participant Cobra as Cobra CLI

    Main->>Registry: create registry
    Main->>Payload: create payload for cluster-capi-operator
    Main->>Payload: register suites (conformance/parallel, conformance/serial, e2e)

    rect rgb(220,235,255)
    Note over Main,Ginkgo: build & scan specs
    Main->>Ginkgo: build test specs
    Ginkgo-->>Main: return specs
    Main->>Scanner: scan specs for `[platform:...]` tags
    Scanner-->>Main: return discovered platforms
    end

    rect rgb(235,255,235)
    Note over Main,Selector: apply platform filters
    Main->>Selector: create PlatformEquals per platform
    Selector-->>Main: return selectors
    Main->>Payload: attach filtered specs
    end

    Main->>Registry: register extension
    Main->>Cobra: wire root command & execute
    Cobra-->>Main: return result/exit
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I zipped a tiny test that hops,
Tagged platforms gather in neat crops.
Binaries snug in image and bin,
Labels set, the CI lights grin.
A rabbit cheers: build, run, and spin!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly describes the main change: creating a Cluster-api-tests-ext command/binary for OpenShift origin E2E testing, which is the primary objective of this PR.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 228c933 and 8d526f2.

⛔ Files ignored due to path filters (159)
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
  • hack/tools/go.sum is excluded by !**/*.sum
  • manifests-gen/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/github.com/onsi/ginkgo/v2/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/OWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl.go 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/decorator_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/deprecated_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/automaxprocs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cgroup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cgroups.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cgroups2.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cpu_quota_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cpu_quota_unsupported.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/mountpoint.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/runtime.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/subsys.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/around_node.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/failer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/focus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/group.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/node.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/ordering.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.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/parallel_support/client_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_event_writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_reporter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/spec_context.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/internal/testingtproxy/testing_t_proxy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/gojson_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/table_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/around_node.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/config.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/flags.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/label_filter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/report_entry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/semver_filter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/version.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/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/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/github.com/sergi/go-diff/AUTHORS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/CONTRIBUTORS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/diffmatchpatch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/match.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/mathutil.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/operation_string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/context/context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/grep.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/run-fns.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/api/docs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/build.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagenablehelm.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagsforfunctions.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/create/create.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addbase.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addbuildmetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addcomponent.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addgenerator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addmetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addresource.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addtransformer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/fix/convert.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removebuildmetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removeconfigmap.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removemetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removeresource.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removesecret.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removetransformer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/internal/kustfile/kustomizationfile.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/internal/util/validate.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/localize/localize.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kyaml/copyutil/copyutil.go is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (9)
  • Dockerfile.rhel
  • Makefile
  • e2e/go.mod
  • go.mod
  • hack/tools/go.mod
  • hack/vendor.sh
  • manifests-gen/go.mod
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
💤 Files with no reviewable changes (1)
  • manifests-gen/go.mod
🚧 Files skipped from review as they are similar to previous changes (7)
  • e2e/go.mod
  • openshift-tests-extension/cmd/main.go
  • Dockerfile.rhel
  • hack/tools/go.mod
  • hack/vendor.sh
  • Makefile
  • openshift-tests-extension/go.mod
🔇 Additional comments (2)
go.mod (2)

40-42: CAPI compatibility issue from prior review has been addressed.

The prior review flagged CAPI v1.10.4 as incompatible with Kubernetes 1.34 libraries (k8s.io v0.34.1). Line 40 now specifies sigs.k8s.io/cluster-api v1.11.3, which is >= v1.11.1 and therefore supports Kubernetes 1.34 per the official support matrix. This resolves the earlier critical issue.


42-42: Confirm Azure provider v1.20.2 compatibility with CAPI v1.11.3, noting transitional support.

Azure provider v1.20.2 is a stable release and will work with CAPI v1.11.3 because v1.20.2 implements the v1beta1 Cluster API contract and CAPI v1.11 maintains backward compatibility with v1beta1 providers. However, this compatibility is temporary—CAPI v1.11 is phasing out v1beta1 support, and CAPZ should ideally migrate to the v1beta2 contract for long-term compatibility. Validate this version against the CI-tested compatibility matrix in CAPZ release notes before finalizing.


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

@openshift-ci openshift-ci bot requested review from chrischdi and nrb November 26, 2025 05:32
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2025

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

replace #274 to move the tests-extension pkg to a separate module

Summary by CodeRabbit

Release Notes

  • New Features

  • Added a new OpenShift tests extension framework for managing platform-specific tests and configurations.

  • Enhanced end-to-end test coverage for machine migration and scaling workflows across multiple cloud platforms.

  • Chores

  • Updated container image build process with artifact compression and enhanced metadata labels.

  • Upgraded dependencies including testing frameworks, Kubernetes libraries, and development tools to latest versions.

  • Reorganized test file structure for improved maintainability and consolidation.

✏️ Tip: You can customize this high-level summary in your review settings.

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

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

🧹 Nitpick comments (23)
e2e/framework/cluster.go (1)

34-45: Revisit platform-specific logic in generic framework (tracked as TODO).

The VSphere-specific control plane endpoint configuration is acknowledged in the TODO comment as potentially needing refactoring. Consider whether future abstractions could move this platform-specific behavior out of the core framework.

e2e/machine_migration_capi_authoritative.go (1)

240-300: Commented-out test case due to known bug.

The test for "CAPI (and already existing CAPI Machine with same name) -> MAPI -> CAPI round trip" is commented out due to OCPBUGS-63183 which causes AWS instance leaks. Consider adding a TODO comment or tracking issue to re-enable this test once the bug is resolved.

Would you like me to create a tracking issue or add a more structured TODO comment to ensure this test is re-enabled when OCPBUGS-63183 is fixed?

Makefile (1)

15-15: Add tests-ext to .PHONY declaration.

The new tests-ext target should be declared as .PHONY to ensure it always runs regardless of whether a file named tests-ext exists.

-.PHONY: help all verify test build operator migration manifests-gen unit e2e run fmt vet lint vendor image push aws-cluster azure-cluster gcp-cluster powervs-cluster vsphere-cluster
+.PHONY: help all verify test build operator migration manifests-gen tests-ext unit e2e run fmt vet lint vendor image push aws-cluster azure-cluster gcp-cluster powervs-cluster vsphere-cluster
e2e/aws.go (1)

45-49: Simplify error handling for template creation.

The conditional if err != nil && !apierrors.IsAlreadyExists(err) followed by Expect(err).ToNot(HaveOccurred()) is convoluted. Consider using Gomega's SatisfyAny matcher for clarity.

-		if err := cl.Create(ctx, awsMachineTemplate); err != nil && !apierrors.IsAlreadyExists(err) {
-			Expect(err).ToNot(HaveOccurred())
-		}
+		Expect(cl.Create(ctx, awsMachineTemplate)).To(SatisfyAny(
+			Succeed(),
+			WithTransform(apierrors.IsAlreadyExists, BeTrue()),
+		))
openshift-tests-extension/cmd/main.go (3)

51-54: Prefer %v when formatting errors.

Using err.Error() with %+v is redundant. The %v verb on an error directly calls Error(), and for wrapped errors, %+v shows stack traces only when the error implements the appropriate interface.

	specs, err := g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
	if err != nil {
-		panic(fmt.Sprintf("couldn't build extension test specs from ginkgo: %+v", err.Error()))
+		panic(fmt.Sprintf("couldn't build extension test specs from ginkgo: %v", err))
	}

66-77: Move regex compilation outside the loop to avoid repeated allocations.

The regex pattern is constant and should be compiled once before the loop for better performance.

+	platformRe := regexp.MustCompile(`\[platform:[a-z]*]`)
+
	for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
-		re := regexp.MustCompile(`\[platform:[a-z]*]`)
-
-		match := re.FindStringSubmatch(test)
+		match := platformRe.FindStringSubmatch(test)
		for _, platformDef := range match {
			if _, ok := foundPlatforms[platformDef]; !ok {
				platform := platformDef[strings.Index(platformDef, ":")+1 : len(platformDef)-1]
				foundPlatforms[platformDef] = platform
				specs.Select(extensiontests.NameContains(platformDef)).
					Include(extensiontests.PlatformEquals(platform))
			}
		}
	}

89-93: Remove unnecessary anonymous function wrapper.

The IIFE wrapping root.Execute() adds no value here.

-	if err := func() error {
-		return root.Execute()
-	}(); err != nil {
+	if err := root.Execute(); err != nil {
		os.Exit(1)
	}
e2e/machineset_migration_capi_authoritative.go (2)

29-29: Remove unnecessary var _ = from nested Describe blocks.

Inside an outer Describe, the var _ = assignment is not needed. The result of Describe() is already registered with Ginkgo. While this doesn't cause issues, it's not idiomatic.

-	var _ = Describe("Create MAPI MachineSets", Ordered, func() {
+	Describe("Create MAPI MachineSets", Ordered, func() {

Apply similar changes to the other nested Describe blocks at lines 108 and 219.

Also applies to: 108-108, 219-219


230-232: Reorder assertions to fail fast on empty slice.

Checking err after asserting the slice is not empty could mask the root cause. If GetMachinesFromMachineSet fails with an error, the Expect(mapiMachines).ToNot(BeEmpty()) would fail with a confusing message about an empty slice rather than the actual error.

			mapiMachines, err := mapiframework.GetMachinesFromMachineSet(ctx, cl, mapiMachineSet)
-			Expect(mapiMachines).ToNot(BeEmpty(), "no MAPI Machines found")
			Expect(err).ToNot(HaveOccurred(), "failed to get MAPI Machines from MachineSet")
+			Expect(mapiMachines).ToNot(BeEmpty(), "no MAPI Machines found")
e2e/vsphere.go (4)

23-27: Inconsistent naming convention for constant.

kubeSystemnamespace should follow Go's camelCase convention as kubeSystemNamespace for consistency with the other constants.

 const (
 	vSphereMachineTemplateName = "vsphere-machine-template"
-	kubeSystemnamespace        = "kube-system"
+	kubeSystemNamespace        = "kube-system"
 	vSphereCredentialsName     = "vsphere-creds"
 )

43-52: Secret created in BeforeAll is not cleaned up.

The vSphere credentials secret created in BeforeAll (line 40) is never deleted. Consider adding cleanup for the secret in AfterEach or using DeferCleanup in BeforeAll to ensure proper resource cleanup.

 	AfterEach(func() {
 		if platform != configv1.VSpherePlatformType {
 			// Because AfterEach always runs, even when tests are skipped, we have to
 			// explicitly skip it here for other platforms.
 			Skip("Skipping vSphere E2E tests")
 		}
 		framework.DeleteMachineSets(ctx, cl, machineSet)
 		framework.WaitForMachineSetsDeleted(cl, machineSet)
 		framework.DeleteObjects(ctx, cl, vSphereMachineTemplate)
+		// Clean up the credentials secret
+		framework.DeleteObjects(ctx, cl, &corev1.Secret{
+			ObjectMeta: metav1.ObjectMeta{
+				Name:      clusterName,
+				Namespace: framework.CAPINamespace,
+			},
+		})
 	})

129-183: Unused function createVSphereCluster.

This function is defined but never called in the test suite. If it's intended for future use, consider adding a TODO comment explaining the intent. Otherwise, remove it to avoid dead code.


164-180: Missing polling interval in Eventually.

The Eventually call only specifies a timeout but no polling interval. This defaults to 10ms, which is too aggressive for API server polling. Add a retry interval consistent with other framework usages.

-	Eventually(func() (bool, error) {
+	Eventually(func() (bool, error) {
 		patchedVSphereCluster := &vspherev1.VSphereCluster{}
 		err := cl.Get(ctx, client.ObjectKeyFromObject(vSphereCluster), patchedVSphereCluster)
 		if err != nil {
 			return false, err
 		}
 
 		if patchedVSphereCluster.Annotations == nil {
 			return false, nil
 		}
 
 		if _, ok := patchedVSphereCluster.Annotations[clusterv1.ManagedByAnnotation]; !ok {
 			return false, nil
 		}
 
 		return patchedVSphereCluster.Status.Ready, nil
-	}, framework.WaitShort).Should(BeTrue(), "should not time out waiting for the VSphere Cluster to become 'Ready'")
+	}, framework.WaitShort, framework.RetryMedium).Should(BeTrue(), "should not time out waiting for the VSphere Cluster to become 'Ready'")
e2e/machine_migration_mapi_authoritative.go (1)

28-28: Non-idiomatic nested Describe usage.

Using var _ = Describe(...) inside an outer Describe block is redundant. The var _ = pattern is only needed at the top level to ensure the test is registered. Inside a Describe, use plain Describe(...) or Context(...).

-	var _ = Describe("Create standalone MAPI Machine", Ordered, func() {
+	Describe("Create standalone MAPI Machine", Ordered, func() {

Apply the same fix to lines 66 and 137.

e2e/baremetal.go (3)

52-55: Use constant instead of hardcoded namespace.

The namespace "openshift-cluster-api" is hardcoded here but should use framework.CAPINamespace for consistency with the rest of the codebase.

 		key := client.ObjectKey{
-			Namespace: "openshift-cluster-api",
+			Namespace: framework.CAPINamespace,
 			Name:      "ostest-extraworker-0", // name provided by dev-scripts in CI
 		}

98-110: Add descriptive assertion messages.

The assertions lack descriptive messages, unlike the vSphere counterpart. Adding messages improves test failure diagnostics.

 func getBaremetalMAPIProviderSpec(cl client.Client) *bmv1alpha1.BareMetalMachineProviderSpec {
 	machineSetList := &mapiv1.MachineSetList{}
-	Expect(cl.List(ctx, machineSetList, client.InNamespace(framework.MAPINamespace))).To(Succeed())
+	Expect(cl.List(ctx, machineSetList, client.InNamespace(framework.MAPINamespace))).To(Succeed(),
+		"should not fail listing MAPI MachineSets")
 
-	Expect(machineSetList.Items).ToNot(HaveLen(0))
+	Expect(machineSetList.Items).ToNot(HaveLen(0), "expected to have at least a MachineSet")
 	machineSet := machineSetList.Items[0]
-	Expect(machineSet.Spec.Template.Spec.ProviderSpec.Value).ToNot(BeNil())
+	Expect(machineSet.Spec.Template.Spec.ProviderSpec.Value).ToNot(BeNil(),
+		"expected not to have an empty MAPI MachineSet ProviderSpec")
 
 	providerSpec := &bmv1alpha1.BareMetalMachineProviderSpec{}
-	Expect(yaml.Unmarshal(machineSet.Spec.Template.Spec.ProviderSpec.Value.Raw, providerSpec)).To(Succeed())
+	Expect(yaml.Unmarshal(machineSet.Spec.Template.Spec.ProviderSpec.Value.Raw, providerSpec)).To(Succeed(),
+		"should not fail YAML decoding MAPI MachineSet provider spec")
 
 	return providerSpec
 }

112-139: Consider adding provider spec validation.

Unlike the vSphere and GCP implementations that validate provider spec fields before use, this function directly uses mapiProviderSpec.UserData without validation. Consider adding a nil check for mapiProviderSpec.

 func createBaremetalMachineTemplate(cl client.Client, mapiProviderSpec *bmv1alpha1.BareMetalMachineProviderSpec) *metal3v1.Metal3MachineTemplate {
 	By("Creating Baremetal machine template")
 
+	Expect(mapiProviderSpec).ToNot(BeNil(), "expected MAPI ProviderSpec to not be nil")
+
 	baremetalMachineSpec := metal3v1.Metal3MachineSpec{
e2e/gcp.go (1)

102-110: Missing default case in disk type switch.

The switch statement doesn't handle unknown disk types, leaving rootDeviceType as an empty value. Consider adding a default case or validation.

 	var rootDeviceType gcpv1.DiskType
 	switch mapiProviderSpec.Disks[0].Type {
 	case "pd-standard":
 		rootDeviceType = gcpv1.PdStandardDiskType
 	case "pd-ssd":
 		rootDeviceType = gcpv1.PdSsdDiskType
 	case "local-ssd":
 		rootDeviceType = gcpv1.LocalSsdDiskType
+	default:
+		Fail(fmt.Sprintf("unsupported disk type: %s", mapiProviderSpec.Disks[0].Type))
 	}
e2e/azure.go (1)

101-106: Use camelCase for variable names per Go conventions.

The variables azure_credentials_secret and azure_credentials_secret_key use snake_case, which violates Go naming conventions. Additionally, context.Background() is used instead of the ctx parameter already available in scope.

-	azure_credentials_secret := corev1.Secret{}
-	azure_credentials_secret_key := types.NamespacedName{Name: "capz-manager-bootstrap-credentials", Namespace: "openshift-cluster-api"}
-	err := cl.Get(context.Background(), azure_credentials_secret_key, &azure_credentials_secret)
-	Expect(err).To(BeNil(), "capz-manager-bootstrap-credentials secret should exist")
-	subscriptionID := azure_credentials_secret.Data["azure_subscription_id"]
+	azureCredentialsSecret := corev1.Secret{}
+	azureCredentialsSecretKey := types.NamespacedName{Name: capzManagerBootstrapCredentials, Namespace: "openshift-cluster-api"}
+	err := cl.Get(ctx, azureCredentialsSecretKey, &azureCredentialsSecret)
+	Expect(err).To(BeNil(), "capz-manager-bootstrap-credentials secret should exist")
+	subscriptionID := azureCredentialsSecret.Data["azure_subscription_id"]
+	Expect(subscriptionID).ToNot(BeEmpty(), "azure_subscription_id should not be empty")
openshift-tests-extension/cmd/provider.go (1)

106-120: Duplicate assignment of testContext.KubeConfig.

testContext.KubeConfig is set at line 106 and again at line 120 with the same value. Remove one of them.

 	testContext.KubeConfig = os.Getenv("KUBECONFIG")
 
 	if ad := os.Getenv("ARTIFACT_DIR"); len(strings.TrimSpace(ad)) == 0 {
 		if err := os.Setenv("ARTIFACT_DIR", filepath.Join(os.TempDir(), "artifacts")); err != nil {
 			return fmt.Errorf("%w: %w", errUnableToSetArtifactDir, err)
 		}
 	}
 
 	testContext.DeleteNamespace = os.Getenv("DELETE_NAMESPACE") != "false"
 	testContext.VerifyServiceAccount = true
 
 	setupFileSources()
 
 	testContext.KubectlPath = "kubectl"
-	testContext.KubeConfig = os.Getenv("KUBECONFIG")
 	testContext.NodeOSDistro = "custom"
 	testContext.MasterOSDistro = "custom"
e2e/machineset_migration_mapi_authoritative.go (2)

34-35: Remove redundant var _ = prefix for nested Describe blocks.

The var _ = Describe(...) pattern is typically used at the package level to register top-level specs. Inside an outer Describe, the var _ = prefix is unnecessary and non-idiomatic.

-	var _ = Describe("Create MAPI MachineSets", Ordered, func() {
+	Describe("Create MAPI MachineSets", Ordered, func() {

Apply the same pattern to lines 106 and 266.


19-19: Consider moving k declaration closer to its usage.

The k variable is only used in the "Update MachineSets" Describe block (starting line 266). Declaring it at the outer scope is unnecessarily broad.

e2e/powervs.go (1)

158-169: Inconsistent nil checks compared to getNetworkResourceReference.

getNetworkResourceReference validates that the corresponding field (ID/Name/RegEx) is not nil before use, but getServiceInstance lacks these checks. For consistency and safety, consider adding similar nil validation.

 func getServiceInstance(serviceInstance mapiv1.PowerVSResource) *ibmpowervsv1.IBMPowerVSResourceReference {
 	switch serviceInstance.Type {
 	case mapiv1.PowerVSResourceTypeID:
+		if serviceInstance.ID == nil {
+			panic("serviceInstance reference is specified as ID but it is nil")
+		}
 		return &ibmpowervsv1.IBMPowerVSResourceReference{ID: serviceInstance.ID}
 	case mapiv1.PowerVSResourceTypeName:
+		if serviceInstance.Name == nil {
+			panic("serviceInstance reference is specified as Name but it is nil")
+		}
 		return &ibmpowervsv1.IBMPowerVSResourceReference{Name: serviceInstance.Name}
 	case mapiv1.PowerVSResourceTypeRegEx:
+		if serviceInstance.RegEx == nil {
+			panic("serviceInstance reference is specified as RegEx but it is nil")
+		}
 		return &ibmpowervsv1.IBMPowerVSResourceReference{RegEx: serviceInstance.RegEx}
 	default:
 		panic("unknown type for service instance")
 	}
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 509ccfd and 031b361.

⛔ Files ignored due to path filters (268)
  • e2e/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
  • hack/tools/go.sum is excluded by !**/*.sum
  • manifests-gen/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/cel.dev/expr/MODULE.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/eval.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/SECURITY.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/constants.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/csi_entry_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/csi_param_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/escape_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/event_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/ground_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/osc_string_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/parser.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/parser_actions.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/states.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/utilities.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/ansi.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/api.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/utilities.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/JeffAshton/win_pdh/AUTHORS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/JeffAshton/win_pdh/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/JeffAshton/win_pdh/README.mdown is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/JeffAshton/win_pdh/pdh.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Masterminds/semver/v3/CHANGELOG.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Masterminds/semver/v3/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Masterminds/semver/v3/constraints.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Masterminds/semver/v3/version.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/.gitattributes is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/.golangci.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/CODEOWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/SECURITY.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/backup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/ea.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/file.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/fileinfo.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/hvsock.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/fs/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/fs/fs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/fs/security.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/socket/socket.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/pipe.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/privilege.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/reparse.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/sd.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/syscall.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/go-winio/zsyscall_windows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/.gitattributes is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/CODEOWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/SECURITY.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/hns_v1.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/hnsaccelnet.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/hnsglobals.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/hnssupport.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hns.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnsaccelnet.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnsendpoint.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnserrors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnsfuncs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnsglobals.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnsnetwork.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnspolicy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnspolicylist.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/hnssupport.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/namespace.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/hns/zsyscall_windows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/interop/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/interop/interop.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/Microsoft/hnslib/internal/interop/zsyscall_windows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/armon/circbuf/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/armon/circbuf/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/armon/circbuf/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/armon/circbuf/circbuf.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/.travis.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/fs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/fs_json.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/fs_os.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/fs_zip.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/gettext.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/locale.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/mo/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/mo/encoder.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/mo/file.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/mo/header.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/mo/message.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/mo/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/plural/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/plural/formula.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/plural/table.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/comment.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/file.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/header.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/line_reader.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/message.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/re.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/po/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/tr.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/chai2010/gettext-go/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/container-storage-interface/spec/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/containers/v1/containers_grpc.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/containers/v1/containers_ttrpc.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/containers/v1/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/tasks/v1/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks_grpc.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks_ttrpc.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/version/v1/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/version/v1/version.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/version/v1/version.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/version/v1/version_grpc.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/services/version/v1/version_ttrpc.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/descriptor.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/descriptor.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/event.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/event.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/fieldpath.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/fieldpath.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/introspection.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/introspection.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/metrics.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/metrics.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/mount.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/mount.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/platform.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/platform.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/platform_helpers.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/sandbox.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/sandbox.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/task/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/task/task.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/containerd/api/types/task/task.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/pkg/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/pkg/errgrpc/grpc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/pkg/internal/cause/cause.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/pkg/internal/types/collapsible.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/errdefs/resolve.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/log/.golangci.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/log/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/log/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/log/context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/.gitattributes is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/.golangci.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/Makefile is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/PROTOCOL.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/Protobuild.toml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/channel.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/codec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/config.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/handshake.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/interceptor.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/metadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/request.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/request.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/services.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/stream_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/test.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/ttrpc/unixcreds_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/typeurl/v2/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/typeurl/v2/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/typeurl/v2/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/typeurl/v2/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/typeurl/v2/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/containerd/typeurl/v2/types_gogo.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-semver/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-semver/NOTICE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-semver/semver/semver.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-semver/semver/sort.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/NOTICE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/dbus/methods.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/dbus/properties.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/dbus/set.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/dbus/subscription_set.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/journal/journal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/journal/journal_unix.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/coreos/go-systemd/v22/journal/journal_windows.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/CHANGELOG.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/VERSION is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/gocompat_errors_go120.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/gocompat_errors_unsupported.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/gocompat_generics_go121.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/gocompat_generics_unsupported.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/join.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/lookup_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/mkdir_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/open_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/openat2_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/openat_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/procfs_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/vfs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/CONTRIBUTING.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/MAINTAINERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/circle.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/duration.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/size.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/docker/go-units/ulimit.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/euank/go-kmsg-parser/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/euank/go-kmsg-parser/kmsgparser/kmsgparser.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/euank/go-kmsg-parser/kmsgparser/log.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/exponent-io/jsonpath/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/exponent-io/jsonpath/.travis.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/exponent-io/jsonpath/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/exponent-io/jsonpath/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/exponent-io/jsonpath/decoder.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/exponent-io/jsonpath/path.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/exponent-io/jsonpath/pathaction.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/fatih/camelcase/.travis.yml is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (32)
  • Dockerfile.rhel (1 hunks)
  • Makefile (2 hunks)
  • e2e/aws.go (1 hunks)
  • e2e/aws_test.go (0 hunks)
  • e2e/azure.go (1 hunks)
  • e2e/azure_test.go (0 hunks)
  • e2e/baremetal.go (1 hunks)
  • e2e/baremetal_test.go (0 hunks)
  • e2e/framework/cluster.go (1 hunks)
  • e2e/gcp.go (1 hunks)
  • e2e/gcp_test.go (0 hunks)
  • e2e/go.mod (5 hunks)
  • e2e/machine_migration_capi_authoritative.go (1 hunks)
  • e2e/machine_migration_capi_authoritative_test.go (0 hunks)
  • e2e/machine_migration_mapi_authoritative.go (1 hunks)
  • e2e/machine_migration_mapi_authoritative_test.go (0 hunks)
  • e2e/machineset_migration_capi_authoritative.go (1 hunks)
  • e2e/machineset_migration_capi_authoritative_test.go (0 hunks)
  • e2e/machineset_migration_mapi_authoritative.go (1 hunks)
  • e2e/machineset_migration_mapi_authoritative_test.go (0 hunks)
  • e2e/powervs.go (1 hunks)
  • e2e/powervs_test.go (0 hunks)
  • e2e/vsphere.go (1 hunks)
  • e2e/vsphere_test.go (0 hunks)
  • go.mod (7 hunks)
  • hack/tools/go.mod (6 hunks)
  • hack/vendor.sh (2 hunks)
  • manifests-gen/go.mod (4 hunks)
  • openshift-tests-extension/cmd/main.go (1 hunks)
  • openshift-tests-extension/cmd/provider.go (1 hunks)
  • openshift-tests-extension/cmd/types.go (1 hunks)
  • openshift-tests-extension/go.mod (1 hunks)
💤 Files with no reviewable changes (10)
  • e2e/aws_test.go
  • e2e/machine_migration_mapi_authoritative_test.go
  • e2e/machine_migration_capi_authoritative_test.go
  • e2e/azure_test.go
  • e2e/machineset_migration_mapi_authoritative_test.go
  • e2e/powervs_test.go
  • e2e/gcp_test.go
  • e2e/vsphere_test.go
  • e2e/baremetal_test.go
  • e2e/machineset_migration_capi_authoritative_test.go
🧰 Additional context used
🧬 Code graph analysis (10)
e2e/aws.go (4)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/machineset.go (5)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
  • CreateMachineSet (49-94)
  • NewMachineSetParams (31-46)
  • WaitForMachineSet (138-174)
e2e/framework/framework.go (1)
  • DeleteObjects (32-37)
e2e/machineset_migration_mapi_authoritative.go (4)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/util.go (1)
  • IsMachineAPIMigrationEnabled (41-76)
e2e/framework/machineset.go (5)
  • GetMachinesFromMachineSet (191-202)
  • WaitForMachineSet (138-174)
  • GetNewestMachineFromMachineSet (205-222)
  • ScaleCAPIMachineSet (225-236)
  • GetMachineSet (177-188)
e2e/framework/machinetemplate.go (1)
  • GetAWSMachineTemplateByPrefix (54-76)
e2e/vsphere.go (5)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/machineset.go (5)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
  • CreateMachineSet (49-94)
  • NewMachineSetParams (31-46)
  • WaitForMachineSet (138-174)
e2e/framework/framework.go (4)
  • DeleteObjects (32-37)
  • MAPINamespace (15-15)
  • CAPINamespace (14-14)
  • WaitShort (23-23)
e2e/framework/util.go (1)
  • GetControlPlaneHostAndPort (16-38)
e2e/machine_migration_capi_authoritative.go (5)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/util.go (1)
  • IsMachineAPIMigrationEnabled (41-76)
pkg/conversion/mapi2capi/interface.go (1)
  • Machine (24-26)
e2e/framework/machine.go (2)
  • GetMachine (75-86)
  • DeleteMachines (89-119)
e2e/framework/framework.go (1)
  • CAPINamespace (14-14)
e2e/gcp.go (4)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/machineset.go (5)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
  • CreateMachineSet (49-94)
  • NewMachineSetParams (31-46)
  • WaitForMachineSet (138-174)
e2e/framework/framework.go (3)
  • DeleteObjects (32-37)
  • MAPINamespace (15-15)
  • CAPINamespace (14-14)
openshift-tests-extension/cmd/provider.go (1)
openshift-tests-extension/cmd/types.go (1)
  • ClusterConfiguration (18-61)
e2e/machine_migration_mapi_authoritative.go (3)
e2e/framework/util.go (1)
  • IsMachineAPIMigrationEnabled (41-76)
e2e/framework/machine.go (2)
  • GetMachine (75-86)
  • DeleteMachines (89-119)
e2e/framework/framework.go (1)
  • CAPINamespace (14-14)
e2e/powervs.go (3)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/framework/machineset.go (4)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
  • CreateMachineSet (49-94)
  • WaitForMachineSet (138-174)
e2e/framework/framework.go (3)
  • DeleteObjects (32-37)
  • MAPINamespace (15-15)
  • CAPINamespace (14-14)
e2e/baremetal.go (4)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/machineset.go (5)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
  • CreateMachineSet (49-94)
  • NewMachineSetParams (31-46)
  • WaitForMachineSet (138-174)
e2e/framework/framework.go (5)
  • DeleteObjects (32-37)
  • WaitOverLong (26-26)
  • RetryLong (19-19)
  • MAPINamespace (15-15)
  • CAPINamespace (14-14)
e2e/machineset_migration_capi_authoritative.go (5)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/util.go (1)
  • IsMachineAPIMigrationEnabled (41-76)
pkg/conversion/mapi2capi/interface.go (2)
  • MachineSet (29-31)
  • Machine (24-26)
e2e/framework/machineset.go (6)
  • GetMachinesFromMachineSet (191-202)
  • ScaleCAPIMachineSet (225-236)
  • GetMachineSet (177-188)
  • GetNewestMachineFromMachineSet (205-222)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
e2e/framework/framework.go (1)
  • CAPINamespace (14-14)
🪛 OSV Scanner (2.2.4)
openshift-tests-extension/go.mod

[HIGH] 1-1: github.com/opencontainers/runc 1.2.5: Container escape via "masked path" abuse due to mount race conditions in github.com/opencontainers/runc

(GO-2025-4096)


[HIGH] 1-1: github.com/opencontainers/runc 1.2.5: Container escape with malicious config due to /dev/console mount and related races in github.com/opencontainers/runc

(GO-2025-4097)


[HIGH] 1-1: github.com/opencontainers/runc 1.2.5: Container escape and DDoS due to arbitrary write gadgets and procfs write redirects in github.com/opencontainers/runc

(GO-2025-4098)


[HIGH] 1-1: github.com/opencontainers/runc 1.2.5: runc container escape via "masked path" abuse due to mount race conditions

(GHSA-9493-h29p-rfm2)


[HIGH] 1-1: github.com/opencontainers/runc 1.2.5: runc container escape and denial of service due to arbitrary write gadgets and procfs write redirects

(GHSA-cgrx-mc8f-2prm)


[HIGH] 1-1: github.com/opencontainers/runc 1.2.5: runc container escape with malicious config due to /dev/console mount and related races

(GHSA-qw9x-cqr3-wc7r)


[HIGH] 1-1: github.com/opencontainers/selinux 1.11.1: Container escape and DDoS due to arbitrary write gadgets and procfs write redirects in github.com/opencontainers/runc

(GO-2025-4098)


[HIGH] 1-1: github.com/opencontainers/selinux 1.11.1: runc container escape and denial of service due to arbitrary write gadgets and procfs write redirects

(GHSA-cgrx-mc8f-2prm)

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2025

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

replace #274 to move the tests-extension pkg to a separate module

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension to run platform-aware E2E suites and broaden test coverage across AWS, Azure, GCP, vSphere, BareMetal, PowerVS, and migration scenarios.

  • Chores

  • Compressed build artifacts and enriched image metadata.

  • Upgraded numerous dependencies (testing, Kubernetes/OpenShift libraries, tooling).

  • Reorganized and consolidated E2E test suites for clearer structure and maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

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

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

♻️ Duplicate comments (1)
manifests-gen/go.mod (1)

10-18: Cluster API vs k8s 0.34.x mismatch noted earlier still applies here.

This module still has sigs.k8s.io/cluster-api v1.10.4 alongside k8s.io/* v0.34.x. The earlier review already called out this combination as incompatible with Kubernetes 1.34 per the upstream CAPI support matrix; that concern remains unresolved in the current go.mod.

Please either:

  • Upgrade sigs.k8s.io/cluster-api here to a release that explicitly supports Kubernetes 1.34, or
  • Adjust the k8s.io/* versions to a Kubernetes minor that v1.10.4 supports, keeping manifests-gen consistent with the root and e2e modules.
🧹 Nitpick comments (16)
e2e/machineset_migration_capi_authoritative.go (3)

29-29: Remove unnecessary var _ = for inner Describe blocks.

Within an outer Describe, inner Describe calls don't need blank identifier assignment. The var _ = pattern is only required at the package level to register top-level specs.

-	var _ = Describe("Create MAPI MachineSets", Ordered, func() {
+	Describe("Create MAPI MachineSets", Ordered, func() {

Apply the same fix at lines 108 and 219.

Also applies to: 108-108, 219-219


98-100: Redundant call to waitForCAPIMachineSetMirror.

The CAPI MachineSet mirror is already fetched in BeforeAll at line 71. This It block duplicates that wait. Consider verifying the already-fetched capiMachineSet instead.

 		It("should verify that the non-authoritative MAPI MachineSet has an authoritative CAPI MachineSet mirror", func() {
-			waitForCAPIMachineSetMirror(cl, mapiMSAuthCAPIName)
+			Expect(capiMachineSet).ToNot(BeNil(), "CAPI MachineSet mirror should exist")
 		})

210-215: Test deletes resources that DeferCleanup also targets.

The final test explicitly deletes MachineSets (lines 211-213), and DeferCleanup (lines 131-140) will attempt to clean up the same resources. While the cleanup helpers likely tolerate NotFound errors, consider either:

  1. Removing this It block if cleanup is already guaranteed by DeferCleanup, or
  2. Nullifying the variables after deletion to signal cleanup is done.

This is not a bug but could cause confusion or unnecessary operations.

e2e/machineset_migration_mapi_authoritative.go (1)

34-34: Remove unnecessary var _ = for inner Describe blocks.

Same issue as in the CAPI authoritative file. Inner Describe blocks don't need blank identifier assignment.

-	var _ = Describe("Create MAPI MachineSets", Ordered, func() {
+	Describe("Create MAPI MachineSets", Ordered, func() {

Apply similarly at lines 106 and 266.

Also applies to: 106-106, 266-266

e2e/vsphere.go (3)

23-27: Minor naming inconsistency.

kubeSystemnamespace uses inconsistent casing. Consider renaming to kubeSystemNamespace for consistency with Go naming conventions.

 const (
 	vSphereMachineTemplateName = "vsphere-machine-template"
-	kubeSystemnamespace        = "kube-system"
+	kubeSystemNamespace        = "kube-system"
 	vSphereCredentialsName     = "vsphere-creds"
 )

132-135: Redundant error handling pattern.

The if err != nil check wrapping the Expect is unnecessary. Expect(err).ToNot(HaveOccurred(), ...) already handles the nil check. Simplify to:

 	host, port, err := framework.GetControlPlaneHostAndPort(cl)
-	if err != nil {
-		Expect(err).ToNot(HaveOccurred(), "should not fail getting the Control Plane host and port")
-	}
+	Expect(err).ToNot(HaveOccurred(), "should not fail getting the Control Plane host and port")

129-183: I'm unable to access the repository directly due to infrastructure limitations. However, I can work with the information provided in your review comment. Let me evaluate the review comment based on the code context you've provided:

The review comment asserts that createVSphereCluster is:

  1. Defined but never called in the test suite
  2. Only createVSphereSecret and createVSphereMachineTemplate are called

Looking at the function implementation, it is well-structured with:

  • Proper error handling
  • Context awareness
  • Status polling with eventual consistency checking
  • Proper annotation management

Since I cannot directly verify the codebase access, I need to proceed with reasonable assumptions based on the evidence you've provided. The review comment appears to be based on actual code analysis. The function looks production-ready but unused.

createVSphereCluster is unused and should be removed or documented.

The function is well-implemented but serves no purpose in the current test suite. If it's intended for future use, add a TODO comment explaining the expected use case. Otherwise, remove it to avoid dead code.

e2e/baremetal.go (3)

61-72: Remove or document commented-out code.

Line 64 contains a commented-out reference // mapiMachineSpec.Zone. If the zone is intentionally empty for baremetal, remove the comment. If it's a TODO, add a proper TODO comment explaining why.

 		machineSet = framework.CreateMachineSet(ctx, cl, framework.NewMachineSetParams(
 			"baremetal-machineset",
 			clusterName,
-			"", // mapiMachineSpec.Zone,
+			"", // Baremetal does not use failure domains
 			1,

98-110: Add descriptive error messages to assertions.

Unlike getVSphereMAPIProviderSpec, this function lacks descriptive error messages in Expect calls. Adding messages improves debuggability when tests fail.

-	Expect(cl.List(ctx, machineSetList, client.InNamespace(framework.MAPINamespace))).To(Succeed())
+	Expect(cl.List(ctx, machineSetList, client.InNamespace(framework.MAPINamespace))).To(Succeed(),
+		"should not fail listing MAPI MachineSets")
 
-	Expect(machineSetList.Items).ToNot(HaveLen(0))
+	Expect(machineSetList.Items).ToNot(HaveLen(0), "expected to have at least a MachineSet")
 	machineSet := machineSetList.Items[0]
-	Expect(machineSet.Spec.Template.Spec.ProviderSpec.Value).ToNot(BeNil())
+	Expect(machineSet.Spec.Template.Spec.ProviderSpec.Value).ToNot(BeNil(),
+		"expected not to have an empty MAPI MachineSet ProviderSpec")

112-138: Consider adding provider spec validation.

Unlike createVSphereMachineTemplate, this function doesn't validate mapiProviderSpec fields before use. Adding validation (e.g., for UserData) would provide clearer failure messages:

 func createBaremetalMachineTemplate(cl client.Client, mapiProviderSpec *bmv1alpha1.BareMetalMachineProviderSpec) *metal3v1.Metal3MachineTemplate {
 	By("Creating Baremetal machine template")
 
+	Expect(mapiProviderSpec).ToNot(BeNil(), "expected MAPI ProviderSpec to not be nil")
+
 	baremetalMachineSpec := metal3v1.Metal3MachineSpec{
e2e/azure.go (2)

101-104: Use camelCase for variable names and consistent context.

Go convention uses camelCase for local variables. Also, use the passed ctx instead of context.Background():

-	azure_credentials_secret := corev1.Secret{}
-	azure_credentials_secret_key := types.NamespacedName{Name: "capz-manager-bootstrap-credentials", Namespace: "openshift-cluster-api"}
-	err := cl.Get(context.Background(), azure_credentials_secret_key, &azure_credentials_secret)
+	azureCredentialsSecret := corev1.Secret{}
+	azureCredentialsSecretKey := types.NamespacedName{Name: capzManagerBootstrapCredentials, Namespace: framework.CAPINamespace}
+	err := cl.Get(ctx, azureCredentialsSecretKey, &azureCredentialsSecret)

24-28: Unused constant and hardcoded duplicate.

clusterSecretName is defined but never used. Also, capzManagerBootstrapCredentials is defined but line 102 uses the hardcoded string "capz-manager-bootstrap-credentials" instead.

 const (
 	azureMachineTemplateName        = "azure-machine-template"
-	clusterSecretName               = "capz-manager-cluster-credential"
 	capzManagerBootstrapCredentials = "capz-manager-bootstrap-credentials"
 )
e2e/powervs.go (2)

129-155: Consider using Ginkgo's Fail() instead of panic().

While panic() works in tests, using Ginkgo's Fail() provides better test output with proper stack traces and integrates with Ginkgo's failure handling:

+import "github.com/onsi/ginkgo/v2"
+
 func getNetworkResourceReference(networkResource mapiv1.PowerVSResource) ibmpowervsv1.IBMPowerVSResourceReference {
 	switch networkResource.Type {
 	case mapiv1.PowerVSResourceTypeID:
 		if networkResource.ID == nil {
-			panic("networkResource reference is specified as ID but it is nil")
+			Fail("networkResource reference is specified as ID but it is nil")
 		}
 		// ... similar changes for other cases

This is optional since the upstream validation in createIBMPowerVSMachineTemplate should prevent these paths.


157-168: Add nil checks for consistency with getNetworkResourceReference.

getServiceInstance doesn't validate that ID, Name, or RegEx are non-nil before returning, unlike getNetworkResourceReference. This inconsistency could lead to nil pointer issues downstream.

 func getServiceInstance(serviceInstance mapiv1.PowerVSResource) *ibmpowervsv1.IBMPowerVSResourceReference {
 	switch serviceInstance.Type {
 	case mapiv1.PowerVSResourceTypeID:
+		if serviceInstance.ID == nil {
+			panic("serviceInstance reference is specified as ID but it is nil")
+		}
 		return &ibmpowervsv1.IBMPowerVSResourceReference{ID: serviceInstance.ID}
 	case mapiv1.PowerVSResourceTypeName:
+		if serviceInstance.Name == nil {
+			panic("serviceInstance reference is specified as Name but it is nil")
+		}
 		return &ibmpowervsv1.IBMPowerVSResourceReference{Name: serviceInstance.Name}
 	case mapiv1.PowerVSResourceTypeRegEx:
+		if serviceInstance.RegEx == nil {
+			panic("serviceInstance reference is specified as RegEx but it is nil")
+		}
 		return &ibmpowervsv1.IBMPowerVSResourceReference{RegEx: serviceInstance.RegEx}
 	default:
 		panic("unknown type for service instance")
 	}
 }
e2e/machine_migration_capi_authoritative.go (1)

240-300: Prefer skipped/pending Ginkgo nodes over fully commented-out test blocks

The large commented-out Context tied to OCPBUGS-63183 makes the intended coverage easy to lose over time and is invisible to Ginkgo (no reporting that a scenario is pending because of a known bug).

Consider keeping the tests compiled but marked as skipped/pending (for example via XContext, PContext, or an early Skip in BeforeAll keyed to the bug), so they:

  • Remain visible in the suite’s structure and reports.
  • Are easier to re-enable once the bug is fixed.

This is a style/maintainability tweak; behavior today is correct but a bit harder to track.

openshift-tests-extension/cmd/main.go (1)

63-78: Compile platform regex once outside the loop for clarity and efficiency.

You recompile the same regex on every iteration:

for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
    re := regexp.MustCompile(`\[platform:[a-z]*]`)
    match := re.FindStringSubmatch(test)
    ...
}

Consider compiling it once before the loop:

-	// Let's scan for tests with a platform label and create the rule for them such as [platform:vsphere]
-	foundPlatforms := make(map[string]string)
-
-	for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
-		re := regexp.MustCompile(`\[platform:[a-z]*]`)
-
-		match := re.FindStringSubmatch(test)
+	// Let's scan for tests with a platform label and create the rule for them such as [platform:vsphere]
+	foundPlatforms := make(map[string]string)
+	platformRe := regexp.MustCompile(`\[platform:[a-z]*]`)
+
+	for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
+		match := platformRe.FindStringSubmatch(test)
 		for _, platformDef := range match {
 			if _, ok := foundPlatforms[platformDef]; !ok {
 				platform := platformDef[strings.Index(platformDef, ":")+1 : len(platformDef)-1]
 				foundPlatforms[platformDef] = platform
 				specs.Select(extensiontests.NameContains(platformDef)).
 					Include(extensiontests.PlatformEquals(platform))
 			}
 		}
 	}

Functionality stays the same, but it avoids redundant compilation.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 031b361 and f591d9f.

⛔ Files ignored due to path filters (42)
  • e2e/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
  • hack/tools/go.sum is excluded by !**/*.sum
  • manifests-gen/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/cyphar.com/go-pathrs/.golangci.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/COPYING is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/handle_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/internal/fdutils/fd_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/internal/libpathrs/error_unix.go is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/internal/libpathrs/libpathrs_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/procfs/procfs_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/root_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/cyphar.com/go-pathrs/utils_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/.golangci.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/CHANGELOG.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/COPYING.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/LICENSE.BSD is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/LICENSE.MPL-2.0 is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/VERSION is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/codecov.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/internal/consts/consts.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/join.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/assert/assert.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/errors_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/at_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/fd.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/fd_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/mount_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/openat2_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_errors_go120.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_errors_unsupported.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_generics_go121.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_generics_unsupported.go is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (22)
  • Dockerfile.rhel (1 hunks)
  • Makefile (2 hunks)
  • e2e/aws.go (1 hunks)
  • e2e/azure.go (1 hunks)
  • e2e/baremetal.go (1 hunks)
  • e2e/framework/cluster.go (1 hunks)
  • e2e/gcp.go (1 hunks)
  • e2e/go.mod (5 hunks)
  • e2e/machine_migration_capi_authoritative.go (1 hunks)
  • e2e/machine_migration_mapi_authoritative.go (1 hunks)
  • e2e/machineset_migration_capi_authoritative.go (1 hunks)
  • e2e/machineset_migration_mapi_authoritative.go (1 hunks)
  • e2e/powervs.go (1 hunks)
  • e2e/vsphere.go (1 hunks)
  • go.mod (7 hunks)
  • hack/tools/go.mod (6 hunks)
  • hack/vendor.sh (2 hunks)
  • manifests-gen/go.mod (4 hunks)
  • openshift-tests-extension/cmd/main.go (1 hunks)
  • openshift-tests-extension/cmd/provider.go (1 hunks)
  • openshift-tests-extension/cmd/types.go (1 hunks)
  • openshift-tests-extension/go.mod (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • e2e/framework/cluster.go
🚧 Files skipped from review as they are similar to previous changes (7)
  • hack/vendor.sh
  • e2e/aws.go
  • Makefile
  • openshift-tests-extension/cmd/provider.go
  • e2e/gcp.go
  • openshift-tests-extension/cmd/types.go
  • e2e/machine_migration_mapi_authoritative.go
🧰 Additional context used
🧬 Code graph analysis (4)
e2e/vsphere.go (5)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/machineset.go (5)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
  • CreateMachineSet (49-94)
  • NewMachineSetParams (31-46)
  • WaitForMachineSet (138-174)
e2e/framework/framework.go (3)
  • DeleteObjects (32-37)
  • MAPINamespace (15-15)
  • CAPINamespace (14-14)
e2e/framework/util.go (1)
  • GetControlPlaneHostAndPort (16-38)
e2e/machine_migration_capi_authoritative.go (4)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/util.go (1)
  • IsMachineAPIMigrationEnabled (41-76)
e2e/framework/machine.go (2)
  • GetMachine (75-86)
  • DeleteMachines (89-119)
e2e/framework/framework.go (1)
  • CAPINamespace (14-14)
e2e/machineset_migration_capi_authoritative.go (5)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/util.go (1)
  • IsMachineAPIMigrationEnabled (41-76)
pkg/conversion/mapi2capi/interface.go (2)
  • MachineSet (29-31)
  • Machine (24-26)
e2e/framework/machineset.go (6)
  • GetMachinesFromMachineSet (191-202)
  • ScaleCAPIMachineSet (225-236)
  • GetMachineSet (177-188)
  • GetNewestMachineFromMachineSet (205-222)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
e2e/framework/framework.go (1)
  • CAPINamespace (14-14)
e2e/azure.go (4)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (57-78)
e2e/framework/machineset.go (5)
  • DeleteMachineSets (119-133)
  • WaitForMachineSetsDeleted (98-117)
  • CreateMachineSet (49-94)
  • NewMachineSetParams (31-46)
  • WaitForMachineSet (138-174)
e2e/framework/framework.go (3)
  • DeleteObjects (32-37)
  • MAPINamespace (15-15)
  • CAPINamespace (14-14)
🔇 Additional comments (14)
e2e/machineset_migration_capi_authoritative.go (2)

38-66: LGTM!

The test context correctly sets up the scenario with an existing CAPI MachineSet, creates a same-name MAPI MachineSet, and properly defers cleanup. The pending test (PIt) is appropriately marked with the bug reference.


219-284: LGTM!

The "Delete MachineSets" context correctly tests the scenario where deleting a non-authoritative MAPI MachineSet should not delete its authoritative CAPI MachineSet. The TODO comment appropriately references the bug for future verification enhancements.

e2e/machineset_migration_mapi_authoritative.go (5)

19-19: LGTM on local komega instance.

Using komega.New(cl) for a local instance is appropriate when you need per-test client isolation. This pattern correctly initializes the komega instance after the client is set up in BeforeAll.

Also applies to: 31-31


59-63: Pending test should verify rejection behavior.

The PIt is marked pending with a Jira reference (OCPCLOUD-3188). When this test is enabled, ensure it properly expects an error on creation rather than just calling createMAPIMachineSetWithAuthoritativeAPI without assertion.


116-219: LGTM!

The "with spec.authoritativeAPI: MachineAPI" context has a comprehensive test flow: scale up, switch authority, scale again, scale down, switch back, and delete. Resource cleanup is properly deferred.


221-263: LGTM!

This context tests an important mixed-authority scenario where the MachineSet uses MachineAPI but the Machine template uses ClusterAPI authority. The test correctly verifies that scaling creates authoritative CAPI Machines.


359-378: LGTM!

This test correctly verifies that when the authoritative CAPI MachineSet points to a new InfraTemplate, the MAPI MachineSet is updated accordingly. The flow creates a new template, updates the CAPI reference, and verifies MAPI reflects the change.

e2e/vsphere.go (1)

29-72: LGTM!

Test structure is well-organized with proper platform gating, resource initialization in BeforeAll, cleanup in AfterEach, and the test correctly creates and waits for the MachineSet.

e2e/baremetal.go (1)

51-56: Hardcoded BareMetalHost name may be environment-specific.

The host name "ostest-extraworker-0" is hardcoded with a comment noting it's "provided by dev-scripts in CI". This could cause test failures in environments using different naming conventions.

Consider making this configurable via environment variable or deriving it dynamically from available BareMetalHosts.

e2e/powervs.go (2)

89-95: LGTM!

Good addition of Network.Type validation as suggested in previous review. All required provider spec fields are now properly validated before use.


28-70: LGTM!

Test structure follows the established pattern with proper platform gating, lifecycle hooks, and MachineSet workflow.

e2e/machine_migration_capi_authoritative.go (1)

17-27: Good platform/feature-gate guarding of disruptive tests

The BeforeAll guard on AWS platform plus IsMachineAPIMigrationEnabled keeps these disruptive tests from running on unsupported configurations, which should reduce flakiness and surprises in CI.

Dockerfile.rhel (1)

4-5: Verify consumers expect a compressed cluster-capi-operator-ext.gz binary.

gzip bin/cluster-capi-operator-ext removes the original binary, and the final image only contains cluster-capi-operator-ext.gz. That’s fine if your test harness or caller explicitly handles decompression, but it will break if anything expects to exec cluster-capi-operator-ext directly.

Can you confirm there is existing CI/test infra that downloads and decompresses the .gz before running the extension?

Also applies to: 11-15

openshift-tests-extension/go.mod (1)

119-124: Security versions confirmed externally but file content cannot be verified due to repository access failure.

The runc v1.2.8 and selinux v1.13.0 versions referenced in the review comment are indeed legitimate security-patched releases addressing CVE-2025-31133 and CVE-2025-52881 (high-severity race condition in symlink/link following). However, the repository clone failed, preventing verification of:

  • Whether the go.mod file actually contains these exact versions at lines 119-124
  • Whether other go.mod files in the repository maintain consistent version pins
  • Whether the suggested shell script verification would succeed

The review comment's reference to an "earlier vulnerability comment" cannot be confirmed from the PR context alone without repository access.

@sunzhaohua2 sunzhaohua2 marked this pull request as draft November 26, 2025 08:49
@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 Nov 26, 2025
@sunzhaohua2 sunzhaohua2 marked this pull request as ready for review December 1, 2025 03:33
@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 Dec 1, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 1, 2025

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

replace #274 to move the tests-extension pkg to a separate module

Summary by CodeRabbit

  • New Features

  • Added OpenShift tests extension binary to build and Docker image packaging.

  • Enhanced test suite metadata with improved platform, feature, and conformance labels for better test categorization and selection.

  • Bug Fixes

  • Fixed type casting issues in cloud platform tests.

  • Corrected error messages in test output.

  • Chores

  • Updated dependencies to latest stable versions.

  • Improved test initialization across all test suites.

✏️ Tip: You can customize this high-level summary in your review settings.

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

openshift-ci-robot commented Dec 1, 2025

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

replace #274 to move the tests-extension pkg to a separate module

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension (built and packaged into images) and a CLI entry to run its test suites.

  • Enhanced test metadata with richer platform/feature/conformance labels for improved selection.

  • Bug Fixes

  • Fixed type-casting issues in cloud platform tests.

  • Corrected and clarified test error messages.

  • Chores

  • Bumped several dependencies to newer patch/minor versions.

  • Improved test initialization, build targets, and vendoring/script workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

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

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

🧹 Nitpick comments (3)
openshift-tests-extension/cmd/main.go (3)

38-41: Consider using os.Exit instead of panic for initialization errors.

While panic is acceptable here for a fatal initialization error, using fmt.Fprintf(os.Stderr, ...) followed by os.Exit(1) would provide cleaner error output without a stack trace.

Apply this diff for cleaner error handling:

 	specs, err := g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
 	if err != nil {
-		panic(fmt.Sprintf("couldn't build extension test specs from ginkgo: %+v", err.Error()))
+		fmt.Fprintf(os.Stderr, "couldn't build extension test specs from ginkgo: %v\n", err)
+		os.Exit(1)
 	}

46-58: Consider more robust platform name extraction.

The regex pattern \[platform:[a-z]*] only matches lowercase letters. While this covers common platforms (aws, gcp, azure, vsphere), it may miss platforms with digits, hyphens, or mixed case.

Consider a more flexible pattern and safer extraction:

 	for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
-		re := regexp.MustCompile(`\[platform:[a-z]*]`)
+		re := regexp.MustCompile(`\[platform:([a-z0-9-]+)\]`)
 
-		match := re.FindStringSubmatch(test)
-		for _, platformDef := range match {
-			if _, ok := foundPlatforms[platformDef]; !ok {
-				platform := platformDef[strings.Index(platformDef, ":")+1 : len(platformDef)-1]
-				foundPlatforms[platformDef] = platform
-				specs.Select(extensiontests.NameContains(platformDef)).
-					Include(extensiontests.PlatformEquals(platform))
-			}
+		matches := re.FindAllStringSubmatch(test, -1)
+		for _, match := range matches {
+			if len(match) >= 2 {
+				platformDef := match[0]  // full match like "[platform:aws]"
+				platform := match[1]      // captured platform name
+				if _, ok := foundPlatforms[platformDef]; !ok {
+					foundPlatforms[platformDef] = platform
+					specs.Select(extensiontests.NameContains(platformDef)).
+						Include(extensiontests.PlatformEquals(platform))
+				}
+			}
 		}
 	}

This change:

  • Uses a capture group for safer extraction
  • Allows digits and hyphens in platform names
  • Handles multiple platform tags in a single test name
  • Avoids string slicing that could panic on malformed input

69-73: Simplify command execution.

The anonymous function wrapper is unnecessary and can be simplified.

Apply this diff:

-	if err := func() error {
-		return root.Execute()
-	}(); err != nil {
+	if err := root.Execute(); err != nil {
 		os.Exit(1)
 	}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 20bdaf4 and e7c9a79.

⛔ Files ignored due to path filters (119)
  • e2e/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
  • hack/tools/go.sum is excluded by !**/*.sum
  • manifests-gen/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/github.com/onsi/ginkgo/v2/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/OWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl.go 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/deprecated_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/failer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/node.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.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/parallel_support/client_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/report_entry.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/internal/testingtproxy/testing_t_proxy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/table_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/config.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/flags.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/label_filter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/report_entry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/version.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/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/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/github.com/spf13/cobra/.golangci.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/cobra/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/cobra/SECURITY.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/cobra/command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/cobra/completions.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/bool_func.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/count.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/flag.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/func.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/golangflag.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/ipnet_slice.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/string_to_string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/text.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/spf13/pflag/time.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/.codecov.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/CHANGELOG.md is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/CODE_OF_CONDUCT.md is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/CONTRIBUTING.md is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/Makefile is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/automaxprocs/automaxprocs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/context/context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (9)
  • Dockerfile.rhel (1 hunks)
  • Makefile (2 hunks)
  • e2e/go.mod (1 hunks)
  • go.mod (2 hunks)
  • hack/tools/go.mod (1 hunks)
  • hack/vendor.sh (2 hunks)
  • manifests-gen/go.mod (1 hunks)
  • openshift-tests-extension/cmd/main.go (1 hunks)
  • openshift-tests-extension/go.mod (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • go.mod
  • hack/vendor.sh
  • e2e/go.mod
  • Makefile
  • manifests-gen/go.mod
🔇 Additional comments (7)
Dockerfile.rhel (3)

11-11: LGTM — Extension binary correctly copied to final image.

The compressed extension binary is properly copied from the builder stage to the final image, consistent with other binaries in the image.


13-15: LGTM — Enhanced image labels improve discoverability.

The updated labels provide better metadata for the image:

  • io.k8s.display-name adds a user-friendly name
  • io.openshift.tags accurately categorizes the extension with test-related tags
  • Maintains the operator designation

4-5: Verify that the build target produces the extension binary.

The build step now compresses the extension binary, but this assumes make build produces bin/cluster-capi-operator-ext. Confirm the Makefile's build target includes or produces the tests-ext binary.

openshift-tests-extension/go.mod (2)

133-136: LGTM — Replace directives follow OpenShift patterns.

The replace directives are appropriate:

  • The Ginkgo fork replacement is standard practice in OpenShift for test framework compatibility
  • The otelgrpc version pin ensures stability

1-9: No action needed. Go version 1.24.0 is a stable release (released February 11, 2025) and is appropriate for production use.

Likely an incorrect or invalid review comment.

openshift-tests-extension/cmd/main.go (1)

23-36: LGTM — Test suites are well-structured with clear qualifiers.

The three test suites properly segregate tests:

  • Parallel conformance tests (non-Serial && Conformance)
  • Serial conformance tests (Serial && Conformance)
  • E2E tests filtered by feature tags

The CEL qualifiers are correct and mutually exclusive where appropriate.

hack/tools/go.mod (1)

169-170: LGTM — Dependency updates are valid and secure.

The indirect dependency updates to cobra v1.10.1 and pflag v1.0.9 are legitimate upstream releases with no known security vulnerabilities. These versions align with similar updates across other modules in this PR.

@sunzhaohua2
Copy link
Contributor Author

/test ci/prow/e2e-aws-capi-techpreview

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 1, 2025

@sunzhaohua2: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test e2e-aws-capi-techpreview
/test e2e-aws-ovn
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-aws-ovn-techpreview
/test e2e-aws-ovn-techpreview-upgrade
/test e2e-azure-capi-techpreview
/test e2e-azure-ovn-techpreview-upgrade
/test e2e-gcp-capi-techpreview
/test e2e-gcp-ovn-techpreview
/test e2e-openstack-capi-techpreview
/test e2e-openstack-ovn-techpreview
/test e2e-vsphere-capi-techpreview
/test images
/test lint
/test okd-scos-images
/test unit
/test vendor
/test verify-deps

The following commands are available to trigger optional jobs:

/test e2e-azure-ovn-techpreview
/test e2e-metal3-capi-techpreview
/test okd-scos-e2e-aws-ovn
/test regression-clusterinfra-aws-ipi-techpreview-capi

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-cluster-capi-operator-main-build
pull-ci-openshift-cluster-capi-operator-main-images
pull-ci-openshift-cluster-capi-operator-main-lint
pull-ci-openshift-cluster-capi-operator-main-okd-scos-images
pull-ci-openshift-cluster-capi-operator-main-unit
pull-ci-openshift-cluster-capi-operator-main-vendor
pull-ci-openshift-cluster-capi-operator-main-verify-deps
Details

In response to this:

/test ci/prow/e2e-aws-capi-techpreview

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.

@sunzhaohua2
Copy link
Contributor Author

/test e2e-aws-capi-techpreview

@theobarberbany
Copy link
Contributor

Can we have a little more description here? What is the intended use of this -ext command / suite? :)

COPY --from=builder /go/src/github.com/openshift/cluster-capi-operator/bin/cluster-capi-operator-ext.gz .

LABEL io.openshift.release.operator true
LABEL io.k8s.display-name="OpenShift Cluster CAPI Operator" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want a separate docker file for the tests extension? I'm not sure we're shipping this as part of payload?

That being said, I'm not sure what existing patterns exist here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @theobarberbany no separate docker file needed, other similar implementations also modify their existing docker file to include the extension binary, it ships as part of the operator payload, openShift's test framework discovers it via the label and extracts it when needed.

  • machine-api-operator #1338
  • cloud-provider-aws #117
  • cluster-control-plane-machine-set-operator #372

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 4, 2025

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate cluster-capi-operator's E2E tests into the OpenShift origin test framework.

For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.

This is already adopted by other components:

replace #274 to move the tests-extension pkg to a separate module

Local Tests

Get extension usage

$ bin/cluster-capi-operator-ext     [10:29:54]
Cluster CAPI Operator tests extension for OpenShift

Usage:
  [command]

Available Commands:
 completion  Generate the autocompletion script for the specified shell
 help        Help about any command
 images      List test images
 info        Display extension metadata
 list        List items
 run-suite   Run a group of tests by suite. This is more limited than origin, and intended for light local development use. Orchestration parameters, scheduling, isolation, etc are not obeyed, and Ginkgo tests are executed serially.
 run-test    Runs tests by name
 update      Update test metadata

Flags:
 -h, --help   help for this command

Use " [command] --help" for more information about a command.

Get extension definition info

$ bin/cluster-capi-operator-ext info
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-capi-operator"
   },
   "suites": [
       {
           "name": "capio/conformance/parallel",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/conformance/serial",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (name.contains(\"[Feature:ClusterAPI]\") || name.contains(\"[OCPFeatureGate:MachineAPIMigration]\"))"
           ]
       }
   ],
   "images": null
}

List test cases


$ bin/cluster-capi-operator-ext list tests --suite capio/e2e --platform gcp
[
 {
   "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:gcp][Disruptive] Cluster API GCP MachineSet should be able to run a machine",
   "labels": {
     "Conformance": {},
     "Serial": {}
   },
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-capi-operator",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:26",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:31",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:39",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:50"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {
     "include": "platform==\"gcp\""
   }
 }
]

Run test suites

$ bin/cluster-capi-operator-ext run-test -n "Cluster API AWS MachineSet should be able to run a machine with a default provider spec"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator
 ================================================================================
 Random Seed: 1754022163 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 Cluster API AWS MachineSet should be able to run a machine with a default provider spec
 /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:60
   STEP: Creating AWS machine template @ 08/01/25 12:22:46.259
   STEP: Creating MachineSet "aws-machineset" @ 08/01/25 12:22:47.061
   STEP: Waiting for MachineSet machines "aws-machineset" to enter Running phase @ 08/01/25 12:22:47.611
   STEP: Comparing instances created by MAPI and CAPI @ 08/01/25 12:26:53.233
 Instances created by MAPI and CAPI are not equal
   ec2.Instance{
       ... // 2 ignored and 17 identical fields
 -     InstanceLifecycle: &"spot",
 +     InstanceLifecycle: nil,
       InstanceType:      &"m6i.xlarge",
       Ipv6Address:       nil,
       ... // 1 ignored and 4 identical fields
       MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
       Monitoring:      &{State: &"disabled"},
       NetworkInterfaces: []*ec2.InstanceNetworkInterface{
               &{
                       ... // 2 identical fields
                       ConnectionTrackingConfiguration: nil,
                       Description:                     &"",
                       Groups: []*ec2.GroupIdentifier{
                               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -                             (
 -                                     s"""
 -                                     {
 -                                       GroupId: "sg-050993867b2317f8d",
 -                                       GroupName: "xxia-1-xzx9p-lb"
 -                                     }
 -                                     s"""
 -                             ),
                       },
                       InterfaceType: &"interface",
                       Ipv4Prefixes:  nil,
                       ... // 4 ignored and 8 identical fields
               },
       },
       OutpostArn: nil,
       Placement:  &{AvailabilityZone: &"us-east-2a", GroupName: &"", Tenancy: &"default"},
       ... // 2 ignored and 7 identical fields
       RootDeviceName: &"/dev/xvda",
       RootDeviceType: &"ebs",
       SecurityGroups: []*ec2.GroupIdentifier{
               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -             (
 -                     s"""
 -                     {
 -                       GroupId: "sg-050993867b2317f8d",
 -                       GroupName: "xxia-1-xzx9p-lb"
 -                     }
 -                     s"""
 -             ),
       },
       SourceDestCheck:       &true,
 -     SpotInstanceRequestId: &"sir-c6ez5xin",
 +     SpotInstanceRequestId: nil,
       SriovNetSupport:       nil,
       State:                 &{Code: &16, Name: &"running"},
       ... // 2 ignored and 7 identical fields
   }
   STEP: Deleting MachineSet "aws-machineset" @ 08/01/25 12:26:56.869
   STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 08/01/25 12:26:57.368
   STEP: Deleting /aws-machine-template @ 08/01/25 12:27:55.123
 • [312.054 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 312.056 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Blocks

openshift/origin#30568

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension (built and packaged into images) and a CLI entry to run its test suites.

  • Enhanced test metadata with richer platform/feature/conformance labels for improved selection.

  • Bug Fixes

  • Fixed type-casting issues in cloud platform tests.

  • Corrected and clarified test error messages.

  • Chores

  • Bumped several dependencies to newer patch/minor versions.

  • Improved test initialization, build targets, and vendoring/script workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

@theobarberbany
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2025
@openshift-ci-robot
Copy link

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-capi-techpreview
/test e2e-aws-ovn
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-aws-ovn-techpreview
/test e2e-aws-ovn-techpreview-upgrade
/test e2e-azure-capi-techpreview
/test e2e-azure-ovn-techpreview
/test e2e-azure-ovn-techpreview-upgrade
/test e2e-gcp-capi-techpreview
/test e2e-gcp-ovn-techpreview
/test e2e-metal3-capi-techpreview
/test e2e-openstack-capi-techpreview
/test e2e-openstack-ovn-techpreview
/test e2e-vsphere-capi-techpreview
/test regression-clusterinfra-aws-ipi-techpreview-capi

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 4, 2025
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 29, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 29, 2025

New changes are detected. LGTM label has been removed.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 29, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

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

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 29, 2025

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate cluster-capi-operator's E2E tests into the OpenShift origin test framework.

For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.

This is already adopted by other components:

replace #274 to move the tests-extension pkg to a separate module

Local Tests

Get extension usage

$ bin/cluster-capi-operator-ext     [10:29:54]
Cluster CAPI Operator tests extension for OpenShift

Usage:
  [command]

Available Commands:
 completion  Generate the autocompletion script for the specified shell
 help        Help about any command
 images      List test images
 info        Display extension metadata
 list        List items
 run-suite   Run a group of tests by suite. This is more limited than origin, and intended for light local development use. Orchestration parameters, scheduling, isolation, etc are not obeyed, and Ginkgo tests are executed serially.
 run-test    Runs tests by name
 update      Update test metadata

Flags:
 -h, --help   help for this command

Use " [command] --help" for more information about a command.

Get extension definition info

$ bin/cluster-capi-operator-ext info
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-capi-operator"
   },
   "suites": [
       {
           "name": "capio/conformance/parallel",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/conformance/serial",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (name.contains(\"[Feature:ClusterAPI]\") || name.contains(\"[OCPFeatureGate:MachineAPIMigration]\"))"
           ]
       }
   ],
   "images": null
}

List test cases


$ bin/cluster-capi-operator-ext list tests --suite capio/e2e --platform gcp
[
 {
   "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:gcp][Disruptive] Cluster API GCP MachineSet should be able to run a machine",
   "labels": {
     "Conformance": {},
     "Serial": {}
   },
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-capi-operator",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:26",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:31",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:39",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:50"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {
     "include": "platform==\"gcp\""
   }
 }
]

Run test suites

$ bin/cluster-capi-operator-ext run-test -n "Cluster API AWS MachineSet should be able to run a machine with a default provider spec"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator
 ================================================================================
 Random Seed: 1754022163 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 Cluster API AWS MachineSet should be able to run a machine with a default provider spec
 /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:60
   STEP: Creating AWS machine template @ 08/01/25 12:22:46.259
   STEP: Creating MachineSet "aws-machineset" @ 08/01/25 12:22:47.061
   STEP: Waiting for MachineSet machines "aws-machineset" to enter Running phase @ 08/01/25 12:22:47.611
   STEP: Comparing instances created by MAPI and CAPI @ 08/01/25 12:26:53.233
 Instances created by MAPI and CAPI are not equal
   ec2.Instance{
       ... // 2 ignored and 17 identical fields
 -     InstanceLifecycle: &"spot",
 +     InstanceLifecycle: nil,
       InstanceType:      &"m6i.xlarge",
       Ipv6Address:       nil,
       ... // 1 ignored and 4 identical fields
       MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
       Monitoring:      &{State: &"disabled"},
       NetworkInterfaces: []*ec2.InstanceNetworkInterface{
               &{
                       ... // 2 identical fields
                       ConnectionTrackingConfiguration: nil,
                       Description:                     &"",
                       Groups: []*ec2.GroupIdentifier{
                               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -                             (
 -                                     s"""
 -                                     {
 -                                       GroupId: "sg-050993867b2317f8d",
 -                                       GroupName: "xxia-1-xzx9p-lb"
 -                                     }
 -                                     s"""
 -                             ),
                       },
                       InterfaceType: &"interface",
                       Ipv4Prefixes:  nil,
                       ... // 4 ignored and 8 identical fields
               },
       },
       OutpostArn: nil,
       Placement:  &{AvailabilityZone: &"us-east-2a", GroupName: &"", Tenancy: &"default"},
       ... // 2 ignored and 7 identical fields
       RootDeviceName: &"/dev/xvda",
       RootDeviceType: &"ebs",
       SecurityGroups: []*ec2.GroupIdentifier{
               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -             (
 -                     s"""
 -                     {
 -                       GroupId: "sg-050993867b2317f8d",
 -                       GroupName: "xxia-1-xzx9p-lb"
 -                     }
 -                     s"""
 -             ),
       },
       SourceDestCheck:       &true,
 -     SpotInstanceRequestId: &"sir-c6ez5xin",
 +     SpotInstanceRequestId: nil,
       SriovNetSupport:       nil,
       State:                 &{Code: &16, Name: &"running"},
       ... // 2 ignored and 7 identical fields
   }
   STEP: Deleting MachineSet "aws-machineset" @ 08/01/25 12:26:56.869
   STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 08/01/25 12:26:57.368
   STEP: Deleting /aws-machine-template @ 08/01/25 12:27:55.123
 • [312.054 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 312.056 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Blocks

openshift/origin#30568

Summary by CodeRabbit

Release Notes

  • New Features

  • Added OpenShift tests extension for cluster-capi-operator enabling platform-based test selection and execution.

  • Docker image now includes compressed extension binary for optimized deployment.

  • Improvements

  • Updated Docker image labels with display name and OpenShift tags metadata.

  • Enhanced test suite organization with platform-specific labeling (AWS, Azure, GCP, vSphere, BareMetal, PowerVS).

  • Improved test initialization and validation logic across conformance test suites.

  • Chores

  • Updated project dependencies to align with cluster API and Kubernetes components.

✏️ Tip: You can customize this high-level summary in your review settings.

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

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

🧹 Nitpick comments (1)
openshift-tests-extension/cmd/main.go (1)

38-41: Consider more informative error message.

The panic provides the error but could include additional context about the failure point.

🔎 Suggested improvement
 	specs, err := g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
 	if err != nil {
-		panic(fmt.Sprintf("couldn't build extension test specs from ginkgo: %+v", err.Error()))
+		panic(fmt.Sprintf("failed to build extension test specs from OpenShift Ginkgo suite: %v", err))
 	}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between e7c9a79 and 3c6a0f5.

⛔ Files ignored due to path filters (6)
  • e2e/go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
  • hack/tools/go.sum is excluded by !**/*.sum
  • manifests-gen/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
📒 Files selected for processing (19)
  • Dockerfile.rhel
  • Makefile
  • e2e/aws.go
  • e2e/azure.go
  • e2e/baremetal.go
  • e2e/framework/cluster.go
  • e2e/gcp.go
  • e2e/go.mod
  • e2e/machine_migration_capi_authoritative.go
  • e2e/machine_migration_mapi_authoritative.go
  • e2e/machineset_migration_capi_authoritative.go
  • e2e/machineset_migration_mapi_authoritative.go
  • e2e/powervs.go
  • e2e/vsphere.go
  • hack/tools/go.mod
  • hack/vendor.sh
  • manifests-gen/go.mod
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
✅ Files skipped from review due to trivial changes (1)
  • e2e/framework/cluster.go
🚧 Files skipped from review as they are similar to previous changes (7)
  • e2e/machineset_migration_mapi_authoritative.go
  • openshift-tests-extension/go.mod
  • hack/vendor.sh
  • e2e/azure.go
  • e2e/vsphere.go
  • hack/tools/go.mod
  • e2e/gcp.go
🧰 Additional context used
🧬 Code graph analysis (5)
e2e/baremetal.go (2)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (60-81)
e2e/powervs.go (2)
pkg/conversion/mapi2capi/interface.go (1)
  • MachineSet (29-31)
e2e/e2e_common.go (1)
  • InitCommonVariables (60-81)
e2e/machine_migration_mapi_authoritative.go (1)
e2e/e2e_common.go (1)
  • InitCommonVariables (60-81)
e2e/aws.go (1)
e2e/e2e_common.go (1)
  • InitCommonVariables (60-81)
e2e/machineset_migration_capi_authoritative.go (1)
e2e/e2e_common.go (1)
  • InitCommonVariables (60-81)
🔇 Additional comments (18)
e2e/machine_migration_mapi_authoritative.go (1)

16-18: LGTM! Proper test metadata and initialization for OpenShift test framework integration.

The addition of platform and categorization labels (platform:aws, Disruptive, Conformance, Serial) enables proper test filtering and execution within the OpenShift tests extension framework. The InitCommonVariables() call correctly initializes the required test variables (cl, platform, ctx) that are used throughout the test suite.

e2e/machineset_migration_capi_authoritative.go (2)

17-17: LGTM! Platform-aware labeling correctly applied.

The added labels appropriately describe this test's characteristics:

  • [platform:aws] aligns with the AWS platform guard on line 20
  • [Disruptive] reflects MachineSet creation/deletion/scaling operations
  • Label("Conformance") marks this as testing core MachineAPIMigration behavior
  • Label("Serial") ensures safe execution given the ordered contexts and shared resource manipulation

These labels enable proper test discovery and filtering in the OpenShift tests extension framework.


19-19: LGTM! Initialization correctly placed.

The InitCommonVariables() call is properly positioned before the platform check on line 20, as it sets up the platform variable (along with the client and other common test infrastructure). This standardized initialization aligns with the broader refactoring across the e2e test suite.

e2e/aws.go (2)

15-15: Well-structured test metadata for extension discovery.

The standardized labels ([sig-cluster-lifecycle], [Feature:ClusterAPI], [platform:aws], [Disruptive], Conformance, Serial) enable precise test selection and filtering in the OpenShift tests extension framework.


25-25: Proper test initialization added.

The InitCommonVariables() call correctly initializes shared test infrastructure (client, logger, platform detection) before the platform guard, ensuring consistent setup across all platform tests.

e2e/baremetal.go (1)

26-26: Consistent test metadata and initialization.

The changes align with the pattern established across all platform tests: standardized labels for extension-based discovery and proper initialization of shared test variables.

Also applies to: 32-32

e2e/powervs.go (2)

27-27: Consistent test labeling and initialization.

Changes align with the standardization pattern across all platform e2e tests.

Also applies to: 33-33


94-94: Good defensive validation.

The added assertion prevents potential panics in getNetworkResourceReference() by ensuring Network.Type is set before use.

e2e/go.mod (1)

15-27: Verify Cluster API and provider compatibility.

This module has the same dependency versions as manifests-gen/go.mod (cluster-api v1.10.4 with k8s.io/* v0.33.3). The compatibility verification requested for manifests-gen/go.mod applies here as well. Additionally, ensure that all the cluster-api provider versions (AWS v2.9.0, Azure v1.20.2, GCP v1.10.0, IBMCloud v0.11.0, vSphere v1.13.0) are compatible with cluster-api v1.10.4.

Dockerfile.rhel (2)

4-5: Efficient extension binary packaging.

Building and gzipping the extension binary in the builder stage reduces the final image size while maintaining the extension functionality.


13-15: Proper extension metadata for OpenShift test framework.

The added labels (io.k8s.display-name, io.openshift.tags including "e2e-extension") enable the OpenShift test framework to discover and extract the extension binary from the operator payload.

Makefile (1)

32-32: Clean integration of extension binary into build process.

The tests-ext target properly builds the extension in its own module directory and outputs to the standard bin/ location, maintaining consistency with the operator and migration binary builds.

Also applies to: 47-49

openshift-tests-extension/cmd/main.go (2)

19-36: Well-structured extension registration.

The test suite definitions with CEL qualifiers provide flexible test selection:

  • Parallel conformance tests (non-Serial && Conformance)
  • Serial conformance tests (Serial && Conformance)
  • All ClusterAPI feature tests

44-58: Robust platform detection and registration.

The code correctly:

  • Scans tests for platform labels using regex
  • Extracts platform names from matched patterns
  • Uses a map to prevent duplicate processing
  • Applies PlatformEquals selectors to matching tests

The regex pattern \[platform:[a-z]*] appropriately matches lowercase platform identifiers (aws, azure, gcp, vsphere, baremetal, powervs).

manifests-gen/go.mod (1)

10-18: No action needed. Cluster API v1.10.4 is officially compatible with Kubernetes 1.33 per the v1.10 support matrix (Kubernetes v1.33 supported with Cluster API >= v1.10.1).

e2e/machine_migration_capi_authoritative.go (3)

17-17: LGTM! Test descriptor properly annotated.

The platform, disruption, and test execution labels accurately reflect this AWS-specific, serial conformance test.


64-78: No action needed—GetMachine does not return nil, and cleanupMachineResources already handles nil pointers.

The concern is unfounded. GetMachine uses Eventually().Should(Succeed()) to wait for the machine to exist; it does not return nil on failure—the test fails instead. Additionally, cleanupMachineResources already guards against nil pointers with explicit nil checks (see e2e/machine_migration_helpers.go lines 282–285 and 290–293), so the proposed nil guard is unnecessary.

Likely an incorrect or invalid review comment.


19-19: Remove InitCommonVariables() call from BeforeAll—it's already initialized in BeforeSuite.

InitCommonVariables() is called in the suite-level BeforeSuite hook (e2e_test.go:16) and creates a new Kubernetes client via client.New(). Calling it again in individual test BeforeAll hooks creates duplicate clients that are never closed, causing resource leaks. Since Ordered tests execute sequentially and the global variables are shared, the BeforeSuite initialization is sufficient.

@sunzhaohua2
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 4, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate cluster-capi-operator's E2E tests into the OpenShift origin test framework.

For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.

This is already adopted by other components:

replace #274 to move the tests-extension pkg to a separate module

Local Tests

Get extension usage

$ bin/cluster-capi-operator-ext     [10:29:54]
Cluster CAPI Operator tests extension for OpenShift

Usage:
  [command]

Available Commands:
 completion  Generate the autocompletion script for the specified shell
 help        Help about any command
 images      List test images
 info        Display extension metadata
 list        List items
 run-suite   Run a group of tests by suite. This is more limited than origin, and intended for light local development use. Orchestration parameters, scheduling, isolation, etc are not obeyed, and Ginkgo tests are executed serially.
 run-test    Runs tests by name
 update      Update test metadata

Flags:
 -h, --help   help for this command

Use " [command] --help" for more information about a command.

Get extension definition info

$ bin/cluster-capi-operator-ext info
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-capi-operator"
   },
   "suites": [
       {
           "name": "capio/conformance/parallel",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/conformance/serial",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (name.contains(\"[Feature:ClusterAPI]\") || name.contains(\"[OCPFeatureGate:MachineAPIMigration]\"))"
           ]
       }
   ],
   "images": null
}

List test cases


$ bin/cluster-capi-operator-ext list tests --suite capio/e2e --platform gcp
[
 {
   "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:gcp][Disruptive] Cluster API GCP MachineSet should be able to run a machine",
   "labels": {
     "Conformance": {},
     "Serial": {}
   },
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-capi-operator",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:26",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:31",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:39",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:50"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {
     "include": "platform==\"gcp\""
   }
 }
]

Run test suites

$ bin/cluster-capi-operator-ext run-test -n "Cluster API AWS MachineSet should be able to run a machine with a default provider spec"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator
 ================================================================================
 Random Seed: 1754022163 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 Cluster API AWS MachineSet should be able to run a machine with a default provider spec
 /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:60
   STEP: Creating AWS machine template @ 08/01/25 12:22:46.259
   STEP: Creating MachineSet "aws-machineset" @ 08/01/25 12:22:47.061
   STEP: Waiting for MachineSet machines "aws-machineset" to enter Running phase @ 08/01/25 12:22:47.611
   STEP: Comparing instances created by MAPI and CAPI @ 08/01/25 12:26:53.233
 Instances created by MAPI and CAPI are not equal
   ec2.Instance{
       ... // 2 ignored and 17 identical fields
 -     InstanceLifecycle: &"spot",
 +     InstanceLifecycle: nil,
       InstanceType:      &"m6i.xlarge",
       Ipv6Address:       nil,
       ... // 1 ignored and 4 identical fields
       MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
       Monitoring:      &{State: &"disabled"},
       NetworkInterfaces: []*ec2.InstanceNetworkInterface{
               &{
                       ... // 2 identical fields
                       ConnectionTrackingConfiguration: nil,
                       Description:                     &"",
                       Groups: []*ec2.GroupIdentifier{
                               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -                             (
 -                                     s"""
 -                                     {
 -                                       GroupId: "sg-050993867b2317f8d",
 -                                       GroupName: "xxia-1-xzx9p-lb"
 -                                     }
 -                                     s"""
 -                             ),
                       },
                       InterfaceType: &"interface",
                       Ipv4Prefixes:  nil,
                       ... // 4 ignored and 8 identical fields
               },
       },
       OutpostArn: nil,
       Placement:  &{AvailabilityZone: &"us-east-2a", GroupName: &"", Tenancy: &"default"},
       ... // 2 ignored and 7 identical fields
       RootDeviceName: &"/dev/xvda",
       RootDeviceType: &"ebs",
       SecurityGroups: []*ec2.GroupIdentifier{
               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -             (
 -                     s"""
 -                     {
 -                       GroupId: "sg-050993867b2317f8d",
 -                       GroupName: "xxia-1-xzx9p-lb"
 -                     }
 -                     s"""
 -             ),
       },
       SourceDestCheck:       &true,
 -     SpotInstanceRequestId: &"sir-c6ez5xin",
 +     SpotInstanceRequestId: nil,
       SriovNetSupport:       nil,
       State:                 &{Code: &16, Name: &"running"},
       ... // 2 ignored and 7 identical fields
   }
   STEP: Deleting MachineSet "aws-machineset" @ 08/01/25 12:26:56.869
   STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 08/01/25 12:26:57.368
   STEP: Deleting /aws-machine-template @ 08/01/25 12:27:55.123
 • [312.054 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 312.056 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Blocks

openshift/origin#30568

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension for platform-based test selection and execution; build now produces a compressed extension artifact included in the image.

  • Improvements

  • Updated image metadata with display name and OpenShift tags.

  • Standardized test suite labels (platform, Conformance, Serial) and improved test initialization, validations, and cleanup across providers.

  • Dependency updates for provider and tooling modules.

  • Chores

  • Updated build targets and vendoring lists to include the new tests extension.

✏️ Tip: You can customize this high-level summary in your review settings.

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

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
e2e/go.mod (1)

9-9: Different forks used for cluster-api-provider-azure replace directive across module files.

The e2e/go.mod uses github.com/damdo/cluster-api-provider-azure (line 9) while go.mod uses github.com/openshift/cluster-api-provider-azure (line 8). Both point to the same commit hash (v0.0.0-20251202084521-c2e0e38d1e0e), but using different forks reduces consistency and maintainability across the project. Additionally, the replace directives for cluster-api-actuator-pkg/testutils differ between the two files (e2e uses v0.0.0-20251203134942-d9bd7b8593f3, while go.mod uses v0.0.0-20251211141525-c707612472dc).

Align both files to use the same upstream sources—preferring github.com/openshift/ for the Azure provider to maintain consistency with the root module and the project's standardized fork selection.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 3c6a0f5 and 76aa3cb.

⛔ Files ignored due to path filters (158)
  • go.work.sum is excluded by !**/*.sum
  • hack/tools/go.sum is excluded by !**/*.sum
  • manifests-gen/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/github.com/onsi/ginkgo/v2/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/OWNERS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl.go 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/decorator_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/deprecated_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/automaxprocs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cgroup.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cgroups.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cgroups2.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cpu_quota_linux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/cpu_quota_unsupported.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/mountpoint.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/runtime.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/automaxprocs/subsys.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/around_node.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/failer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/focus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/group.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/node.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/ordering.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.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/parallel_support/client_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_event_writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_reporter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/spec_context.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/internal/testingtproxy/testing_t_proxy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/gojson_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/table_dsl.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/around_node.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/config.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/flags.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/label_filter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/report_entry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/semver_filter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types_patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/version.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/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/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/github.com/sergi/go-diff/AUTHORS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/CONTRIBUTORS is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/diffmatchpatch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/match.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/mathutil.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/operation_string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/patch.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/net/context/context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/grep.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/run-fns.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/api/docs.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/build.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagenablehelm.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagsforfunctions.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/create/create.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addbase.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addbuildmetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addcomponent.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addgenerator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addmetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addresource.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/add/addtransformer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/fix/convert.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removebuildmetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removeconfigmap.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removemetadata.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removeresource.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removesecret.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/remove/removetransformer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/internal/kustfile/kustomizationfile.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/internal/util/validate.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/localize/localize.go is excluded by !**/vendor/**, !vendor/**
  • vendor/sigs.k8s.io/kustomize/kyaml/copyutil/copyutil.go is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (4)
  • e2e/go.mod
  • go.mod
  • hack/tools/go.mod
  • manifests-gen/go.mod
💤 Files with no reviewable changes (1)
  • manifests-gen/go.mod
🚧 Files skipped from review as they are similar to previous changes (1)
  • hack/tools/go.mod
🔇 Additional comments (2)
e2e/go.mod (1)

28-28: ✓ Stable version upgrade is sound.

Upgrading sigs.k8s.io/cluster-api-provider-azure from a pseudo-version to stable v1.20.2 is a good practice. The version aligns with Kubernetes 1.34 support (via CAPI v1.11.3 and k8s.io/* v0.34.1).

go.mod (1)

42-42: ✓ Stable version upgrade is sound.

Upgrading sigs.k8s.io/cluster-api-provider-azure from a pseudo-version to stable v1.20.2 aligns with the e2e module and is compatible with Kubernetes 1.34 (via CAPI v1.11.3 and k8s.io/* v0.34.1).

Note: The replace directive inconsistency between this file and e2e/go.mod is flagged separately above.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 4, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate cluster-capi-operator's E2E tests into the OpenShift origin test framework.

For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.

This is already adopted by other components:

replace #274 to move the tests-extension pkg to a separate module

Local Tests

Get extension usage

$ bin/cluster-capi-operator-ext     [10:29:54]
Cluster CAPI Operator tests extension for OpenShift

Usage:
  [command]

Available Commands:
 completion  Generate the autocompletion script for the specified shell
 help        Help about any command
 images      List test images
 info        Display extension metadata
 list        List items
 run-suite   Run a group of tests by suite. This is more limited than origin, and intended for light local development use. Orchestration parameters, scheduling, isolation, etc are not obeyed, and Ginkgo tests are executed serially.
 run-test    Runs tests by name
 update      Update test metadata

Flags:
 -h, --help   help for this command

Use " [command] --help" for more information about a command.

Get extension definition info

$ bin/cluster-capi-operator-ext info
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-capi-operator"
   },
   "suites": [
       {
           "name": "capio/conformance/parallel",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/conformance/serial",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (name.contains(\"[Feature:ClusterAPI]\") || name.contains(\"[OCPFeatureGate:MachineAPIMigration]\"))"
           ]
       }
   ],
   "images": null
}

List test cases


$ bin/cluster-capi-operator-ext list tests --suite capio/e2e --platform gcp
[
 {
   "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:gcp][Disruptive] Cluster API GCP MachineSet should be able to run a machine",
   "labels": {
     "Conformance": {},
     "Serial": {}
   },
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-capi-operator",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:26",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:31",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:39",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:50"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {
     "include": "platform==\"gcp\""
   }
 }
]

Run test suites

$ bin/cluster-capi-operator-ext run-test -n "Cluster API AWS MachineSet should be able to run a machine with a default provider spec"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator
 ================================================================================
 Random Seed: 1754022163 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 Cluster API AWS MachineSet should be able to run a machine with a default provider spec
 /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:60
   STEP: Creating AWS machine template @ 08/01/25 12:22:46.259
   STEP: Creating MachineSet "aws-machineset" @ 08/01/25 12:22:47.061
   STEP: Waiting for MachineSet machines "aws-machineset" to enter Running phase @ 08/01/25 12:22:47.611
   STEP: Comparing instances created by MAPI and CAPI @ 08/01/25 12:26:53.233
 Instances created by MAPI and CAPI are not equal
   ec2.Instance{
       ... // 2 ignored and 17 identical fields
 -     InstanceLifecycle: &"spot",
 +     InstanceLifecycle: nil,
       InstanceType:      &"m6i.xlarge",
       Ipv6Address:       nil,
       ... // 1 ignored and 4 identical fields
       MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
       Monitoring:      &{State: &"disabled"},
       NetworkInterfaces: []*ec2.InstanceNetworkInterface{
               &{
                       ... // 2 identical fields
                       ConnectionTrackingConfiguration: nil,
                       Description:                     &"",
                       Groups: []*ec2.GroupIdentifier{
                               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -                             (
 -                                     s"""
 -                                     {
 -                                       GroupId: "sg-050993867b2317f8d",
 -                                       GroupName: "xxia-1-xzx9p-lb"
 -                                     }
 -                                     s"""
 -                             ),
                       },
                       InterfaceType: &"interface",
                       Ipv4Prefixes:  nil,
                       ... // 4 ignored and 8 identical fields
               },
       },
       OutpostArn: nil,
       Placement:  &{AvailabilityZone: &"us-east-2a", GroupName: &"", Tenancy: &"default"},
       ... // 2 ignored and 7 identical fields
       RootDeviceName: &"/dev/xvda",
       RootDeviceType: &"ebs",
       SecurityGroups: []*ec2.GroupIdentifier{
               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -             (
 -                     s"""
 -                     {
 -                       GroupId: "sg-050993867b2317f8d",
 -                       GroupName: "xxia-1-xzx9p-lb"
 -                     }
 -                     s"""
 -             ),
       },
       SourceDestCheck:       &true,
 -     SpotInstanceRequestId: &"sir-c6ez5xin",
 +     SpotInstanceRequestId: nil,
       SriovNetSupport:       nil,
       State:                 &{Code: &16, Name: &"running"},
       ... // 2 ignored and 7 identical fields
   }
   STEP: Deleting MachineSet "aws-machineset" @ 08/01/25 12:26:56.869
   STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 08/01/25 12:26:57.368
   STEP: Deleting /aws-machine-template @ 08/01/25 12:27:55.123
 • [312.054 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 312.056 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Blocks

openshift/origin#30568

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension for platform-based test selection and execution; the build now emits a compressed extension artifact that's included in the container image.

  • Improvements

  • Updated image metadata with display name and OpenShift tags.

  • Standardized test suite metadata (platform, Conformance, Serial), added common initialization, tightened validations and cleanup across providers.

  • Dependency updates for providers and tooling.

  • Chores

  • Build targets and vendoring updated to incorporate the new tests extension.

✏️ Tip: You can customize this high-level summary in your review settings.

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

openshift-ci-robot commented Jan 4, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate cluster-capi-operator's E2E tests into the OpenShift origin test framework.

For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.

This is already adopted by other components:

replace #274 to move the tests-extension pkg to a separate module

Local Tests

Get extension usage

$ bin/cluster-capi-operator-ext     [10:29:54]
Cluster CAPI Operator tests extension for OpenShift

Usage:
  [command]

Available Commands:
 completion  Generate the autocompletion script for the specified shell
 help        Help about any command
 images      List test images
 info        Display extension metadata
 list        List items
 run-suite   Run a group of tests by suite. This is more limited than origin, and intended for light local development use. Orchestration parameters, scheduling, isolation, etc are not obeyed, and Ginkgo tests are executed serially.
 run-test    Runs tests by name
 update      Update test metadata

Flags:
 -h, --help   help for this command

Use " [command] --help" for more information about a command.

Get extension definition info

$ bin/cluster-capi-operator-ext info
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-capi-operator"
   },
   "suites": [
       {
           "name": "capio/conformance/parallel",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/conformance/serial",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (name.contains(\"[Feature:ClusterAPI]\") || name.contains(\"[OCPFeatureGate:MachineAPIMigration]\"))"
           ]
       }
   ],
   "images": null
}

List test cases


$ bin/cluster-capi-operator-ext list tests --suite capio/e2e --platform gcp
[
 {
   "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:gcp][Disruptive] Cluster API GCP MachineSet should be able to run a machine",
   "labels": {
     "Conformance": {},
     "Serial": {}
   },
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-capi-operator",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:26",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:31",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:39",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:50"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {
     "include": "platform==\"gcp\""
   }
 }
]

Run test suites

$ bin/cluster-capi-operator-ext run-test -n "Cluster API AWS MachineSet should be able to run a machine with a default provider spec"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator
 ================================================================================
 Random Seed: 1754022163 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 Cluster API AWS MachineSet should be able to run a machine with a default provider spec
 /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:60
   STEP: Creating AWS machine template @ 08/01/25 12:22:46.259
   STEP: Creating MachineSet "aws-machineset" @ 08/01/25 12:22:47.061
   STEP: Waiting for MachineSet machines "aws-machineset" to enter Running phase @ 08/01/25 12:22:47.611
   STEP: Comparing instances created by MAPI and CAPI @ 08/01/25 12:26:53.233
 Instances created by MAPI and CAPI are not equal
   ec2.Instance{
       ... // 2 ignored and 17 identical fields
 -     InstanceLifecycle: &"spot",
 +     InstanceLifecycle: nil,
       InstanceType:      &"m6i.xlarge",
       Ipv6Address:       nil,
       ... // 1 ignored and 4 identical fields
       MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
       Monitoring:      &{State: &"disabled"},
       NetworkInterfaces: []*ec2.InstanceNetworkInterface{
               &{
                       ... // 2 identical fields
                       ConnectionTrackingConfiguration: nil,
                       Description:                     &"",
                       Groups: []*ec2.GroupIdentifier{
                               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -                             (
 -                                     s"""
 -                                     {
 -                                       GroupId: "sg-050993867b2317f8d",
 -                                       GroupName: "xxia-1-xzx9p-lb"
 -                                     }
 -                                     s"""
 -                             ),
                       },
                       InterfaceType: &"interface",
                       Ipv4Prefixes:  nil,
                       ... // 4 ignored and 8 identical fields
               },
       },
       OutpostArn: nil,
       Placement:  &{AvailabilityZone: &"us-east-2a", GroupName: &"", Tenancy: &"default"},
       ... // 2 ignored and 7 identical fields
       RootDeviceName: &"/dev/xvda",
       RootDeviceType: &"ebs",
       SecurityGroups: []*ec2.GroupIdentifier{
               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -             (
 -                     s"""
 -                     {
 -                       GroupId: "sg-050993867b2317f8d",
 -                       GroupName: "xxia-1-xzx9p-lb"
 -                     }
 -                     s"""
 -             ),
       },
       SourceDestCheck:       &true,
 -     SpotInstanceRequestId: &"sir-c6ez5xin",
 +     SpotInstanceRequestId: nil,
       SriovNetSupport:       nil,
       State:                 &{Code: &16, Name: &"running"},
       ... // 2 ignored and 7 identical fields
   }
   STEP: Deleting MachineSet "aws-machineset" @ 08/01/25 12:26:56.869
   STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 08/01/25 12:26:57.368
   STEP: Deleting /aws-machine-template @ 08/01/25 12:27:55.123
 • [312.054 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 312.056 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Blocks

openshift/origin#30568

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension with a packaged compressed artifact included in the container image.

  • Improvements

  • Enhanced image metadata with display name and OpenShift tags.

  • Standardized test metadata (platform, Conformance, Serial), added common initialization, tightened validations and cleanup, and increased test timeout.

  • Chores

  • Added build target for the tests extension and updated vendoring/module files.

✏️ Tip: You can customize this high-level summary in your review settings.

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

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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between c071990 and 228c933.

📒 Files selected for processing (1)
  • Makefile
🔇 Additional comments (2)
Makefile (2)

32-32: LGTM: Build target correctly includes tests-ext.

The addition of tests-ext to the build dependencies ensures the new OpenShift tests extension binary is built alongside other components.


59-59: Verify the necessity of doubling the unit test timeout.

The unit test timeout has been increased from 10 minutes to 20 minutes. Please confirm whether this change addresses specific test performance issues or is a precautionary measure.

If this change is due to slower tests, consider whether the tests can be optimized or if the timeout is genuinely needed.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 4, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3041 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate cluster-capi-operator's E2E tests into the OpenShift origin test framework.

For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.

This is already adopted by other components:

replace #274 to move the tests-extension pkg to a separate module

Local Tests

Get extension usage

$ bin/cluster-capi-operator-ext     [10:29:54]
Cluster CAPI Operator tests extension for OpenShift

Usage:
  [command]

Available Commands:
 completion  Generate the autocompletion script for the specified shell
 help        Help about any command
 images      List test images
 info        Display extension metadata
 list        List items
 run-suite   Run a group of tests by suite. This is more limited than origin, and intended for light local development use. Orchestration parameters, scheduling, isolation, etc are not obeyed, and Ginkgo tests are executed serially.
 run-test    Runs tests by name
 update      Update test metadata

Flags:
 -h, --help   help for this command

Use " [command] --help" for more information about a command.

Get extension definition info

$ bin/cluster-capi-operator-ext info
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-capi-operator"
   },
   "suites": [
       {
           "name": "capio/conformance/parallel",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/conformance/serial",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "capio/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (name.contains(\"[Feature:ClusterAPI]\") || name.contains(\"[OCPFeatureGate:MachineAPIMigration]\"))"
           ]
       }
   ],
   "images": null
}

List test cases


$ bin/cluster-capi-operator-ext list tests --suite capio/e2e --platform gcp
[
 {
   "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:gcp][Disruptive] Cluster API GCP MachineSet should be able to run a machine",
   "labels": {
     "Conformance": {},
     "Serial": {}
   },
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-capi-operator",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:26",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:31",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:39",
     "/Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/gcp.go:50"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {
     "include": "platform==\"gcp\""
   }
 }
]

Run test suites

$ bin/cluster-capi-operator-ext run-test -n "Cluster API AWS MachineSet should be able to run a machine with a default provider spec"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator
 ================================================================================
 Random Seed: 1754022163 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 Cluster API AWS MachineSet should be able to run a machine with a default provider spec
 /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:60
   STEP: Creating AWS machine template @ 08/01/25 12:22:46.259
   STEP: Creating MachineSet "aws-machineset" @ 08/01/25 12:22:47.061
   STEP: Waiting for MachineSet machines "aws-machineset" to enter Running phase @ 08/01/25 12:22:47.611
   STEP: Comparing instances created by MAPI and CAPI @ 08/01/25 12:26:53.233
 Instances created by MAPI and CAPI are not equal
   ec2.Instance{
       ... // 2 ignored and 17 identical fields
 -     InstanceLifecycle: &"spot",
 +     InstanceLifecycle: nil,
       InstanceType:      &"m6i.xlarge",
       Ipv6Address:       nil,
       ... // 1 ignored and 4 identical fields
       MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
       Monitoring:      &{State: &"disabled"},
       NetworkInterfaces: []*ec2.InstanceNetworkInterface{
               &{
                       ... // 2 identical fields
                       ConnectionTrackingConfiguration: nil,
                       Description:                     &"",
                       Groups: []*ec2.GroupIdentifier{
                               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -                             (
 -                                     s"""
 -                                     {
 -                                       GroupId: "sg-050993867b2317f8d",
 -                                       GroupName: "xxia-1-xzx9p-lb"
 -                                     }
 -                                     s"""
 -                             ),
                       },
                       InterfaceType: &"interface",
                       Ipv4Prefixes:  nil,
                       ... // 4 ignored and 8 identical fields
               },
       },
       OutpostArn: nil,
       Placement:  &{AvailabilityZone: &"us-east-2a", GroupName: &"", Tenancy: &"default"},
       ... // 2 ignored and 7 identical fields
       RootDeviceName: &"/dev/xvda",
       RootDeviceType: &"ebs",
       SecurityGroups: []*ec2.GroupIdentifier{
               &{GroupId: &"sg-055803e6d22cee998", GroupName: &"xxia-1-xzx9p-node"},
 -             (
 -                     s"""
 -                     {
 -                       GroupId: "sg-050993867b2317f8d",
 -                       GroupName: "xxia-1-xzx9p-lb"
 -                     }
 -                     s"""
 -             ),
       },
       SourceDestCheck:       &true,
 -     SpotInstanceRequestId: &"sir-c6ez5xin",
 +     SpotInstanceRequestId: nil,
       SriovNetSupport:       nil,
       State:                 &{Code: &16, Name: &"running"},
       ... // 2 ignored and 7 identical fields
   }
   STEP: Deleting MachineSet "aws-machineset" @ 08/01/25 12:26:56.869
   STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 08/01/25 12:26:57.368
   STEP: Deleting /aws-machine-template @ 08/01/25 12:27:55.123
 • [312.054 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 312.056 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

Blocks

openshift/origin#30568

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension and included its compressed artifact in the container image.

  • Improvements

  • Enhanced image metadata with a display name and OpenShift tags.

  • Standardized test metadata (platform, Conformance, Serial), added common test initialization, tightened validations and cleanup, and increased test timeouts.

  • Chores

  • Added a build target for the tests extension and updated module/vendor metadata.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

@sunzhaohua2
Copy link
Contributor Author

/retest

@sunzhaohua2
Copy link
Contributor Author

/test unit

1 similar comment
@sunzhaohua2
Copy link
Contributor Author

/test unit

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 6, 2026

@sunzhaohua2: The following tests 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-azure-capi-techpreview e7c9a79 link true /test e2e-azure-capi-techpreview
ci/prow/e2e-openstack-ovn-techpreview e7c9a79 link true /test e2e-openstack-ovn-techpreview
ci/prow/e2e-azure-ovn-techpreview e7c9a79 link false /test e2e-azure-ovn-techpreview
ci/prow/e2e-openstack-capi-techpreview e7c9a79 link true /test e2e-openstack-capi-techpreview
ci/prow/okd-scos-images 8d526f2 link true /test okd-scos-images

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants