Skip to content

OCPCLOUD-3009: Bootstrap OTE framework#597

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pmeida:ote-bootstrap
Jun 22, 2026
Merged

OCPCLOUD-3009: Bootstrap OTE framework#597
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pmeida:ote-bootstrap

Conversation

@pmeida

@pmeida pmeida commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduces the OpenShift Tests Extension (OTE) binary scaffold registering the component as openshift:payload:cluster-capi-operator
  • Adds openshift-tests-extension/ as a separate Go module to keep OTE dependencies (ginkgo fork, test framework) isolated from the main module's dependency graph, following the cluster-control-plane-machine-set-operator convention
  • 3 test suites configured with Parallelism and ClusterStability execution parameters and wired to the standard conformance hierarchy via Parents
  • Embeds the gzipped binary in the operator image at /usr/bin/cluster-capi-operator-tests-ext.gz
  • Wires up ginkgo integration so that any future test written as a regular .go file (not _test.go) is automatically discovered by openshift-tests with no changes to the extension
  • e2e/machine_migration_vap_tests.goe2e/machine_migration_vap_test.go - corrects an accidental naming error that would have caused those tests to be picked up by OTE unintentionally

Similar approaches:

Test Suites

Suite Qualifier Parent Parallelism Timeout
capio/parallel not Serial, not Disruptive openshift/conformance/parallel - 30m
capio/serial Serial, not Disruptive openshift/conformance/serial 1 30m
capio/disruptive Disruptive openshift/disruptive-longrunning 1 90m

The Parents field is what causes tests to be automatically included in the nightly conformance runs and feed Sippy for promotion gate evaluation.

Test plan

  • make bin/cluster-capi-operator-tests-ext builds successfully
  • bin/cluster-capi-operator-tests-ext info returns correct component metadata (openshift:payload:cluster-capi-operator)
  • bin/cluster-capi-operator-tests-ext list tests returns empty (zero tests registered, as intended)
  • All existing unit tests pass (make unit)
  • make vendor runs cleanly
  • check if e2e presubmit test are not affected by the change
  • use /payload-job-with-prs to check if the binary is detected (and with 0 tests)
  • test if a test without _test.go runs with make e2e

Local outputs

# for up to date results the binary has to be rebuild every time you change tests
make bin/cluster-capi-operator-tests-ext
...
bin/cluster-capi-operator-tests-ext info
{
    "apiVersion": "v1.1",
    "source": {
        "commit": "",
        "build_date": "",
        "git_tree_state": ""
    },
    "component": {
        "product": "openshift",
        "type": "payload",
        "name": "cluster-capi-operator"
    },
    "suites": [
        {
            "name": "capio/parallel",
            "description": "",
            "parents": [
                "openshift/conformance/parallel"
            ],
            "qualifiers": [
                "(source == \"openshift:payload:cluster-capi-operator\") \u0026\u0026 (!labels.exists(l, l == \"Serial\") \u0026\u0026 !labels.exists(l, l == \"Disruptive\"))"
            ]
        },
...

No tests are yet configured with OTE (that is for future tasks)

bin/cluster-capi-operator-tests-ext list tests
null

Validation with PR #599 tests (renaming crd_compatibility_test.gocrd_compatibility.go):

bin/cluster-capi-operator-tests-ext list tests | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'{len(d)} tests discovered')"
10 tests discovered

Next steps

  • OCPCLOUD-3542: Implement actual e2e tests using the et.ExtensionTestSpec API

blocks openshift/origin#31307

Summary by CodeRabbit

  • New Features

    • Introduced OpenShift Tests Extension (OTE) for extended e2e test integration and execution
  • Documentation

    • Added comprehensive guide for OTE setup, test discovery, configuration requirements, and integration with nightly test runs and feature gates

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

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

This repository is configured in: LGTM mode

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

openshift-ci-robot commented Jun 16, 2026

Copy link
Copy Markdown

@pmeida: This pull request references OCPCLOUD-3009 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 "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Introduces the OpenShift Tests Extension (OTE) binary scaffold registering the component as openshift:payload:cluster-capi-operator
  • Adds openshift-tests-extension/ as a separate Go module with 6 test suites pre-configured for the full test tier strategy
  • Embeds the gzipped binary in the operator image at /usr/bin/cluster-capi-operator-tests-ext.gz

Test Suites

Suite Qualifier Parent Purpose
capio/parallel not Serial, not Disruptive openshift/conformance/parallel Auto-included in nightly conformance parallel run
capio/serial Serial, not Disruptive openshift/conformance/serial Auto-included in nightly conformance serial run
capio/disruptive Disruptive openshift/disruptive-longrunning Disruptive tests
capio/presubmit Label("PreSubmit") - Explicitly targeted in presubmit jobs
capio/periodic Label("Periodic") - Explicitly targeted in nightly/periodic jobs
capio/e2e all capio tests - Catch-all for on-demand runs

Test plan

  • make bin/cluster-capi-operator-tests-ext builds successfully
  • cluster-capi-operator-tests-ext info returns correct component metadata (openshift:payload:cluster-capi-operator)
  • cluster-capi-operator-tests-ext list tests returns empty (zero tests registered, as intended)
  • All existing unit tests pass (make unit)
  • make vendor runs cleanly

Next steps

  • OCPCLOUD-3010: Implement actual e2e tests using the et.ExtensionTestSpec API
  • OCPCLOUD-3542: Register the binary in openshift/origin for test discovery

Generated with Claude Code

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 nrb and racheljpg June 16, 2026 07:56
@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 16, 2026
@openshift-ci

openshift-ci Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Hi @pmeida. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Note

Reviews paused

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

Use the following commands to manage reviews:

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

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Introduces a new openshift-tests-extension Go sub-module with a binary entrypoint that registers three CAPI e2e test suites and exposes them via a Cobra CLI. The Makefile and hack/vendor.sh are updated to build and vendor the new module. The Dockerfile.rhel compresses the test binary and updates image labels. AGENTS.md gains a section documenting OTE conventions.

Changes

OpenShift Tests Extension Integration

Layer / File(s) Summary
OTE module definition and binary entrypoint
openshift-tests-extension/go.mod, openshift-tests-extension/cmd/main.go
New github.com/openshift/cluster-capi-operator/openshift-tests-extension Go module with direct/indirect dependencies and replace directives (local ../e2e, pinned ginkgo). main() creates an extension registry, registers three test suites (capio/parallel, capio/serial, capio/disruptive), derives specs from a Ginkgo suite, wires a BeforeAll hook calling e2e.InitCommonVariables(), attaches Cobra commands, and exits non-zero on error.
Build and vendor wiring
Makefile, hack/vendor.sh, Dockerfile.rhel
Makefile adds bin/cluster-capi-operator-tests-ext to the build target prerequisites and defines an explicit compile rule from ./openshift-tests-extension/cmd/. hack/vendor.sh expands all three module-loop iterations to include openshift-tests-extension. Dockerfile.rhel gzips the binary in the builder stage and copies the .gz file into the runtime image; replaces the single operator label with a multiline LABEL block.
OTE contributor documentation
AGENTS.md
New "OpenShift Tests Extension (OTE)" section documents file-suffix test discovery, Ginkgo label-to-suite mapping, feature-gate nightly job inclusion conditions, and the required [OCPFeatureGate:FeatureName] tagging format.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as cobra root cmd
  participant Registry as extension registry
  participant Extension as openshift extension
  participant GinkgoSuite as Ginkgo suite
  participant e2e as e2e.InitCommonVariables

  CLI->>Registry: NewRegistry()
  Registry->>Extension: NewExtension("openshift", "cluster-capi-operator")
  Extension->>Extension: add suites (parallel, serial, disruptive)
  Extension->>GinkgoSuite: BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
  GinkgoSuite-->>Extension: test specs
  Extension->>e2e: AddBeforeAll → InitCommonVariables()
  Extension->>Registry: Register(extension)
  Registry->>CLI: AddExtensionCommands(root)
  CLI->>CLI: Execute() / os.Exit(1) on error
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 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 (14 passed)
Check name Status Explanation
Title check ✅ Passed The title 'OCPCLOUD-3009: Bootstrap OTE framework' accurately summarizes the main change—introducing the OpenShift Tests Extension framework—and is directly related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All Ginkgo test names in the PR use static, descriptive strings with no dynamic content (no pod/node names, timestamps, UUIDs, IP addresses, or variable concatenation). AGENTS.md documentation prop...
Test Structure And Quality ✅ Passed PR introduces OTE framework scaffold only; contains zero Ginkgo test implementations. Custom check on test structure is not applicable—tests are planned for future work per PR description.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. The changes are infrastructure-only (OTE framework scaffold, build configs, documentation). The file rename corrects an existing test filename; zero te...
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. It only introduces the OTE framework scaffold in main.go with empty test suites and build system changes. Future tests will be added in separate PRs.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds test framework code (OTE binary build, configuration, docs) with no deployment manifests, operator scheduling code, or topology-aware constraints introduced.
Ote Binary Stdout Contract ✅ Passed OTE binary properly respects stdout contract: Ginkgo output redirected to stderr via ginkgo.NewWriter(os.Stderr), no fmt.Print calls at process-level, and commands output proper JSON to stdout.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR adds no new Ginkgo e2e tests; it only introduces the OTE framework scaffold. No test definitions (It(), Describe(), Context(), When()) are added, so there are no IPv4 assumptions or externa...
No-Weak-Crypto ✅ Passed No weak cryptography patterns detected: PR introduces test framework code with no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB usage, no custom crypto implementations, and no non-constant-time secret c...
Container-Privileges ✅ Passed This PR introduces no container privilege escalation vectors. The Dockerfile.rhel changes only add binary gzipping, copying, and metadata labels. The new Go files are application code, not containe...
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data (passwords, tokens, API keys, PII, session IDs, hostnames) is logged in the PR. Only generic informational messages and error descriptions are logged.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
Dockerfile.rhel (1)

4-5: ⚡ Quick win

Use deterministic gzip output for the embedded extension binary.

gzip currently writes timestamp/name metadata, which can make rebuilds non-reproducible even when binary content is unchanged.

Suggested change
-RUN make clean build && \
-    gzip bin/cluster-capi-operator-tests-ext
+RUN make clean build && \
+    gzip -n bin/cluster-capi-operator-tests-ext

As per coding guidelines, “keep vendoring deterministic … to avoid drift across builds.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile.rhel` around lines 4 - 5, The gzip command that compresses
bin/cluster-capi-operator-tests-ext currently writes timestamp and filename
metadata to the output, causing non-deterministic builds even when the binary
content hasn't changed. Fix this by adding the `-n` flag to the gzip command,
which omits the original filename and modification timestamp from the gzip
header, ensuring consistent output across rebuilds.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openshift-tests-extension/go.mod`:
- Around line 5-22: The go.mod file contains four pseudo-versions that require
justification per supply-chain policy:
github.com/openshift-eng/openshift-tests-extension (direct dependency), and
golang.org/x/exp, google.golang.org/genproto/googleapis/api, and
google.golang.org/genproto/googleapis/rpc (indirect dependencies). Add comments
or documentation in the go.mod file or in a separate justification document
explaining why these pseudo-versions are necessary instead of using released
stable versions for each package, making clear the business or technical
rationale for pinning to unversioned commits rather than stable releases.

---

Nitpick comments:
In `@Dockerfile.rhel`:
- Around line 4-5: The gzip command that compresses
bin/cluster-capi-operator-tests-ext currently writes timestamp and filename
metadata to the output, causing non-deterministic builds even when the binary
content hasn't changed. Fix this by adding the `-n` flag to the gzip command,
which omits the original filename and modification timestamp from the gzip
header, ensuring consistent output across rebuilds.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 493293e5-1e97-4bd9-8f87-bac5e1445e27

📥 Commits

Reviewing files that changed from the base of the PR and between 05c113e and fa7138f.

⛔ Files ignored due to path filters (40)
  • go.work is excluded by !**/*.work
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift-eng/openshift-tests-extension/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmd.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdimages/cmdimages.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdinfo/info.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdlist/list.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdrun/runsuite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdrun/runtest.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/cmd/cmdupdate/update.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/dbtime/time.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extension.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/environment.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/result.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/result_writer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/spec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/task.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests/viewer.html is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/registry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/extension/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/component.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/concurrency.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/environment.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/names.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/output.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/flags/suite.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/junit/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/byte.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/empty.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int32.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/int64.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/set.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/util/sets/string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/version/version.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (5)
  • Dockerfile.rhel
  • Makefile
  • hack/vendor.sh
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod

Comment thread openshift-tests-extension/go.mod
@pmeida pmeida changed the title OCPCLOUD-3009: Bootstrap OTE framework in cluster-capi-operator OCPCLOUD-3009: Bootstrap OTE framework Jun 16, 2026
@pmeida

pmeida commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot

openshift-ci-robot commented Jun 16, 2026

Copy link
Copy Markdown

@pmeida: This pull request references OCPCLOUD-3009 which is a valid jira issue.

Details

In response to this:

/jira refresh

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.

@pmeida

pmeida commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

How to add a test to OTE

The extension uses ginkgo auto-discovery. Whether a test is visible to OTE depends entirely on the file suffix:

File make e2e OTE (list tests)
e2e/my_test.go
e2e/my.go
e2e/my.go + //go:build !e2e

To add a test to OTE: write it in a regular .go file (not _test.go). No changes to the extension are needed — it is picked up automatically on the next build.

To keep a test out of OTE: use the standard _test.go suffix. It still runs via make e2e.

This was validated locally using the tests from #599 — renaming crd_compatibility_test.gocrd_compatibility.go caused all 10 CRD Compatibility Checker tests to appear in list tests with no other changes.

@damdo

damdo commented Jun 16, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 16, 2026
Comment thread openshift-tests-extension/cmd/main.go Outdated
Comment on lines +36 to +67
ext.AddSuite(e.Suite{
Name: "capio/parallel",
Qualifiers: []string{`!labels.exists(l, l == "Serial") && !labels.exists(l, l == "Disruptive")`},
Parents: []string{"openshift/conformance/parallel"},
})

ext.AddSuite(e.Suite{
Name: "capio/serial",
Qualifiers: []string{`labels.exists(l, l == "Serial") && !labels.exists(l, l == "Disruptive")`},
Parents: []string{"openshift/conformance/serial"},
})

ext.AddSuite(e.Suite{
Name: "capio/disruptive",
Qualifiers: []string{`labels.exists(l, l == "Disruptive")`},
Parents: []string{"openshift/disruptive-longrunning"},
})

ext.AddSuite(e.Suite{
Name: "capio/presubmit",
Qualifiers: []string{`labels.exists(l, l == "PreSubmit")`},
})

ext.AddSuite(e.Suite{
Name: "capio/periodic",
Qualifiers: []string{`labels.exists(l, l == "Periodic")`},
})

ext.AddSuite(e.Suite{
Name: "capio/e2e",
Description: "All Cluster CAPI Operator tests",
})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's chat about these.
What does OTE enforce WRT to what suites we define?
Do we want to define all these?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OTE doesn't enforce any particular suite structure - suites are optional metadata. The two that actually matter for promotion are capio/parallel and capio/serial via their Parents field, which is how tests get included in the nightly conformance runs and feed Sippy for promotion gate evaluation.

The presubmit/periodic suites were added for future-use, but they are not used currently. Happy to drop them if you'd prefer to start minimal and add as needed. The idea behind those 2 was to do explicit label-based filtering, controlling which tests run in presubmit/periodics. For this to be possible we would have to change the jobs configuration to something like:

test:
- ref: openshift-e2e-test
  env:
  - name: TEST_SUITE
    value: capio/presubmit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On reflection, they're harder to use in presubmits than they appear - a job using openshift-e2e-test with TEST_SUITE: capio/presubmit would pull the binary from the ART/stable image, not the PR's freshly-built one, so new tests in a PR wouldn't be picked up. For presubmit validation of new tests make e2e from src remains the right approach.

Lets drop those.

@pmeida pmeida Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Kept only capio/parallel, capio/serial, and capio/disruptive — these are the only suites that map to suites actually run in nightly builds via their Parents field (openshift/conformance/parallel, openshift/conformance/serial, openshift/disruptive-longrunning).

If we want to increase testing frequency with an explicit periodic job in the future, we can reference the parent or the child suites individually in the job.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
cmd/cluster-capi-operator-tests-ext/main.go (1)

76-76: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use “Cluster API” in user-facing command text.

Line 76 uses “Cluster CAPI Operator …” in help output. Please switch to “Cluster API” for user-facing wording.

As per coding guidelines, for user-facing text like logs and errors, use “Cluster API” and “Machine API”.

Suggested fix
-		Long: "Cluster CAPI Operator tests extension for OpenShift",
+		Long: "Cluster API Operator tests extension for OpenShift",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/cluster-capi-operator-tests-ext/main.go` at line 76, The Long field in
the command definition contains "Cluster CAPI Operator" which does not follow
user-facing text conventions. Replace "Cluster CAPI Operator" with "Cluster API"
in the Long field to align with coding guidelines for user-facing command help
text. Ensure the updated message reads "Cluster API Operator tests extension for
OpenShift" or similar wording using the standardized "Cluster API" terminology.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cmd/cluster-capi-operator-tests-ext/main.go`:
- Line 76: The Long field in the command definition contains "Cluster CAPI
Operator" which does not follow user-facing text conventions. Replace "Cluster
CAPI Operator" with "Cluster API" in the Long field to align with coding
guidelines for user-facing command help text. Ensure the updated message reads
"Cluster API Operator tests extension for OpenShift" or similar wording using
the standardized "Cluster API" terminology.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: d957a173-32a9-496a-b165-58e26c424238

📥 Commits

Reviewing files that changed from the base of the PR and between 28f1385 and b7852d8.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (6)
  • Dockerfile.rhel
  • Makefile
  • cmd/cluster-capi-operator-tests-ext/dependencymagnet.go
  • cmd/cluster-capi-operator-tests-ext/main.go
  • go.mod
  • hack/vendor.sh
💤 Files with no reviewable changes (1)
  • Makefile
🚧 Files skipped from review as they are similar to previous changes (1)
  • Dockerfile.rhel

@pmeida

pmeida commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/test lint

@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-single-node-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/5ec85100-6a20-11f1-9161-4db964fb4ac7-0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openshift-tests-extension/go.mod`:
- Around line 11-15: Add the complete set of k8s.io replace directives to the
replace block in openshift-tests-extension/go.mod (currently containing only
ginkgo, testutils, and e2e replaces) to match the k8s.io versions pinned in the
root go.mod, ensuring deterministic version pinning in all build contexts and
preventing version drift. Additionally, fix the version mismatch in the root
go.mod at lines 47 and 87 where k8s.io/kubernetes is pinned to v1.35.3 in the
replace directive but required as v1.35.1 - update both replace occurrences to
v1.35.1 to align with the require version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 420363db-1ca6-4c12-ab25-659efa1f05ea

📥 Commits

Reviewing files that changed from the base of the PR and between b7852d8 and effa7e0.

⛔ Files ignored due to path filters (3)
  • go.work is excluded by !**/*.work
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (5)
  • AGENTS.md
  • Makefile
  • hack/vendor.sh
  • openshift-tests-extension/cmd/main.go
  • openshift-tests-extension/go.mod
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • Makefile

Comment thread openshift-tests-extension/go.mod
@pmeida

pmeida commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Local OTE flow walk-through

To answer the question about local invocation - here's the full flow:

Note: run-suite and run-test require a reachable OCP cluster because InitCommonVariables() fetches the Infrastructure object. list tests and list suites work without one.


Added a demo file used (e2e/demo.go - regular .go, not _test.go, so it is discoverable by OTE)

package e2e

import (
	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"
	g "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo"
)

var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:ClusterAPIMachineManagementAWS] Cluster API OTE demo", func() {
	It("should be discoverable by OTE as a parallel test", func() {
		By("This test has no labels, so it lands in capio/parallel")
	})

	It("should be a serial test", Label("Serial"), func() {
		By("This test has Label(Serial), so it lands in capio/serial")
	})

	It("should be a disruptive test", Label("Disruptive"), func() {
		By("This test has Label(Disruptive), so it lands in capio/disruptive")
	})

	It("should be an informing test that fails", g.Informing(), func() {
		By("This test is informing - its failure should not fail the suite")
		Expect("actual").To(Equal("expected"))
	})
})

capio/parallel - includes the 2 unlabeled tests

# using openshift/conformance/parallel would result in the exact same (as it is the parent)
~ ./bin/cluster-capi-operator-tests-ext run-suite capio/parallel
[
  {
    "name": "[sig-cluster-lifecycle][OCPFeatureGate:ClusterAPIMachineManagementAWS] Cluster API OTE demo should be an informing test that fails",
    "lifecycle": "informing",
    "duration": 37,
    "startTime": "2026-06-17 10:31:00.994642 UTC",
    "endTime": "2026-06-17 10:31:00.995154 UTC",
    "result": "failed",
    "output": "  STEP: This test is informing - its failure should not fail the suite @ 06/17/26 11:31:00.994\n  [FAILED] in [It] - /Users/pealmeid/Projects/cluster-capi-operator/e2e/demo.go:43 @ 06/17/26 11:31:00.995\n",
    "error": "fail [/Users/pealmeid/Projects/cluster-capi-operator/e2e/demo.go:43]: Expected\n    \u003cstring\u003e: actual\nto equal\n    \u003cstring\u003e: expected"
  },
  {
    "name": "[sig-cluster-lifecycle][OCPFeatureGate:ClusterAPIMachineManagementAWS] Cluster API OTE demo should be discoverable by OTE as a parallel test",
    "lifecycle": "blocking",
    "duration": 38,
    "startTime": "2026-06-17 10:31:00.997223 UTC",
    "endTime": "2026-06-17 10:31:00.997424 UTC",
    "result": "passed",
    "output": "  STEP: This test has no labels, so it lands in capio/parallel @ 06/17/26 11:31:00.997\n"
  }
]

The informing test failure is visible in the JSON output but the suite exits with code 0 - it does not gate anything. This is consistent with how openshift-tests treats informing failures: surfaced as a signal in Sippy/dashboards, never a blocker.
Note: make e2e uses plain ginkgo which has no concept of "informing"; it just sees a failing spec and fails the run. The informing lifecycle is only meaningful when the binary is invoked through OTE (run-suite).


capio/serial - only picks up tests with Label("Serial")

# using openshift/conformance/serial would result in the exact same (as it is the parent)
~ ./bin/cluster-capi-operator-tests-ext run-suite capio/serial
[
  {
    "name": "[sig-cluster-lifecycle][OCPFeatureGate:ClusterAPIMachineManagementAWS] Cluster API OTE demo should be a serial test",
    "lifecycle": "blocking",
    "duration": 0,
    "startTime": "2026-06-17 10:24:42.741528 UTC",
    "endTime": "2026-06-17 10:24:42.741754 UTC",
    "result": "passed",
    "output": "  STEP: This test has Label(Serial), so it lands in capio/serial @ 06/17/26 11:24:42.741\n"
  }
]

Suite qualifiers handle the filtering - no need to pass labels manually.


run-test by exact name - runs one test regardless of suite

~ ./bin/cluster-capi-operator-tests-ext run-test "[sig-cluster-lifecycle][OCPFeatureGate:ClusterAPIMachineManagementAWS] Cluster API OTE demo should be a disruptive test"
[
  {
    "name": "[sig-cluster-lifecycle][OCPFeatureGate:ClusterAPIMachineManagementAWS] Cluster API OTE demo should be a disruptive test",
    "lifecycle": "blocking",
    "duration": 0,
    "startTime": "2026-06-17 10:27:05.302156 UTC",
    "endTime": "2026-06-17 10:27:05.302426 UTC",
    "result": "passed",
    "output": "  STEP: This test has Label(Disruptive), so it lands in capio/disruptive @ 06/17/26 11:27:05.302\n"
  }
]

@pmeida

pmeida commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-capi-techpreview

@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-single-node-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/82c90270-6a52-11f1-957c-4b4344f0a90d-0

@pmeida

pmeida commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-capi-techpreview

@pmeida

pmeida commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 17, 2026
@pmeida

pmeida commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

/retest e2e-aws-capi-techpreview

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 1dc42c3 and 2 for PR HEAD 7274db3 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 33e0119 and 1 for PR HEAD 7274db3 in total

@pmeida

pmeida commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@pmeida

pmeida commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jun 19, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2026
Introduces the OpenShift Tests Extension (OTE) binary scaffold,
enabling e2e tests to be discovered and executed by the openshift-tests
orchestration framework.

- Add openshift-tests-extension/ as a separate Go module to isolate the
  ginkgo fork replace-directive from the main module dependency graph
- Register the component as openshift:payload:cluster-capi-operator with
  three suites mapping to the standard conformance hierarchy:
  capio/parallel → openshift/conformance/parallel
  capio/serial   → openshift/conformance/serial
  capio/disruptive → openshift/disruptive-longrunning
- Build and embed the gzipped binary in the operator image at
  /usr/bin/cluster-capi-operator-tests-ext.gz
- Add bin/cluster-capi-operator-tests-ext build target to Makefile
- Add openshift-tests-extension to go.work and hack/vendor.sh
- Vendor github.com/openshift-eng/openshift-tests-extension
- Add openshift-tests-extension/README.md with developer guide covering
  file suffix conventions, suite routing, feature gate labeling, blocking
  vs informing lifecycle, per-test timeouts, and local run instructions
- Rename e2e/machine_migration_vap_tests.go to the standard _test.go
  suffix to prevent unintended OTE discovery
- Align testutils replace directive with upstream (ff0f225cc3b5)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@pmeida

pmeida commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

had to rebase onto latest upstream main (post PR #598). The ovn presubmit builds were failing because openshift-tests-extension/go.mod still pinned cluster-api-actuator-pkg/testutils to the old version while root and e2e go.mod had already been bumped by #598. With go.work present, the Docker build runs in workspace mode and requires all modules to agree on replace directives - the conflict caused go build to abort before compiling anything. Aligned all three modules and re-vendored.

some presubmits went through some didnt, just bad timing

@stefanonardo

Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-ci-robot

Copy link
Copy Markdown

@pmeida: The /verified command must be used with one of the following actions: by, later, remove, or bypass. See https://docs.ci.openshift.org/docs/architecture/jira/#premerge-verification for more information.

Details

In response to this:

/verified

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.

@pmeida

pmeida commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/verified by @pmeida

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 19, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@pmeida: This PR has been marked as verified by @pmeida.

Details

In response to this:

/verified by @pmeida

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.

@damdo

damdo commented Jun 19, 2026

Copy link
Copy Markdown
Member

/retest

3 similar comments
@pmeida

pmeida commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@pmeida

pmeida commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@pmeida

pmeida commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 33e0119 and 2 for PR HEAD 0fb1035 in total

@pmeida

pmeida commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@pmeida

pmeida commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@pmeida

pmeida commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/hold depends on openshift/release#80814

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2026
@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@pmeida: 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-openstack-ovn-techpreview 0fb1035 link false /test e2e-openstack-ovn-techpreview
ci/prow/e2e-aws-capi-disconnected-techpreview 0fb1035 link false /test e2e-aws-capi-disconnected-techpreview

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@pmeida

pmeida commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 5656e20 into openshift:main Jun 22, 2026
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants