Skip to content

CNTRLPLANE-1257: refactor: simplified single-module OTE infrastructure#631

Open
wangke19 wants to merge 2 commits intoopenshift:mainfrom
wangke19:refactor/migrate-to-single-module-ote
Open

CNTRLPLANE-1257: refactor: simplified single-module OTE infrastructure#631
wangke19 wants to merge 2 commits intoopenshift:mainfrom
wangke19:refactor/migrate-to-single-module-ote

Conversation

@wangke19
Copy link
Contributor

@wangke19 wangke19 commented Nov 21, 2025

after some discussions, we decided to do the following,

Summary

  • Simplified test infrastructure to single-module architecture
  • Removed custom test suite configuration and test spec manipulation
  • Updated build configuration to use standard build machinery
  • Cleaned up custom Makefile targets

Changes

Infrastructure (Commit 1)

  • Simplified cmd/cluster-openshift-apiserver-operator-tests-ext/main.go (reduced complexity)
    • Removed custom suite definitions, test manipulation, hooks
    • Removed unused test/extended package import
    • Now just registers extension with OTE framework
  • Updated Dockerfile to use standard make build
  • Cleaned up Makefile - removed custom test targets
  • Added README documentation for OTE test framework
    • Building, running, and listing tests
    • Quick reference for OTE framework usage
  • Added test/OWNERS file for proper code ownership

Dependencies (Commit 2)

  • Fixed test/extended package import issue
  • Ran go mod tidy and go mod vendor
  • Removed 258 unused vendor files:
    • github.com/go-task/slim-sprig/v3
    • github.com/onsi/ginkgo/v2 (CLI and internal packages)
    • github.com/onsi/gomega (full matcher suite)
    • golang.org/x/net/html
    • golang.org/x/text/encoding
    • golang.org/x/tools (cover, ast/inspector)
    • github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo utilities

Verification

  • ✅ Two commits following migration guide structure
  • ✅ Removed problematic test/extended import that was causing go mod tidy to hang
  • ✅ Infrastructure changes separated from dependency updates

Pattern Reference

Follows the pattern from:

Migration Guide

Based on: ote-single-module-migration-guide.md

🤖 Generated with Claude Code

@wangke19 wangke19 force-pushed the refactor/migrate-to-single-module-ote branch from 8c212c4 to c0e2eb2 Compare November 21, 2025 08:18
@wangke19 wangke19 changed the title refactor: migrate to single-module OTE infrastructure CNTRLPLANE-1257: refactor: simplified single-module OTE infrastructure Nov 21, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 21, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 21, 2025

@wangke19: This pull request references CNTRLPLANE-1257 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 task to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.20" instead.

Details

In response to this:

Summary

Migrate cluster-openshift-apiserver-operator to use the simplified single-module OTE (OpenShift Tests Extension) infrastructure, removing custom suite definitions, test spec manipulation, and hooks in favor of the standard OTE framework approach.

Changes

Commit 1: Infrastructure Code Changes

  • cmd/cluster-openshift-apiserver-operator-tests-ext/main.go: Simplified from 113 lines to 55 lines using the standard OTE template

  • Removed custom suite definitions

  • Removed custom test spec manipulation (BeforeAll hooks, test renaming, etc.)

  • Added blank import for test/extended package

  • Uses standard OTE framework commands

  • Makefile: Removed custom test targets

  • Removed TESTS_EXT_* variables

  • Removed tests-ext-build target

  • Removed tests-ext-update target

  • Uses standard make build for both operator and test binary

  • Dockerfile: Simplified to use standard build

  • Changed from make build && make tests-ext-build to make build --warn-undefined-variables

  • Added --warn-undefined-variables for better build hygiene

  • README.md: Added comprehensive Tests section

  • Documents how to build the test binary

  • Provides examples for running test suites and tests

  • References OTE framework documentation

  • .gitignore: Updated to exclude compressed test binary

  • Added cluster-openshift-apiserver-operator-tests-ext.gz

Commit 2: Dependency Updates

  • vendor/: Updated vendor directory
  • Removed unused files from openshift-tests-extension package (logging.go, parallel.go, util.go)
  • Updated modules.txt to reflect changes

Verification

Both operator and test binaries build successfully:

make build

