Skip to content

Comments

deprecate all Openshift templates related code#4952

Open
droslean wants to merge 1 commit intoopenshift:mainfrom
droslean:templates-code-cleanup
Open

deprecate all Openshift templates related code#4952
droslean wants to merge 1 commit intoopenshift:mainfrom
droslean:templates-code-cleanup

Conversation

@droslean
Copy link
Member

Cleanup all template-related code from all tools that were using templates.

/cc @openshift/test-platform

@openshift-ci-robot
Copy link
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: automatic mode

@openshift-ci openshift-ci bot requested a review from a team February 17, 2026 13:24
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Walkthrough

This PR removes OpenShift template and installer/Ansible cluster test support across the codebase: deletes template parsing, execution, migration, related types, fixtures, and steps, and replaces or narrows test/config paths toward multi-stage/container-based tests. No replacement template subsystem is added.

Changes

Cohort / File(s) Summary
Command-line tools
cmd/ci-operator/main.go, cmd/ci-operator/main_test.go, cmd/determinize-ci-operator/main.go, cmd/determinize-ci-operator/main_test.go
Removed template loading/parsing, template migration flags and logic, and template-related tests; adjusted event recorder/scheme wiring.
API types & deep copy
pkg/api/types.go, pkg/api/zz_generated.deepcopy.go
Deleted all OpenshiftAnsible*/OpenshiftInstaller* TestStepConfiguration fields and their corresponding struct/type definitions and DeepCopy methods; updated GetClusterProfileName branches.
Defaults & config
pkg/defaults/config.go, pkg/defaults/defaults.go, pkg/defaults/defaults_test.go
Removed Templates and template client from Config/Clients, eliminated template client creation/usage and template-based step construction; tests adapted to multi-stage literals.
Prow job generation
pkg/prowgen/jobbase.go, pkg/prowgen/jobbase_test.go, pkg/prowgen/podspec.go, pkg/prowgen/podspec_test.go
Removed template mutator and template-specific job/pod wiring (env vars, volumes, mounts); pruned handling and tests for OpenShift cluster test configurations.
Prow job test fixtures
pkg/prowgen/testdata/...
Deleted multiple YAML fixtures used for template/installer/ansible job tests and cleaned template references from remaining fixtures.
Template execution & cluster install steps
pkg/steps/template.go, pkg/steps/template_test.go, pkg/steps/clusterinstall/clusterinstall.go, pkg/steps/clusterinstall/template.go, pkg/steps/clusterinstall/OWNERS
Removed entire template execution subsystem (TemplateExecutionStep, TemplateClient, helpers, constants) and the cluster-install E2E step and its large install template; deleted related tests and OWNERS entries.
Template-related testdata
pkg/steps/testdata/...
Removed ~19 YAML fixtures used by template label/resource/operate-on-pod tests.
Validation
pkg/validation/test.go, pkg/validation/test_test.go
Removed validation branches and tests for OpenshiftAnsible*/OpenshiftInstaller* configurations; updated tests to use multi-stage paths.
Registry & web UI references
pkg/registry/server/testdata/..., pkg/webreg/zz_generated.ci_operator_reference.go
Removed multiple OpenShift installer/ansible test variant entries from served config fixtures and from generated reference YAML.
Artifacts handling
pkg/steps/artifacts.go
Removed helper functions and constants that detected/waited for artifact-holding containers via annotations.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

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

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 17, 2026
@droslean
Copy link
Member Author

/hold

Holding to babyshit this after merge.

@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 Feb 17, 2026
@droslean droslean force-pushed the templates-code-cleanup branch from 3042050 to 6ae5712 Compare February 17, 2026 15:12
Signed-off-by: Nikolaos Moraitis <nmoraiti@redhat.com>
@droslean droslean force-pushed the templates-code-cleanup branch from 6ae5712 to fb8181c Compare February 17, 2026 15:20
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.

Caution

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

⚠️ Outside diff range comments (1)
pkg/defaults/defaults.go (1)

817-826: ⚠️ Potential issue | 🟠 Major

Include unresolved MultiStageTestConfiguration tests in the build graph.

The condition at line 819 only processes literal test configurations. However, registry resolution is optional—if no registryPath is provided to loadConfig, unresolved MultiStageTestConfiguration tests are never converted to literal form and will be silently dropped from the graph. This is a silent failure that hides misconfiguration.

Include test.MultiStageTestConfiguration in the condition to ensure these tests are added to the step graph, or guarantee that all configs entering FromConfigStatic have been resolved:

Suggested fix
-		if test.ContainerTestConfiguration != nil || test.MultiStageTestConfigurationLiteral != nil {
+		if test.ContainerTestConfiguration != nil || test.MultiStageTestConfigurationLiteral != nil || test.MultiStageTestConfiguration != nil {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/defaults/defaults.go` around lines 817 - 826, The loop over config.Tests
is currently only adding tests with ContainerTestConfiguration or
MultiStageTestConfigurationLiteral to buildSteps, which drops unresolved
MultiStageTestConfiguration entries; update the condition in the loop to also
include test.MultiStageTestConfiguration (i.e. treat tests with
MultiStageTestConfiguration as valid candidates to append to buildSteps) or
alternatively ensure loadConfig/FromConfigStatic always resolves
MultiStageTestConfiguration into MultiStageTestConfigurationLiteral before this
loop; reference symbols: config.Tests, test.MultiStageTestConfiguration,
test.MultiStageTestConfigurationLiteral, test.ContainerTestConfiguration,
loadConfig, FromConfigStatic, buildSteps, api.StepConfiguration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@pkg/defaults/defaults.go`:
- Around line 817-826: The loop over config.Tests is currently only adding tests
with ContainerTestConfiguration or MultiStageTestConfigurationLiteral to
buildSteps, which drops unresolved MultiStageTestConfiguration entries; update
the condition in the loop to also include test.MultiStageTestConfiguration (i.e.
treat tests with MultiStageTestConfiguration as valid candidates to append to
buildSteps) or alternatively ensure loadConfig/FromConfigStatic always resolves
MultiStageTestConfiguration into MultiStageTestConfigurationLiteral before this
loop; reference symbols: config.Tests, test.MultiStageTestConfiguration,
test.MultiStageTestConfigurationLiteral, test.ContainerTestConfiguration,
loadConfig, FromConfigStatic, buildSteps, api.StepConfiguration.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 17, 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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 17, 2026

@droslean: 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/checkconfig fb8181c link true /test checkconfig
ci/prow/breaking-changes fb8181c link false /test breaking-changes
ci/prow/integration fb8181c link true /test integration
ci/prow/images fb8181c link true /test images

Full PR test history. Your PR dashboard.

Details

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

@petr-muller
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: droslean, petr-muller

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

@petr-muller
Copy link
Member

man that feels good

/meow

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 18, 2026

@petr-muller: cat image

Details

In response to this:

man that feels good

/meow

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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.

4 participants