Skip to content

OCPCLOUD-3041: Created Cluster-api-tests-ext command for origin e2e#413

Open
sunzhaohua2 wants to merge 5 commits intoopenshift:mainfrom
sunzhaohua2:ote-capi
Open

OCPCLOUD-3041: Created Cluster-api-tests-ext command for origin e2e#413
sunzhaohua2 wants to merge 5 commits intoopenshift:mainfrom
sunzhaohua2:ote-capi

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

Release Notes

  • New Features

    • Introduced tests extension module supporting platform-aware test selection and execution
  • Improvements

    • Enhanced test suite metadata with platform-specific labels and execution modes for improved organization
    • Optimized container image by compressing extension binary for more efficient deployment
  • Chores

    • Updated dependencies including cluster-api-provider-azure to v1.20.2

@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

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Introduces an OpenShift tests extension module for cluster-capi-operator with standardized e2e test configurations. Updates multiple platform-specific test suites with consistent tagging, conformance labels, and initialization logic. Adds build target for extension binary and updates dependencies, particularly for Azure provider.

Changes

Cohort / File(s) Summary
E2E Test Standardization
e2e/aws.go, e2e/azure.go, e2e/baremetal.go, e2e/gcp.go, e2e/powervs.go, e2e/vsphere.go, e2e/machine_migration_capi_authoritative.go, e2e/machine_migration_mapi_authoritative.go, e2e/machineset_migration_capi_authoritative.go, e2e/machineset_migration_mapi_authoritative.go
Updated test suite descriptions with platform tags ([platform:aws], [platform:azure], etc.) and lifecycle markers; added Conformance and Serial labels; injected InitCommonVariables() calls in BeforeAll. Minor logic adjustments: subscriptionID casting in Azure, improved error messages in vSphere and MachineSet migration tests.
Extension Module
openshift-tests-extension/cmd/main.go, openshift-tests-extension/go.mod
Created new OpenShift tests extension for cluster-capi-operator. Main entry point registers test suites (conformance/parallel, conformance/serial, e2e), discovers platform tags via regex, applies platform selectors, and wires Cobra commands. Go module defines dependencies with replacements for ginkgo and OpenTelemetry instrumentation.
Build Configuration
Dockerfile.rhel, Makefile
Added gzip compression of extension binary in build stage and copied compressed artifact to final image. Updated image labels with display name and tags. New Makefile target tests-ext builds cluster-capi-operator-ext; integrated into build dependencies and .PHONY declaration.
Dependency Updates
go.mod, e2e/go.mod
Updated sigs.k8s.io/cluster-api-provider-azure from v0.0.0-20251202084521-c2e0e38d1e0e to v1.20.2 in both modules; added indirect dependency on gotest.tools/v3 v3.4.0; bumped k8s.io/controller-manager to v0.32.2 (indirect).
Build Scripts
hack/vendor.sh
Added openshift-tests-extension module to go mod tidy and go mod verify processing list.

Sequence Diagram

sequenceDiagram
    actor User
    participant Extension as Tests Extension
    participant Registry as Extension Registry
    participant TestBuilder as Test Spec Builder
    participant Platform as Platform Detector
    participant Ginkgo as OpenShift Ginkgo
    participant TestRunner as Test Executor

    User->>Extension: Execute extension binary
    Extension->>Registry: Create registry & extension payload
    Extension->>Ginkgo: Build test specs from OpenShift Ginkgo
    Ginkgo-->>TestBuilder: Return test definitions
    TestBuilder->>Platform: Scan test labels for platform tags
    Platform->>Platform: Extract platforms via regex
    Platform-->>TestBuilder: Return discovered platforms
    TestBuilder->>Registry: Register suites with PlatformEquals selectors
    TestBuilder->>Registry: Attach test specs to extension
    Registry->>Extension: Wire Cobra root command
    Extension->>TestRunner: Execute extension commands
    TestRunner-->>User: Return results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Poem

🐰 A bundle of tests now organized with care,
Platform tags flying through the air!
Extension modules, pristine and new,
Conformance labels shining bright and true—
Our operator hops to victory,
Testing each platform's destiny! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 clearly and specifically describes the main change: creation of a Cluster-api-tests-ext command for origin e2e testing, with the JIRA reference providing context.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

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

@sunzhaohua2
Copy link
Contributor Author

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

@theobarberbany I have updated, PTAL

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 2, 2026

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

openshift-ci bot commented Mar 2, 2026