Test binary functionality verified:

  • ✅ Binary is executable and responds to help commands
  • ✅ Integrates with OTE framework (list, run-suite, run-test, update)
  • ✅ Test metadata can be updated using ./cluster-openshift-apiserver-operator-tests-ext update
  • ✅ Uses standard make build instead of custom targets

Test plan

  • Build completes successfully
  • Test binary is functional
  • All OTE framework commands work correctly
  • No breaking changes to operator functionality

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

@gangwgr
Copy link
Contributor

gangwgr commented Nov 21, 2025

/lgtm

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

openshift-ci-robot commented Nov 21, 2025

@wangke19: This pull request references CNTRLPLANE-1257 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 task to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.20" instead.

Details

In response to this:

Summary

after the discussion, we decided to simplify single-module OTE (OpenShift Tests Extension) infrastructure, removing custom suite definitions, test spec manipulation, and hooks in favor of the standard OTE framework approach.

Changes

Commit 1: Infrastructure Code Changes

  • cmd/cluster-openshift-apiserver-operator-tests-ext/main.go: Simplified from 113 lines to 55 lines using the standard OTE template

  • Removed custom suite definitions

  • Removed custom test spec manipulation (BeforeAll hooks, test renaming, etc.)

  • Added blank import for test/extended package

  • Uses standard OTE framework commands

  • Makefile: Removed custom test targets

  • Removed TESTS_EXT_* variables

  • Removed tests-ext-build target

  • Removed tests-ext-update target

  • Uses standard make build for both operator and test binary

  • Dockerfile: Simplified to use standard build

  • Changed from make build && make tests-ext-build to make build --warn-undefined-variables

  • Added --warn-undefined-variables for better build hygiene

  • README.md: Added comprehensive Tests section

  • Documents how to build the test binary

  • Provides examples for running test suites and tests

  • References OTE framework documentation

  • .gitignore: Updated to exclude compressed test binary

  • Added cluster-openshift-apiserver-operator-tests-ext.gz

Commit 2: Dependency Updates

  • vendor/: Updated vendor directory
  • Removed unused files from openshift-tests-extension package (logging.go, parallel.go, util.go)
  • Updated modules.txt to reflect changes

Verification

Both operator and test binaries build successfully:

make build

Test binary functionality verified:

  • ✅ Binary is executable and responds to help commands
  • ✅ Integrates with OTE framework (list, run-suite, run-test, update)
  • ✅ Test metadata can be updated using ./cluster-openshift-apiserver-operator-tests-ext update
  • ✅ Uses standard make build instead of custom targets

Test plan

  • Build completes successfully
  • Test binary is functional
  • All OTE framework commands work correctly
  • No breaking changes to operator functionality

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

openshift-ci-robot commented Nov 21, 2025

@wangke19: This pull request references CNTRLPLANE-1257 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 task to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.20" instead.

Details

In response to this:

Summary

after our discussion, we decided to simplify single-module OTE (OpenShift Tests Extension) infrastructure, removing custom suite definitions, test spec manipulation, and hooks in favor of the standard OTE framework approach.

Changes

Commit 1: Infrastructure Code Changes

  • cmd/cluster-openshift-apiserver-operator-tests-ext/main.go: Simplified from 113 lines to 55 lines using the standard OTE template

  • Removed custom suite definitions

  • Removed custom test spec manipulation (BeforeAll hooks, test renaming, etc.)

  • Added blank import for test/extended package

  • Uses standard OTE framework commands

  • Makefile: Removed custom test targets

  • Removed TESTS_EXT_* variables

  • Removed tests-ext-build target

  • Removed tests-ext-update target

  • Uses standard make build for both operator and test binary

  • Dockerfile: Simplified to use standard build

  • Changed from make build && make tests-ext-build to make build --warn-undefined-variables

  • Added --warn-undefined-variables for better build hygiene

  • README.md: Added comprehensive Tests section

  • Documents how to build the test binary

  • Provides examples for running test suites and tests

  • References OTE framework documentation

  • .gitignore: Updated to exclude compressed test binary

  • Added cluster-openshift-apiserver-operator-tests-ext.gz

Commit 2: Dependency Updates

  • vendor/: Updated vendor directory
  • Removed unused files from openshift-tests-extension package (logging.go, parallel.go, util.go)
  • Updated modules.txt to reflect changes

Verification

Both operator and test binaries build successfully:

make build

Test binary functionality verified:

  • ✅ Binary is executable and responds to help commands
  • ✅ Integrates with OTE framework (list, run-suite, run-test, update)
  • ✅ Test metadata can be updated using ./cluster-openshift-apiserver-operator-tests-ext update
  • ✅ Uses standard make build instead of custom targets

Test plan

  • Build completes successfully
  • Test binary is functional
  • All OTE framework commands work correctly
  • No breaking changes to operator functionality

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

openshift-ci-robot commented Nov 21, 2025

@wangke19: This pull request references CNTRLPLANE-1257 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 task to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.20" instead.

Details

In response to this:

Summary

after some discussions, we decided to simplify single-module OTE (OpenShift Tests Extension) infrastructure, removing custom suite definitions, test spec manipulation, and hooks in favor of the standard OTE framework approach.

Changes

Commit 1: Infrastructure Code Changes

  • cmd/cluster-openshift-apiserver-operator-tests-ext/main.go: Simplified from 113 lines to 55 lines using the standard OTE template

  • Removed custom suite definitions

  • Removed custom test spec manipulation (BeforeAll hooks, test renaming, etc.)

  • Added blank import for test/extended package

  • Uses standard OTE framework commands

  • Makefile: Removed custom test targets

  • Removed TESTS_EXT_* variables

  • Removed tests-ext-build target

  • Removed tests-ext-update target

  • Uses standard make build for both operator and test binary

  • Dockerfile: Simplified to use standard build

  • Changed from make build && make tests-ext-build to make build --warn-undefined-variables

  • Added --warn-undefined-variables for better build hygiene

  • README.md: Added comprehensive Tests section

  • Documents how to build the test binary

  • Provides examples for running test suites and tests

  • References OTE framework documentation

  • .gitignore: Updated to exclude compressed test binary

  • Added cluster-openshift-apiserver-operator-tests-ext.gz

Commit 2: Dependency Updates

  • vendor/: Updated vendor directory
  • Removed unused files from openshift-tests-extension package (logging.go, parallel.go, util.go)
  • Updated modules.txt to reflect changes

Verification

Both operator and test binaries build successfully:

make build

Test binary functionality verified:

  • ✅ Binary is executable and responds to help commands
  • ✅ Integrates with OTE framework (list, run-suite, run-test, update)
  • ✅ Test metadata can be updated using ./cluster-openshift-apiserver-operator-tests-ext update
  • ✅ Uses standard make build instead of custom targets

Test plan

  • Build completes successfully
  • Test binary is functional
  • All OTE framework commands work correctly
  • No breaking changes to operator functionality

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

@wangke19
Copy link
Contributor Author

/verified by CI tests

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 24, 2025
@openshift-ci-robot
Copy link

@wangke19: This PR has been marked as verified by CI tests.

Details

In response to this:

/verified by CI tests

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.

@p0lyn0mial
Copy link
Contributor

@wangke19 wangke19 force-pushed the refactor/migrate-to-single-module-ote branch from c0e2eb2 to b6dee6f Compare November 25, 2025 08:13
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2025
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Nov 25, 2025
@wangke19 wangke19 force-pushed the refactor/migrate-to-single-module-ote branch from b6dee6f to 386cf35 Compare November 25, 2025 08:14
@wangke19
Copy link
Contributor Author

@wangke19 wangke19 force-pushed the refactor/migrate-to-single-module-ote branch from 386cf35 to 0d19e2d Compare November 25, 2025 10:46
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 25, 2025

@wangke19: This pull request references CNTRLPLANE-1257 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 task to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.20" instead.

Details

In response to this:

Summary

  • Simplified test infrastructure to single-module architecture
  • Removed custom test suite configuration and test spec manipulation
  • Updated build configuration to use standard build machinery
  • Cleaned up custom Makefile targets

Changes

Infrastructure (Commit 1)

  • Simplified cmd/cluster-openshift-apiserver-operator-tests-ext/main.go (reduced complexity)
  • Removed custom suite definitions, test manipulation, hooks
  • Removed unused test/extended package import
  • Now just registers extension with OTE framework
  • Updated Dockerfile to use standard make build
  • Cleaned up Makefile - removed custom test targets
  • Added README documentation for OTE test framework
  • Building, running, and listing tests
  • Quick reference for OTE framework usage
  • Added test/OWNERS file for proper code ownership

Dependencies (Commit 2)

  • Fixed test/extended package import issue
  • Ran go mod tidy and go mod vendor
  • Removed 258 unused vendor files:
  • github.com/go-task/slim-sprig/v3
  • github.com/onsi/ginkgo/v2 (CLI and internal packages)
  • github.com/onsi/gomega (full matcher suite)
  • golang.org/x/net/html
  • golang.org/x/text/encoding
  • golang.org/x/tools (cover, ast/inspector)
  • github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo utilities

Verification

  • ✅ Two commits following migration guide structure
  • ✅ Removed problematic test/extended import that was causing go mod tidy to hang
  • ✅ Infrastructure changes separated from dependency updates

Pattern Reference

Follows the pattern from:

Migration Guide

Based on: ote-single-module-migration-guide.md

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

openshift-ci-robot commented Nov 25, 2025

@wangke19: This pull request references CNTRLPLANE-1257 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 task to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.20" instead.

Details

In response to this:

after some discussions, we decided to do the following,

Summary

  • Simplified test infrastructure to single-module architecture
  • Removed custom test suite configuration and test spec manipulation
  • Updated build configuration to use standard build machinery
  • Cleaned up custom Makefile targets

Changes

Infrastructure (Commit 1)

  • Simplified cmd/cluster-openshift-apiserver-operator-tests-ext/main.go (reduced complexity)
  • Removed custom suite definitions, test manipulation, hooks
  • Removed unused test/extended package import
  • Now just registers extension with OTE framework
  • Updated Dockerfile to use standard make build
  • Cleaned up Makefile - removed custom test targets
  • Added README documentation for OTE test framework
  • Building, running, and listing tests
  • Quick reference for OTE framework usage
  • Added test/OWNERS file for proper code ownership

Dependencies (Commit 2)

  • Fixed test/extended package import issue
  • Ran go mod tidy and go mod vendor
  • Removed 258 unused vendor files:
  • github.com/go-task/slim-sprig/v3
  • github.com/onsi/ginkgo/v2 (CLI and internal packages)
  • github.com/onsi/gomega (full matcher suite)
  • golang.org/x/net/html
  • golang.org/x/text/encoding
  • golang.org/x/tools (cover, ast/inspector)
  • github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo utilities

Verification

  • ✅ Two commits following migration guide structure
  • ✅ Removed problematic test/extended import that was causing go mod tidy to hang
  • ✅ Infrastructure changes separated from dependency updates

Pattern Reference

Follows the pattern from:

Migration Guide

Based on: ote-single-module-migration-guide.md

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

@wangke19 wangke19 force-pushed the refactor/migrate-to-single-module-ote branch from 0d19e2d to e4da5a6 Compare December 1, 2025 09:47
wangke19 and others added 2 commits December 1, 2025 17:52
- Simplified cmd/cluster-openshift-apiserver-operator-tests-ext/main.go to minimal template
  - Removed custom suite definitions, test spec manipulation, hooks
  - Removed unused test/extended package import
  - Now just registers extension with OTE framework
- Updated Dockerfile to use standard 'make build'
  - build-machinery-go automatically builds both binaries from cmd/
- Removed custom clean target from Makefile
  - build-machinery-go framework handles cleanup automatically
- Added OTE test documentation to README
  - Document building, running, and listing tests
  - Quick reference for OTE framework usage
- Updated .gitignore for test binary

This moves to the simplified single-module architecture pattern where the test
binary is built alongside the operator binary using standard build machinery,
eliminating custom build targets and test suite configuration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated go.mod and go.sum via go mod tidy and removed unused dependencies from vendor/:
- github.com/go-task/slim-sprig/v3
- github.com/onsi/ginkgo/v2 (ginkgo CLI and internal packages)
- github.com/onsi/gomega (full matcher suite)
- github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo utilities
- golang.org/x/net/html
- golang.org/x/text/encoding
- golang.org/x/tools (cover, ast/inspector)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@wangke19 wangke19 force-pushed the refactor/migrate-to-single-module-ote branch from e4da5a6 to 2397f21 Compare December 1, 2025 10:08
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 1, 2025

@wangke19: all tests passed!

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.

@p0lyn0mial
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Dec 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gangwgr, p0lyn0mial, wangke19

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

The pull request process is described here

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

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2025
@p0lyn0mial
Copy link
Contributor

/retest

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

PR needs rebase.

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.

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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants