Skip to content

OCPCLOUD-3044: Add OpenShift Test Extension (OTE) framework integration#294

Open
sunzhaohua2 wants to merge 2 commits intoopenshift:mainfrom
sunzhaohua2:ote
Open

OCPCLOUD-3044: Add OpenShift Test Extension (OTE) framework integration#294
sunzhaohua2 wants to merge 2 commits intoopenshift:mainfrom
sunzhaohua2:ote

Conversation

@sunzhaohua2
Copy link

@sunzhaohua2 sunzhaohua2 commented Mar 6, 2026

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate this repo'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.

Local Tests:

zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext info                                   [14:47:56]
{
    "apiVersion": "v1.1",
    "source": {
        "commit": "",
        "build_date": "",
        "git_tree_state": ""
    },
    "component": {
        "product": "openshift",
        "type": "payload",
        "name": "cluster-machine-approver"
    },
    "suites": [
        {
            "name": "machine-approver/conformance/parallel",
            "description": "",
            "parents": [
                "openshift/conformance/parallel"
            ],
            "qualifiers": [
                "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
            ]
        },
        {
            "name": "machine-approver/conformance/serial",
            "description": "",
            "parents": [
                "openshift/conformance/serial"
            ],
            "qualifiers": [
                "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
            ]
        },
        {
            "name": "machine-approver/e2e",
            "description": "",
            "qualifiers": [
                "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (name.contains(\"[Feature:MachineApprover]\"))"
            ]
        }
    ],
    "images": null
}
zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext list                                   [14:48:01]
[
  {
    "name": "[Feature:MachineApprover] CSR Approval when a valid node CSR is created should approve the CSR [Conformance]",
    "labels": {},
    "resources": {
      "isolation": {}
    },
    "source": "openshift:payload:cluster-machine-approver",
    "codeLocations": [
      "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
      "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:24",
      "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:25"
    ],
    "lifecycle": "blocking",
    "environmentSelector": {}
  },
  {
    "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
    "labels": {},
    "resources": {
      "isolation": {}
    },
    "source": "openshift:payload:cluster-machine-approver",
    "codeLocations": [
      "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
      "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:30",
      "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:31"
    ],
    "lifecycle": "blocking",
    "environmentSelector": {}
  }
]

zhsun:cluster-machine-approver/ (ote) $ bin/cluster-machine-approver-ext  run-test -n "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]"
  Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver
  ===================================================================================
  Random Seed: 1772776531 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]
  /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31
    [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
  S [SKIPPED] [0.001 seconds]
  [Feature:MachineApprover] CSR Approval when an invalid CSR is created [It] should reject the CSR [Conformance]
  /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31

    [SKIPPED] E2E test placeholder - requires real cluster
    In [It] at: /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
  ------------------------------

  Ran 0 of 1 Specs in 0.002 seconds
  SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
[
  {
    "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
    "lifecycle": "blocking",
    "duration": 2,
    "startTime": "2026-03-06 05:55:31.346248 UTC",
    "endTime": "2026-03-06 05:55:31.349109 UTC",
    "result": "skipped",
    "output": "  [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348\n\n skip [github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32]: E2E test placeholder - requires real cluster\n"
  }
]%                                                                                                              

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 6, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 6, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3044 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 this repo'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.

Local Tests:

zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext info                                   [14:47:56]
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-machine-approver"
   },
   "suites": [
       {
           "name": "machine-approver/conformance/parallel",
           "description": "",
           "parents": [
               "openshift/conformance/parallel"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/conformance/serial",
           "description": "",
           "parents": [
               "openshift/conformance/serial"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (name.contains(\"[Feature:MachineApprover]\"))"
           ]
       }
   ],
   "images": null
}
zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext list                                   [14:48:01]
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when a valid node CSR is created should approve the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:24",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:25"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 },
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:30",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:31"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 }
]

zhsun:cluster-machine-approver/ (ote) $ bin/cluster-machine-approver-ext  run-test -n "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver
 ===================================================================================
 Random Seed: 1772776531 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31
   [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 S [SKIPPED] [0.001 seconds]
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created [It] should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31

   [SKIPPED] E2E test placeholder - requires real cluster
   In [It] at: /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 ------------------------------

 Ran 0 of 1 Specs in 0.002 seconds
 SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "lifecycle": "blocking",
   "duration": 2,
   "startTime": "2026-03-06 05:55:31.346248 UTC",
   "endTime": "2026-03-06 05:55:31.349109 UTC",
   "result": "skipped",
   "output": "  [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348\n\n skip [github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32]: E2E test placeholder - requires real cluster\n"
 }
]%                                                                                                              

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 Mar 6, 2026

Walkthrough

Adds an OpenShift tests extension: new Go module and CLI that builds/registers test suites with platform filters, placeholder e2e specs, Makefile target to build the extension, and Dockerfiles updated to include a gzipped extension binary and updated image labels/tags.

Changes

Cohort / File(s) Summary
Docker Build Configuration
Dockerfile, Dockerfile.rhel
Builder stage now gzips bin/cluster-machine-approver-ext and the final image copies cluster-machine-approver-ext.gz into /usr/bin/. Updated io.k8s.display-name capitalization and adjusted io.openshift.tags to include openshift,tests,e2e,e2e-extension.
Build System
Makefile
all target now depends on a new tests-ext target. Added tests-ext to build the tests extension binary into bin/cluster-machine-approver-ext and declared it .PHONY.
Extension Module & CLI
openshift-tests-extension/go.mod, openshift-tests-extension/cmd/main.go
New Go module and CLI entrypoint that constructs an extension registry, generates test specs from OpenShift Ginkgo suites, applies Platform/NoPlatform → PlatformEquals label filters, registers suites, and exposes Cobra-based commands.
Extension E2E Tests
openshift-tests-extension/test/e2e/machine_approver.go
New Ginkgo e2e test file containing two placeholder specs (valid/invalid CSR) labeled Conformance and currently skipped.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Makefile
  participant Builder
  participant Image as Container Image
  participant CLI as openshift-tests-extension CLI
  participant Ginkgo as Ginkgo Spec Builder
  participant Registry as Extension Registry
  participant Runner as Test Runner

  Makefile->>Builder: go build openshift-tests-extension -> bin/cluster-machine-approver-ext
  Builder->>Builder: gzip bin/cluster-machine-approver-ext -> cluster-machine-approver-ext.gz
  Builder->>Image: COPY cluster-machine-approver-ext.gz -> /usr/bin/
  Runner->>CLI: invoke extension commands
  CLI->>Ginkgo: request generated specs
  Ginkgo->>CLI: return specs (with [platform:*]/[NoPlatform:*] labels)
  CLI->>Registry: apply PlatformEquals filters, register suites
  Registry->>Runner: expose suites/commands for execution
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding OpenShift Test Extension framework integration to the repository, which aligns with the primary objectives of creating test extension infrastructure and build artifacts.
Stable And Deterministic Test Names ✅ Passed Test names are stable and deterministic with static descriptive strings; dynamic skip message appropriately placed in test body, not title.
Test Structure And Quality ✅ Passed The test code uses appropriate Ginkgo patterns with Skip for placeholder e2e tests requiring a real cluster, following OpenShift testing conventions with proper metadata labeling.

✏️ 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
📝 Coding Plan
  • Generate coding plan for human review comments

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

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 6, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3044 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 this repo'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.

Local Tests:

zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext info                                   [14:47:56]
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-machine-approver"
   },
   "suites": [
       {
           "name": "machine-approver/conformance/parallel",
           "description": "",
           "parents": [
               "openshift/conformance/parallel"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/conformance/serial",
           "description": "",
           "parents": [
               "openshift/conformance/serial"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (name.contains(\"[Feature:MachineApprover]\"))"
           ]
       }
   ],
   "images": null
}
zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext list                                   [14:48:01]
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when a valid node CSR is created should approve the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:24",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:25"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 },
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:30",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:31"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 }
]

zhsun:cluster-machine-approver/ (ote) $ bin/cluster-machine-approver-ext  run-test -n "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver
 ===================================================================================
 Random Seed: 1772776531 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31
   [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 S [SKIPPED] [0.001 seconds]
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created [It] should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31

   [SKIPPED] E2E test placeholder - requires real cluster
   In [It] at: /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 ------------------------------

 Ran 0 of 1 Specs in 0.002 seconds
 SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "lifecycle": "blocking",
   "duration": 2,
   "startTime": "2026-03-06 05:55:31.346248 UTC",
   "endTime": "2026-03-06 05:55:31.349109 UTC",
   "result": "skipped",
   "output": "  [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348\n\n skip [github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32]: E2E test placeholder - requires real cluster\n"
 }
]%                                                                                                              

Summary by CodeRabbit

Release Notes

  • New Features

  • Added OpenShift tests extension module with machine approver test suite.

  • Tests

  • Added e2e test specifications for CSR approval scenarios.

  • Chores

  • Updated build process to compile and include extension binary.

  • Updated container image metadata labels and tags.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from chrischdi and mdbooth March 6, 2026 07:05
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 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 assign radekmanak for approval. 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

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

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

76-80: Simplify command execution.

The anonymous function wrapper around root.Execute() is unnecessary.

Proposed simplification
-	if err := func() error {
-		return root.Execute()
-	}(); err != nil {
+	if err := root.Execute(); err != nil {
 		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 76 - 80, The anonymous
wrapper around root.Execute() is unnecessary; replace the anonymous func
invocation with a direct call to root.Execute() and handle its error return
directly (i.e., if err := root.Execute(); err != nil { os.Exit(1) }). Update the
code that currently wraps root.Execute() in an inline func so it uses
root.Execute() directly and preserves the same error-path behavior.

53-65: Move regex compilation outside the loop.

The regex is compiled on every iteration of the outer loop, which is inefficient. Additionally, the pattern [a-z]* only matches lowercase letters.

Proposed optimization
+	// Pre-compile regex for platform label extraction
+	platformRe := regexp.MustCompile(`\[platform:([a-zA-Z0-9]+)]`)
+
 	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]
🤖 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 53 - 65, Move regex
compilation out of the loop and broaden the character class to include uppercase
letters; create the regexp once (e.g., re :=
regexp.MustCompile(`[platform:[A-Za-z]+]`) or similar) before iterating over
specs.Select(...).Names(), then use that compiled re inside the loop to find
matches for platformDef, and keep the existing logic that extracts the platform
via strings.Index and updates foundPlatforms and the
specs.Select(...).Include(...) calls.

56-63: Platform extraction logic can be simplified using capture groups.

The current approach manually extracts the platform name using strings.Index. Since you're already using regex, a capture group would be cleaner and less error-prone.

Proposed simplification using capture groups
-	for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
-		re := regexp.MustCompile(`\[platform:[a-z]*]`)
-
-		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))
-			}
-		}
-	}
+	platformRe := regexp.MustCompile(`\[platform:([a-zA-Z0-9]+)]`)
+	for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
+		matches := platformRe.FindAllStringSubmatch(test, -1)
+		for _, match := range matches {
+			if len(match) < 2 {
+				continue
+			}
+			platformDef, platform := match[0], match[1]
+			if _, ok := foundPlatforms[platformDef]; !ok {
+				foundPlatforms[platformDef] = platform
+				specs.Select(extensiontests.NameContains(platformDef)).
+					Include(extensiontests.PlatformEquals(platform))
+			}
+		}
+	}
🤖 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 56 - 63, The platform
extraction manually slices platformDef after using re.FindStringSubmatch; change
the regex to include a capture group for the platform and use the captured value
(e.g., match[1]) instead of computing substrings via strings.Index and slicing,
update the loop over match/match[i] to read the capture into a variable
(platform) and keep the existing deduping in foundPlatforms and the
specs.Select(...).Include(...) calls (references: re.FindStringSubmatch, match,
platformDef, foundPlatforms, specs.Select, extensiontests.NameContains,
extensiontests.PlatformEquals).
Makefile (1)