[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 damdo. 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 Mar 2, 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

Release Notes

  • New Features

  • Introduced tests extension module supporting platform-aware test selection and execution

  • Improvements

  • Enhanced test suite metadata with platform-specific labels and execution modes for improved organization

  • Optimized container image by compressing extension binary for more efficient deployment

  • Chores

  • Updated dependencies including cluster-api-provider-azure to v1.20.2

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

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

46-58: Consider regex pattern compilation efficiency and future-proofing improvements, but current code works for all platform labels in the codebase.

The regex pattern \[platform:[a-z]*] correctly matches all platform labels currently used in the repository: [platform:aws], [platform:azure], [platform:baremetal], [platform:gcp], [platform:powervs], and [platform:vsphere]. No platform labels with digits or hyphens exist in the codebase, and no test names contain multiple platform labels.

However, the code has minor inefficiencies: the regex is recompiled in every loop iteration (line 47), and using FindStringSubmatch instead of FindAllStringSubmatch limits flexibility if test names ever contain multiple platform labels. The proposed fix improves these aspects by compiling the regex once, supporting digits and hyphens for future-proofing, and using capturing groups for cleaner label extraction.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openshift-tests-extension/cmd/main.go` around lines 46 - 58, Compile the
platform regex once outside the loop and use a capturing group plus
FindAllStringSubmatch to support multiple labels and future characters
(digits/hyphens); e.g., replace regexp.MustCompile(`\[platform:[a-z]*]`) inside
the loop with a single compiled re like `\[platform:([a-z0-9-]+)\]`, call
re.FindAllStringSubmatch(test, -1) in the loop, iterate matches and use match[1]
as the platform string, then use that platform (and the full match if you still
need a unique key) when populating foundPlatforms and when calling
specs.Select(extensiontests.NameContains(...)).Include(extensiontests.PlatformEquals(...))
so you avoid recompiling and correctly extract multiple/future-proof labels.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@openshift-tests-extension/cmd/main.go`:
- Around line 38-41: The code panics when
g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() fails; change that to a
clean CLI error path by checking err and printing a user-friendly error to
stderr (e.g., fmt.Fprintf(os.Stderr, "error building extension test specs:
%v\n", err)) and then exiting with a non-zero status (os.Exit(1)) or returning
the error from main instead of calling panic; update the block around specs, err
and ensure any callers of main handle the returned error if you choose the
return approach.

---

Nitpick comments:
In `@openshift-tests-extension/cmd/main.go`:
- Around line 46-58: Compile the platform regex once outside the loop and use a
capturing group plus FindAllStringSubmatch to support multiple labels and future
characters (digits/hyphens); e.g., replace
regexp.MustCompile(`\[platform:[a-z]*]`) inside the loop with a single compiled
re like `\[platform:([a-z0-9-]+)\]`, call re.FindAllStringSubmatch(test, -1) in
the loop, iterate matches and use match[1] as the platform string, then use that
platform (and the full match if you still need a unique key) when populating
foundPlatforms and when calling
specs.Select(extensiontests.NameContains(...)).Include(extensiontests.PlatformEquals(...))
so you avoid recompiling and correctly extract multiple/future-proof labels.

ℹ️ Review info

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 3e0522d and f26ed20.

⛔ Files ignored due to path filters (5)
  • go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
  • go.work.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 (17)
  • Dockerfile.rhel
  • Makefile
  • e2e/aws.go
  • e2e/azure.go
  • e2e/baremetal.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
  • go.mod
  • hack/vendor.sh
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
🚧 Files skipped from review as they are similar to previous changes (9)
  • Dockerfile.rhel
  • e2e/gcp.go
  • e2e/azure.go
  • e2e/powervs.go
  • e2e/machineset_migration_capi_authoritative.go
  • hack/vendor.sh
  • openshift-tests-extension/go.mod
  • e2e/go.mod
  • Makefile

Comment on lines +38 to +41
specs, err := g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
if err != nil {
panic(fmt.Sprintf("couldn't build extension test specs from ginkgo: %+v", err.Error()))
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Avoid panic for CLI setup failures.

Line 40 should return a clean CLI error path instead of a panic stack trace.

💡 Proposed fix
 	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)
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openshift-tests-extension/cmd/main.go` around lines 38 - 41, The code panics
when g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() fails; change that to a
clean CLI error path by checking err and printing a user-friendly error to
stderr (e.g., fmt.Fprintf(os.Stderr, "error building extension test specs:
%v\n", err)) and then exiting with a non-zero status (os.Exit(1)) or returning
the error from main instead of calling panic; update the block around specs, err
and ensure any callers of main handle the returned error if you choose the
return approach.

@sunzhaohua2
Copy link
Contributor Author

Rebased and tested locally.


zhsun:cluster-capi-operator/ (ote-capi✗) $ bin/cluster-capi-operator-ext                         
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.

zhsun:cluster-capi-operator/ (ote-capi✗) $ 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
}

zhsun:cluster-capi-operator/ (ote-capi✗) $ 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": {}
    },
...

zhsun:cluster-capi-operator/ (ote-capi✗) $ bin/cluster-capi-operator-ext run-test -n "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:aws][Disruptive] 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: 1772429882 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [sig-cluster-lifecycle][Feature:ClusterAPI][platform:aws][Disruptive] Cluster API AWS MachineSet should be able to run a machine with a default provider spec [Conformance, Serial]
  /Users/zhsun/go/src/github.com/openshift/cluster-capi-operator/e2e/aws.go:66
    STEP: Creating AWS machine template @ 03/02/26 13:38:05.002
    STEP: Creating MachineSet "aws-machineset" @ 03/02/26 13:38:05.249
    STEP: Waiting for CAPI MachineSet "aws-machineset" machines to enter Running phase @ 03/02/26 13:38:05.505
    STEP: Comparing instances created by MAPI and CAPI @ 03/02/26 13:42:10.413
  Instances created by MAPI and CAPI are not equal
    ec2.Instance{
        ... // 3 ignored and 24 identical fields
        MetadataOptions: &{HttpEndpoint: &"enabled", HttpProtocolIpv6: &"disabled", HttpPutResponseHopLimit: &1, HttpTokens: &"optional", ...},
        Monitoring:      &{State: &"disabled"},
        NetworkInterfaces: []*ec2.InstanceNetworkInterface{
                &{
                        Association: nil,
                        Attachment: &ec2.InstanceNetworkInterfaceAttachment{
  -                             AttachTime:          &s"2026-03-02 02:08:56 +0000 UTC",
  +                             AttachTime:          &s"2026-03-02 05:38:07 +0000 UTC",
  -                             AttachmentId:        &"eni-attach-02e12c8fc9c60e7f8",
  +                             AttachmentId:        &"eni-attach-010c99cad6f1a9693",
                                DeleteOnTermination: &true,
                                DeviceIndex:         &0,
                                ... // 3 identical fields
                        },
                        ConnectionTrackingConfiguration: nil,
                        Description:                     &"",
                        Groups: []*ec2.GroupIdentifier{
  -                             (
  -                                     s"""
  -                                     {
  -                                       GroupId: "sg-013da19e5cc20c56e",
  -                                       GroupName: "xzha-0226-mdwqt-lb"
  -                                     }
  -                                     s"""
  -                             ),
                                &{GroupId: &"sg-057082ec8099d2bba", GroupName: &"xzha-0226-mdwqt-node"},
                        },
                        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{
  -             (
  -                     s"""
  -                     {
  -                       GroupId: "sg-013da19e5cc20c56e",
  -                       GroupName: "xzha-0226-mdwqt-lb"
  -                     }
  -                     s"""
  -             ),
                &{GroupId: &"sg-057082ec8099d2bba", GroupName: &"xzha-0226-mdwqt-node"},
        },
        SourceDestCheck:       &true,
        SpotInstanceRequestId: nil,
        ... // 2 ignored and 9 identical fields
    }
    STEP: Deleting MachineSet "aws-machineset" @ 03/02/26 13:42:12.925
    STEP: Waiting for MachineSet "aws-machineset" to be deleted @ 03/02/26 13:42:13.169
    STEP: Deleting *v1beta2.AWSMachineTemplate aws-machine-template @ 03/02/26 13:43:11.358
  • [309.017 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 309.020 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
  {
    "name": "[sig-cluster-lifecycle][Feature:ClusterAPI][platform:aws][Disruptive] Cluster API AWS MachineSet should be able to run a machine with a default provider spec",
    "lifecycle": "blocking",
    "duration": 309028,
    "startTime": "2026-03-02 05:38:02.583040 UTC",
    "endTime": "2026-03-02 05:43:11.611472 UTC",
    "result": "passed",

@sunzhaohua2
Copy link
Contributor Author

/test e2e-aws-capi-techpreview

@sunzhaohua2
Copy link
Contributor Author

/test unit

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2026
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2026
@sunzhaohua2
Copy link
Contributor Author

/retest

1 similar comment
@sunzhaohua2
Copy link
Contributor Author

/retest

@sunzhaohua2
Copy link
Contributor Author

/test unit

@sunzhaohua2
Copy link
Contributor Author

/test unit

1 similar comment
@sunzhaohua2
Copy link
Contributor Author

/test unit

@sunzhaohua2
Copy link
Contributor Author

/test e2e-aws-capi-techpreview

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 9, 2026

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

Test name Commit Details Required Rerun command
ci/prow/e2e-metal3-capi-techpreview 3e0522d link false /test e2e-metal3-capi-techpreview

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.

@damdo
Copy link
Member

damdo commented Mar 10, 2026

/assign @mdbooth @damdo

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.

7 participants