69-71: Ensure bin/ directory exists before building.

The go build command will fail if the bin/ directory doesn't exist. Consider adding directory creation:

Proposed fix
 tests-ext: ## Build OpenShift Tests Extension binary
-	cd openshift-tests-extension && go build -mod=vendor -o ../bin/cluster-machine-approver-ext ./cmd
+	mkdir -p bin
+	cd openshift-tests-extension && go build -mod=vendor -o ../bin/cluster-machine-approver-ext ./cmd
 .PHONY: tests-ext
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 69 - 71, The tests-ext Makefile target runs go build
outputting to ../bin/cluster-machine-approver-ext but doesn't ensure ../bin
exists; update the tests-ext target (label: tests-ext) to create the bin
directory before running go build (e.g., mkdir -p ../bin) so the go build -o
../bin/cluster-machine-approver-ext ./cmd succeeds even when bin/ is missing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Dockerfile`:
- Around line 1-4: The Dockerfile's base image uses "golang-1.22" which is
inconsistent with Dockerfile.rhel ("golang-1.24") and the module requirement in
openshift-tests-extension/go.mod ("go 1.25.0"); update the FROM line in this
Dockerfile to use a Go image matching the minimum required by go.mod (e.g.,
change "golang-1.22" to a matching "golang-1.25" or later tag) and ensure
Dockerfile.rhel is updated to the same Go version so all build images
(referencing the FROM line) align with the go.mod requirement.

In `@openshift-tests-extension/go.mod`:
- Line 3: go.mod declares Go 1.25.0 but the build images in the Dockerfiles are
older; update the two builder image references in Dockerfile and Dockerfile.rhel
to use a Go 1.25-compatible image (replace golang-1.22 and golang-1.24-openshift
tags with an official or OpenShift-compatible Go 1.25 tag) so the builder
runtime matches go.mod, or alternatively change the go directive in go.mod back
to the older version if you cannot update the images.

---

Nitpick comments:
In `@Makefile`:
- Around line 69-71: The tests-ext Makefile target runs go build outputting to
../bin/cluster-machine-approver-ext but doesn't ensure ../bin exists; update the
tests-ext target (label: tests-ext) to create the bin directory before running
go build (e.g., mkdir -p ../bin) so the go build -o
../bin/cluster-machine-approver-ext ./cmd succeeds even when bin/ is missing.

In `@openshift-tests-extension/cmd/main.go`:
- Around line 76-80: The anonymous wrapper around root.Execute() is unnecessary;
replace the anonymous func invocation with a direct call to root.Execute() and
handle its error return directly (i.e., if err := root.Execute(); err != nil {
os.Exit(1) }). Update the code that currently wraps root.Execute() in an inline
func so it uses root.Execute() directly and preserves the same error-path
behavior.
- Around line 53-65: Move regex compilation out of the loop and broaden the
character class to include uppercase letters; create the regexp once (e.g., re
:= regexp.MustCompile(`[platform:[A-Za-z]+]`) or similar) before iterating over
specs.Select(...).Names(), then use that compiled re inside the loop to find
matches for platformDef, and keep the existing logic that extracts the platform
via strings.Index and updates foundPlatforms and the
specs.Select(...).Include(...) calls.
- Around line 56-63: The platform extraction manually slices platformDef after
using re.FindStringSubmatch; change the regex to include a capture group for the
platform and use the captured value (e.g., match[1]) instead of computing
substrings via strings.Index and slicing, update the loop over match/match[i] to
read the capture into a variable (platform) and keep the existing deduping in
foundPlatforms and the specs.Select(...).Include(...) calls (references:
re.FindStringSubmatch, match, platformDef, foundPlatforms, specs.Select,
extensiontests.NameContains, extensiontests.PlatformEquals).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 435d1da8-4e48-4f0f-920f-39abe2980bdd

📥 Commits

Reviewing files that changed from the base of the PR and between 8b92e37 and f13829b.

⛔ Files ignored due to path filters (294)
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/vendor/cel.dev/expr/.bazelversion is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/.gitattributes is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/.gitignore is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/CODE_OF_CONDUCT.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/CONTRIBUTING.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/GOVERNANCE.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/LICENSE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/MAINTAINERS.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/MODULE.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/README.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/WORKSPACE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/WORKSPACE.bzlmod is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/checked.pb.go is excluded by !**/*.pb.go, !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/cloudbuild.yaml is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/eval.pb.go is excluded by !**/*.pb.go, !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/explain.pb.go is excluded by !**/*.pb.go, !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/regen_go_proto.sh is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/regen_go_proto_canonical_protos.sh is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/syntax.pb.go is excluded by !**/*.pb.go, !**/vendor/**
  • openshift-tests-extension/vendor/cel.dev/expr/value.pb.go is excluded by !**/*.pb.go, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/.gitignore is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/LICENSE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/README.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/antlrdoc.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn_config.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn_config_set.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn_deserialization_options.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn_deserializer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn_simulator.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn_state.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/atn_type.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/char_stream.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/common_token_factory.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/common_token_stream.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/comparators.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/configuration.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/dfa.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/dfa_serializer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/dfa_state.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/diagnostic_error_listener.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/error_listener.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/error_strategy.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/errors.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/file_stream.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/input_stream.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/int_stream.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/interval_set.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/jcollect.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/lexer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/lexer_action.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/lexer_action_executor.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/lexer_atn_simulator.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/ll1_analyzer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/nostatistics.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/parser.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/parser_atn_simulator.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/parser_rule_context.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/prediction_context.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/prediction_context_cache.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/prediction_mode.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/recognizer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/rule_context.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/semantic_context.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/statistics.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/stats_data.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/token.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/token_source.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/token_stream.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/tokenstream_rewriter.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/trace_listener.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/transition.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/tree.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/trees.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/antlr4-go/antlr/v4/utils.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/.golangci.yaml is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/CHANGELOG.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/CONTRIBUTING.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/LICENSE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/README.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/SECURITY.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/context.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/context_noslog.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/context_slog.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/discard.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/funcr/funcr.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/funcr/slogsink.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/logr.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/sloghandler.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/slogr.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-logr/logr/slogsink.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/.editorconfig is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/.gitattributes is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/.gitignore is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/CHANGELOG.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/LICENSE.txt is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/README.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/Taskfile.yml is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/crypto.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/date.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/defaults.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/dict.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/doc.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/functions.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/list.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/network.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/numeric.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/reflect.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/regex.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/strings.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/go-task/slim-sprig/v3/url.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/LICENSE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/cel.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/decls.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/env.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/folding.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/inlining.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/io.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/library.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/macro.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/optimizer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/options.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/program.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/prompt.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/templates/authoring.tmpl is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/cel/validator.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/checker.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/cost.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/decls/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/decls/decls.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/env.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/errors.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/format.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/mapping.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/options.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/printer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/scopes.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/checker/types.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/ast/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/ast/ast.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/ast/conversion.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/ast/expr.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/ast/factory.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/ast/navigable.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/containers/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/containers/container.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/cost.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/debug/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/debug/debug.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/decls/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/decls/decls.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/doc.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/env/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/env/env.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/error.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/errors.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/functions/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/functions/functions.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/location.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/operators/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/operators/operators.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/overloads/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/overloads/overloads.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/runes/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/runes/buffer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/source.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/stdlib/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/stdlib/standard.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/any_value.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/bool.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/bytes.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/compare.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/doc.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/double.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/duration.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/err.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/format.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/int.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/iterator.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/json_value.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/list.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/map.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/null.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/object.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/optional.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/overflow.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/pb/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/pb/checked.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/pb/enum.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/pb/equal.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/pb/file.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/pb/pb.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/pb/type.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/provider.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/ref/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/ref/provider.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/ref/reference.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/string.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/timestamp.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/comparer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/container.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/field_tester.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/indexer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/iterator.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/lister.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/mapper.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/matcher.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/math.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/receiver.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/sizer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/traits.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/traits/zeroer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/types.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/uint.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/unknown.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/common/types/util.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/activation.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/attribute_patterns.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/attributes.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/decorators.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/dispatcher.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/evalstate.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/interpretable.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/interpreter.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/optimizations.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/planner.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/prune.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/interpreter/runtimecost.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/BUILD.bazel is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/errors.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/BUILD.bazel is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/CEL.g4 is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/CEL.interp is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/CEL.tokens is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/CELLexer.interp is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/CELLexer.tokens is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/cel_base_listener.go is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/cel_base_visitor.go is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/cel_lexer.go is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/cel_listener.go is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/cel_parser.go is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/cel_visitor.go is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/doc.go is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/gen/generate.sh is excluded by !**/gen/**, !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/helper.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/input.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/macro.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/options.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/parser.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/unescape.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/cel-go/parser/unparser.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/LICENSE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/compare.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/export.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/function/func.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/value/name.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/value/pointer.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/options.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/path.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/report.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/report_compare.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/report_references.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/report_reflect.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/report_slices.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/report_text.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/go-cmp/cmp/report_value.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/AUTHORS is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/CONTRIBUTORS is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/LICENSE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/encode.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/filter.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/index.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/legacy_java_profile.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/legacy_profile.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/merge.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/profile.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/proto.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/google/pprof/profile/prune.go is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/inconshreveable/mousetrap/LICENSE is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/inconshreveable/mousetrap/README.md is excluded by !**/vendor/**
  • openshift-tests-extension/vendor/github.com/inconshreveable/mousetrap/trap_others.go is excluded by !**/vendor/**
📒 Files selected for processing (6)
  • Dockerfile
  • Dockerfile.rhel
  • Makefile
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
  • openshift-tests-extension/test/e2e/machine_approver.go

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 6, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3044 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 this repo'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.

Local Tests:

zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext info                                   [14:47:56]
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-machine-approver"
   },
   "suites": [
       {
           "name": "machine-approver/conformance/parallel",
           "description": "",
           "parents": [
               "openshift/conformance/parallel"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/conformance/serial",
           "description": "",
           "parents": [
               "openshift/conformance/serial"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (name.contains(\"[Feature:MachineApprover]\"))"
           ]
       }
   ],
   "images": null
}
zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext list                                   [14:48:01]
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when a valid node CSR is created should approve the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:24",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:25"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 },
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:30",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:31"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 }
]

zhsun:cluster-machine-approver/ (ote) $ bin/cluster-machine-approver-ext  run-test -n "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver
 ===================================================================================
 Random Seed: 1772776531 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31
   [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 S [SKIPPED] [0.001 seconds]
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created [It] should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31

   [SKIPPED] E2E test placeholder - requires real cluster
   In [It] at: /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 ------------------------------

 Ran 0 of 1 Specs in 0.002 seconds
 SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "lifecycle": "blocking",
   "duration": 2,
   "startTime": "2026-03-06 05:55:31.346248 UTC",
   "endTime": "2026-03-06 05:55:31.349109 UTC",
   "result": "skipped",
   "output": "  [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348\n\n skip [github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32]: E2E test placeholder - requires real cluster\n"
 }
]%                                                                                                              

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension that registers a machine-approver test suite.

  • Tests

  • Added e2e test specs for CSR approval scenarios (placeholders/skipped).

  • Chores

  • Build updated to produce and include the tests extension binary in images.

  • Container image metadata and tags updated for clarity and testing/e2e use.

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 (2)
openshift-tests-extension/cmd/main.go (1)

45-48: Replace panic with controlled CLI error handling.

In CLI entrypoints, prefer fmt.Fprintf(os.Stderr, ...) and os.Exit(1) over panic. Additionally, the current format uses %+v but then calls .Error(), which strips error type information. Use %v to preserve error context:

♻️ Suggested error-path adjustment
  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 45 - 48, Replace the
panic in the CLI entrypoint that follows
g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() with controlled error
handling: capture the error and write a user-friendly message to stderr using
fmt.Fprintf(os.Stderr, "couldn't build extension test specs from ginkgo: %v\n",
err) (use %v and pass err directly, do not call .Error() or use %+v), then call
os.Exit(1) to terminate with a non-zero status; update the block containing
g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() accordingly.
openshift-tests-extension/test/e2e/machine_approver.go (1)

25-33: Remove [Conformance] labels from placeholder test specs.

These specs are unconditionally skipped and have no test bodies, so the conformance label misrepresents their readiness status.

♻️ Suggested change
-        It("should approve the CSR [Conformance]", func() {
+        It("should approve the CSR", func() {
             Skip("E2E test placeholder - requires real cluster")
         })

-        It("should reject the CSR [Conformance]", func() {
+        It("should reject the CSR", func() {
             Skip("E2E test placeholder - requires real cluster")
         })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openshift-tests-extension/test/e2e/machine_approver.go` around lines 25 - 33,
Remove the misleading "[Conformance]" tag from the two placeholder It specs so
they no longer claim conformance: update the It descriptions "should approve the
CSR [Conformance]" and "should reject the CSR [Conformance]" to remove the
bracketed label (e.g., "should approve the CSR" and "should reject the CSR")
while leaving the Skip(...) placeholders and surrounding Context block
unchanged.
🤖 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 53-64: The loop that extracts platform labels uses
regexp.MustCompile(`\[platform:[a-z]*]`) and re.FindStringSubmatch(test), which
only returns the first match; change the regex to `\[platform:[a-z0-9-]+\]` and
use re.FindAllString(test, -1) to get all labels, then iterate over each
platformDef string, extract the platform name (same slice logic using
strings.Index and len) and update foundPlatforms and the
specs.Select(...).Include(...) calls (referencing specs.Select,
extensiontests.NameContains, foundPlatforms, platformDef, and
extensiontests.PlatformEquals) so tests with multiple `[platform:*]` labels are
all processed.

---

Nitpick comments:
In `@openshift-tests-extension/cmd/main.go`:
- Around line 45-48: Replace the panic in the CLI entrypoint that follows
g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() with controlled error
handling: capture the error and write a user-friendly message to stderr using
fmt.Fprintf(os.Stderr, "couldn't build extension test specs from ginkgo: %v\n",
err) (use %v and pass err directly, do not call .Error() or use %+v), then call
os.Exit(1) to terminate with a non-zero status; update the block containing
g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() accordingly.

In `@openshift-tests-extension/test/e2e/machine_approver.go`:
- Around line 25-33: Remove the misleading "[Conformance]" tag from the two
placeholder It specs so they no longer claim conformance: update the It
descriptions "should approve the CSR [Conformance]" and "should reject the CSR
[Conformance]" to remove the bracketed label (e.g., "should approve the CSR" and
"should reject the CSR") while leaving the Skip(...) placeholders and
surrounding Context block unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c1c1c73b-8aa6-4db6-894d-5fc832f19698

📥 Commits

Reviewing files that changed from the base of the PR and between f13829b and f4a795b.

⛔ Files ignored due to path filters (1)
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • Dockerfile
  • Dockerfile.rhel
  • Makefile
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
  • openshift-tests-extension/test/e2e/machine_approver.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • Makefile
  • Dockerfile.rhel
  • Dockerfile

Comment on lines +53 to +64
for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
re := regexp.MustCompile(`\[platform:[a-z]*]`)

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

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "main.go" -path "*/openshift-tests-extension/cmd/*" -type f

Repository: openshift/cluster-machine-approver

Length of output: 117


🏁 Script executed:

head -100 openshift-tests-extension/cmd/main.go | cat -n

Repository: openshift/cluster-machine-approver

Length of output: 3151


🏁 Script executed:

sed -n '40,75p' openshift-tests-extension/cmd/main.go | cat -n

Repository: openshift/cluster-machine-approver

Length of output: 1560


🏁 Script executed:

# Search for test files to understand platform label usage
find openshift-tests-extension -name "*.go" -type f | grep test | head -20

Repository: openshift/cluster-machine-approver

Length of output: 1504


🏁 Script executed:

# Look for tests that might have multiple [platform:*] labels
rg '\[platform:[^\]]+\].*\[platform:[^\]]+\]' openshift-tests-extension --type=go

Repository: openshift/cluster-machine-approver

Length of output: 60


🏁 Script executed:

# Look for platform labels with numbers, uppercase, or hyphens
rg '\[platform:[^\]]*[0-9A-Z_-][^\]]*\]' openshift-tests-extension --type=go

Repository: openshift/cluster-machine-approver

Length of output: 164


🏁 Script executed:

# Let's examine the test file to see what platform labels are actually used
cat openshift-tests-extension/test/e2e/machine_approver.go | head -200

Repository: openshift/cluster-machine-approver

Length of output: 1119


🏁 Script executed:

# Search more broadly for all [platform:*] occurrences in the repo
rg '\[platform:[^\]]*\]' openshift-tests-extension --type=go -v vendor

Repository: openshift/cluster-machine-approver

Length of output: 50394


🏁 Script executed:

# Search for actual test names/strings that might contain platform labels
rg -i 'platform' openshift-tests-extension --type=go -v vendor | grep -v "\.pb\.go"

Repository: openshift/cluster-machine-approver

Length of output: 50455


🏁 Script executed:

# Let's check if there are any test specifications or configs that define platform labels
find openshift-tests-extension -name "*.go" -type f ! -path "*/vendor/*" | xargs grep -l platform 2>/dev/null

Repository: openshift/cluster-machine-approver

Length of output: 115


🏁 Script executed:

# Let's understand the actual behavior of FindStringSubmatch vs FindAllString in Go
# by creating a test to show the difference
python3 << 'EOF'
# Simulate Go's regex behavior
import re

# Test case: a string with multiple platform labels
test_name = "some-test-name-[platform:aws][platform:gcp]"
pattern = r'\[platform:[a-z]*\]'

# FindStringSubmatch equivalent (returns first match only in the array)
match_submatch = re.search(pattern, test_name)
if match_submatch:
    print("FindStringSubmatch behavior:")
    print(f"  Match: {match_submatch.group(0)}")
    print(f"  Iteration would yield: [{match_submatch.group(0)}]")
    print()

# FindAllString equivalent (returns all matches)
matches_all = re.findall(pattern, test_name)
print("FindAllString behavior:")
print(f"  Matches: {matches_all}")
print(f"  Would iterate over: {len(matches_all)} items")
EOF

Repository: openshift/cluster-machine-approver

Length of output: 275


Use FindAllString to handle tests with multiple [platform:*] labels.

Line 56 uses FindStringSubmatch, which returns only the first match. This means any test with multiple platform labels (e.g., test-name [platform:aws][platform:gcp]) will only process the first label and skip the rest. Use FindAllString instead to capture all platform labels in a single test name.

Also consider updating the regex pattern from [a-z]* to [a-z0-9-]+ to support platform names with numbers and hyphens.

Suggested fix
-    for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
-        re := regexp.MustCompile(`\[platform:[a-z]*]`)
-
-        match := re.FindStringSubmatch(test)
-        for _, platformDef := range match {
+    re := regexp.MustCompile(`\[platform:[a-z0-9-]+]`)
+    for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
+        matches := re.FindAllString(test, -1)
+        for _, platformDef := range matches {
             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))
             }
         }
     }
📝 Committable suggestion

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

Suggested change
for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
re := regexp.MustCompile(`\[platform:[a-z]*]`)
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))
}
}
re := regexp.MustCompile(`\[platform:[a-z0-9-]+]`)
for _, test := range specs.Select(extensiontests.NameContains("[platform:")).Names() {
matches := re.FindAllString(test, -1)
for _, platformDef := range matches {
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))
}
}
}
🤖 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 53 - 64, The loop that
extracts platform labels uses regexp.MustCompile(`\[platform:[a-z]*]`) and
re.FindStringSubmatch(test), which only returns the first match; change the
regex to `\[platform:[a-z0-9-]+\]` and use re.FindAllString(test, -1) to get all
labels, then iterate over each platformDef string, extract the platform name
(same slice logic using strings.Index and len) and update foundPlatforms and the
specs.Select(...).Include(...) calls (referencing specs.Select,
extensiontests.NameContains, foundPlatforms, platformDef, and
extensiontests.PlatformEquals) so tests with multiple `[platform:*]` labels are
all processed.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 9, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3044 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 this repo'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.

Local Tests:

zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext info                                   [14:47:56]
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-machine-approver"
   },
   "suites": [
       {
           "name": "machine-approver/conformance/parallel",
           "description": "",
           "parents": [
               "openshift/conformance/parallel"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/conformance/serial",
           "description": "",
           "parents": [
               "openshift/conformance/serial"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (name.contains(\"[Feature:MachineApprover]\"))"
           ]
       }
   ],
   "images": null
}
zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext list                                   [14:48:01]
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when a valid node CSR is created should approve the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:24",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:25"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 },
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:30",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:31"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 }
]

zhsun:cluster-machine-approver/ (ote) $ bin/cluster-machine-approver-ext  run-test -n "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver
 ===================================================================================
 Random Seed: 1772776531 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31
   [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 S [SKIPPED] [0.001 seconds]
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created [It] should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31

   [SKIPPED] E2E test placeholder - requires real cluster
   In [It] at: /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 ------------------------------

 Ran 0 of 1 Specs in 0.002 seconds
 SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "lifecycle": "blocking",
   "duration": 2,
   "startTime": "2026-03-06 05:55:31.346248 UTC",
   "endTime": "2026-03-06 05:55:31.349109 UTC",
   "result": "skipped",
   "output": "  [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348\n\n skip [github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32]: E2E test placeholder - requires real cluster\n"
 }
]%                                                                                                              

Summary by CodeRabbit

  • New Features

  • Added an OpenShift tests extension that registers a machine-approver test suite.

  • Tests

  • Added e2e test specs for CSR approval scenarios (placeholders/skipped).

  • Chores

  • Build now produces and includes a compressed tests-extension binary; default build runs the tests-extension build.

  • Container image display name and tags updated for clarity and testing/e2e use.

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.

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

44-47: Handle spec-discovery failures as normal CLI errors.

Panicking here makes the binary exit with a Go stack trace when discovery fails, which is noisy for info, list, and run-test callers. Print the error once and exit non-zero instead. (go.dev)

♻️ Suggested change
 	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 44 - 47, Replace the
panic in the call to BuildExtensionTestSpecsFromOpenShiftGinkgoSuite with a
normal CLI error exit: when g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
returns an error, print a concise error message (including err.Error()) to
stderr (or use the existing logger) and call os.Exit(1) instead of panicking so
callers like info/list/run-test don't get a stack trace; update the block around
the specs, err := g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() line in
main (or the enclosing function) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@openshift-tests-extension/cmd/main.go`:
- Around line 44-47: Replace the panic in the call to
BuildExtensionTestSpecsFromOpenShiftGinkgoSuite with a normal CLI error exit:
when g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() returns an error, print
a concise error message (including err.Error()) to stderr (or use the existing
logger) and call os.Exit(1) instead of panicking so callers like
info/list/run-test don't get a stack trace; update the block around the specs,
err := g.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() line in main (or the
enclosing function) accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 42fd9917-512b-40e6-bebd-375ad1d24b55

📥 Commits

Reviewing files that changed from the base of the PR and between f4a795b and 4337a2b.

⛔ Files ignored due to path filters (1)
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • Dockerfile
  • Dockerfile.rhel
  • Makefile
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
  • openshift-tests-extension/test/e2e/machine_approver.go
✅ Files skipped from review due to trivial changes (1)
  • openshift-tests-extension/test/e2e/machine_approver.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • Makefile
  • Dockerfile
  • openshift-tests-extension/go.mod

@openshift-ci-robot
Copy link
Contributor

@sunzhaohua2: An error was encountered searching for bug OCPCLOUD-3044 on the Jira server at https://issues.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. request failed. Please analyze the request body for more details. Status code: 403:

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

Details

In response to this:

Introduces the OpenShift test extension (OTE) binary to this project, it will integrate this repo'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.

Local Tests:

zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext info                                   [14:47:56]
{
   "apiVersion": "v1.1",
   "source": {
       "commit": "",
       "build_date": "",
       "git_tree_state": ""
   },
   "component": {
       "product": "openshift",
       "type": "payload",
       "name": "cluster-machine-approver"
   },
   "suites": [
       {
           "name": "machine-approver/conformance/parallel",
           "description": "",
           "parents": [
               "openshift/conformance/parallel"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/conformance/serial",
           "description": "",
           "parents": [
               "openshift/conformance/serial"
           ],
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (labels.exists(l, l == \"Serial\") \u0026\u0026 labels.exists(l, l == \"Conformance\"))"
           ]
       },
       {
           "name": "machine-approver/e2e",
           "description": "",
           "qualifiers": [
               "(source == \"openshift:payload:cluster-machine-approver\") \u0026\u0026 (name.contains(\"[Feature:MachineApprover]\"))"
           ]
       }
   ],
   "images": null
}
zhsun:cluster-machine-approver/ (ote✗) $ bin/cluster-machine-approver-ext list                                   [14:48:01]
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when a valid node CSR is created should approve the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:24",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:25"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 },
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "labels": {},
   "resources": {
     "isolation": {}
   },
   "source": "openshift:payload:cluster-machine-approver",
   "codeLocations": [
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:23",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:30",
     "/Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/openshift-tests-extension/test/e2e/machine_approver.go:31"
   ],
   "lifecycle": "blocking",
   "environmentSelector": {}
 }
]

zhsun:cluster-machine-approver/ (ote) $ bin/cluster-machine-approver-ext  run-test -n "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]"
 Running Suite:  - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver
 ===================================================================================
 Random Seed: 1772776531 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31
   [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 S [SKIPPED] [0.001 seconds]
 [Feature:MachineApprover] CSR Approval when an invalid CSR is created [It] should reject the CSR [Conformance]
 /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:31

   [SKIPPED] E2E test placeholder - requires real cluster
   In [It] at: /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348
 ------------------------------

 Ran 0 of 1 Specs in 0.002 seconds
 SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
[
 {
   "name": "[Feature:MachineApprover] CSR Approval when an invalid CSR is created should reject the CSR [Conformance]",
   "lifecycle": "blocking",
   "duration": 2,
   "startTime": "2026-03-06 05:55:31.346248 UTC",
   "endTime": "2026-03-06 05:55:31.349109 UTC",
   "result": "skipped",
   "output": "  [SKIPPED] in [It] - /Users/zhsun/go/src/github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32 @ 03/06/26 13:55:31.348\n\n skip [github.com/openshift/cluster-machine-approver/test/e2e/machine_approver.go:32]: E2E test placeholder - requires real cluster\n"
 }
]%                                                                                                              

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 16, 2026
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.

♻️ Duplicate comments (2)
Dockerfile (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Go version mismatch: base image uses golang-1.22, go.mod requires 1.24.

This inconsistency was previously flagged. Ensure the builder image meets the minimum Go version required by the module.

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

In `@Dockerfile` at line 1, The Dockerfile's builder base image currently uses
golang-1.22 (FROM registry.ci.openshift.org/openshift/release:golang-1.22 AS
builder) which conflicts with go.mod requiring Go 1.24; update the FROM image to
a Go 1.24 (or later) compatible tag—e.g., change the image tag to golang-1.24 or
a >=1.24 variant—so the build environment matches the module's go version.
openshift-tests-extension/go.mod (1)

3-3: ⚠️ Potential issue | 🟡 Minor

Go version mismatch with Dockerfile base image.

The module specifies go 1.24.0, but the Dockerfile uses golang-1.22. While Go is generally backward compatible, features or dependencies requiring Go 1.24 may fail at build time.

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

In `@openshift-tests-extension/go.mod` at line 3, The module's Go version
declaration (go.mod: "go 1.24.0") does not match the Dockerfile base image
("golang-1.22"); update either the go.mod to "go 1.22" or change the Dockerfile
base image to a Go 1.24 image (e.g., golang:1.24) so both specify the same Go
version, then rebuild to verify compatibility; reference the go.mod "go 1.24.0"
line and the Dockerfile base image string "golang-1.22" when making the change.
🧹 Nitpick comments (1)
openshift-tests-extension/cmd/main.go (1)

61-65: Minor: Unnecessary IIFE wrapper around root.Execute().

The immediately-invoked function expression adds no value here.

Simplified version
-	if err := func() error {
-		return root.Execute()
-	}(); err != nil {
+	if err := root.Execute(); err != nil {
 		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 61 - 65, The code wraps
root.Execute() in an unnecessary immediately-invoked function expression;
replace the IIFE with a direct call to root.Execute(), e.g., capture its
returned error into err (err := root.Execute() or if err := root.Execute(); err
!= nil) and call os.Exit(1) on error; update the block that currently references
the IIFE to use a direct invocation of root.Execute() instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@Dockerfile`:
- Line 1: The Dockerfile's builder base image currently uses golang-1.22 (FROM
registry.ci.openshift.org/openshift/release:golang-1.22 AS builder) which
conflicts with go.mod requiring Go 1.24; update the FROM image to a Go 1.24 (or
later) compatible tag—e.g., change the image tag to golang-1.24 or a >=1.24
variant—so the build environment matches the module's go version.

In `@openshift-tests-extension/go.mod`:
- Line 3: The module's Go version declaration (go.mod: "go 1.24.0") does not
match the Dockerfile base image ("golang-1.22"); update either the go.mod to "go
1.22" or change the Dockerfile base image to a Go 1.24 image (e.g., golang:1.24)
so both specify the same Go version, then rebuild to verify compatibility;
reference the go.mod "go 1.24.0" line and the Dockerfile base image string
"golang-1.22" when making the change.

---

Nitpick comments:
In `@openshift-tests-extension/cmd/main.go`:
- Around line 61-65: The code wraps root.Execute() in an unnecessary
immediately-invoked function expression; replace the IIFE with a direct call to
root.Execute(), e.g., capture its returned error into err (err := root.Execute()
or if err := root.Execute(); err != nil) and call os.Exit(1) on error; update
the block that currently references the IIFE to use a direct invocation of
root.Execute() instead.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c93df595-8e85-4b8c-a5e2-0ed9625cb812

📥 Commits

Reviewing files that changed from the base of the PR and between 4337a2b and 8e9b047.

⛔ Files ignored due to path filters (1)
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • Dockerfile
  • Dockerfile.rhel
  • Makefile
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
  • openshift-tests-extension/test/e2e/machine_approver.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • Makefile
  • Dockerfile.rhel

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 16, 2026

@sunzhaohua2: This PR was included in a payload test run from openshift/origin#30884
trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-serial-1of2

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/cf468f20-20ea-11f1-985c-856aadf54291-0

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 16, 2026

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

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-capi-techpreview 8e9b047 link true /test e2e-aws-capi-techpreview
ci/prow/e2e-hypershift-aws 8e9b047 link true /test e2e-hypershift-aws

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.

@sunzhaohua2
Copy link
Author

Tested in pr openshift/origin#30884 (comment)

From job log we can see level=info msg="Listed 2 tests in 12.835287ms" binary=cluster-machine-approver-ext OTE found the tests

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants