Skip to content

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

@droslean droslean commented Feb 17, 2026

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

/cc @openshift/test-platform

Summary by CodeRabbit

Chores

  • Removed legacy OpenShift Ansible and OpenShift Installer cluster test configuration types. Tests using these configurations must be migrated to MultiStageTestConfiguration.
  • Removed template-based test execution and template processing capabilities.
  • Removed template migration functionality from the determinize tool.
  • Simplified test configuration handling to rely exclusively on MultiStageTestConfiguration and MultiStageTestConfigurationLiteral variants.

@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 pull request removes template processing support and OpenShift installer-based test configurations from the CI operator. Changes include deletion of template clientset wiring, removal of multiple OpenShiftAnsible* and OpenShiftInstaller* configuration types from the API, elimination of template migration functionality, and cleanup of related test fixtures and validation logic.

Changes

Cohort / File(s) Summary
Template Support Removal
cmd/ci-operator/main.go, cmd/determinize-ci-operator/main.go
Removed template imports, clientset integration, template parsing, and related flag registrations; adjusted scheme wiring to use standard Kubernetes scheme instead of template scheme.
Template Migration Cleanup
cmd/determinize-ci-operator/main.go, cmd/determinize-ci-operator/main_test.go
Removed all template migration functionality including migration flags, validation logic, and migration helper functions; deleted entire test file validating migration scenarios.
Test Configuration Variants
cmd/ci-operator/main_test.go, pkg/registry/server/testdata/*
Removed test variant definitions (e2e-aws, e2e-aws-all, e2e-upi-aws, etc.) from in-file test specs and test fixtures.
API Type Definitions
pkg/api/types.go, pkg/api/zz_generated.deepcopy.go
Removed OpenshiftAnsible* and OpenshiftInstaller* configuration types from TestStepConfiguration; removed corresponding DeepCopy methods and supporting type definitions; simplified GetClusterProfileName logic.
Configuration & Wiring
pkg/defaults/config.go, pkg/defaults/defaults.go, pkg/defaults/defaults_test.go
Removed Templates field and templateClient from config structures; removed template client creation and TemplateExecutionStep processing; added EnableSecretsStoreCSIDriver field; updated test wiring.
Job Generation & Pod Specs
pkg/prowgen/jobbase.go, pkg/prowgen/jobbase_test.go, pkg/prowgen/podspec.go, pkg/prowgen/podspec_test.go
Removed handling of OpenShift cluster test configurations in job base builder; removed Template() mutator function and associated pod spec configuration; removed related test cases and fixtures.
Test Execution Steps
pkg/prowgen/prowgen_test.go, pkg/steps/clusterinstall/clusterinstall.go, pkg/steps/clusterinstall/template.go, pkg/steps/clusterinstall/OWNERS
Removed E2ETestStep constructor and related cluster install end-to-end test execution logic; deleted installTemplateE2E constant and orchestration template; removed OWNERS approvers/reviewers sections.
Template Execution Subsystem
pkg/steps/template.go, pkg/steps/template_test.go
Deleted entire template execution subsystem including TemplateClient interface, templateExecutionStep type, template processing logic, and lifecycle management functions.
Test Data Fixtures
pkg/prowgen/testdata/zz_fixture_TestTemplate*, pkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yaml, pkg/steps/testdata/zz_fixture_Test*
Removed multiple YAML test fixtures related to template testing, resource injection, artifact handling, and label injection scenarios.
Validation Logic
pkg/validation/test.go, pkg/validation/test_test.go
Removed OpenShift cluster test configuration validation branches; simplified type counting and validation to only MultiStageTestConfiguration variants; updated test expectations and release tag references.
Artifact & Registry
pkg/steps/artifacts.go, pkg/webreg/zz_generated.ci_operator_reference.go
Removed artifact container detection helpers and annotation-based waiting configuration; removed OpenShift-specific base image references from generated documentation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.75% 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 PR title clearly and concisely describes the main change: removing/deprecating all OpenShift template-related code across multiple tools.
Stable And Deterministic Test Names ✅ Passed This PR removes template code and does not introduce or modify any Ginkgo tests. The codebase uses standard Go testing framework with static, hardcoded test case names without dynamic information like timestamps or UUIDs.
Test Structure And Quality ✅ Passed The custom check requests a review of Ginkgo test code quality, but this codebase uses Go's standard testing package instead, making the Ginkgo-specific check inapplicable to this PR.

✏️ 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.

@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 2 times, most recently 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
@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.

@droslean droslean force-pushed the templates-code-cleanup branch from fb8181c to 0ec3d6f Compare March 13, 2026 11:37
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 13, 2026
@droslean droslean force-pushed the templates-code-cleanup branch from 0ec3d6f to 8101fb0 Compare March 13, 2026 11:42
Signed-off-by: Nikolaos Moraitis <nmoraiti@redhat.com>
@droslean droslean force-pushed the templates-code-cleanup branch from 8101fb0 to 102d82e Compare March 13, 2026 11:48
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)
pkg/defaults/defaults_test.go (2)

1624-1629: Rename this test case to reflect the new config type.

The case name still says “openshift-installer test” while the fixture now uses MultiStageTestConfigurationLiteral, which is confusing during failure triage.

Suggested rename
-        name: "openshift-installer test",
+        name: "multi-stage literal test",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/defaults/defaults_test.go` around lines 1624 - 1629, Test case name
"openshift-installer test" is misleading given the fixture uses
MultiStageTestConfigurationLiteral; update the test case's name string in
defaults_test.go to something descriptive like "multi-stage test
(MultiStageTestConfigurationLiteral)" so failures clearly indicate the config
type and reference the TestStepConfiguration/MultiStageTestConfigurationLiteral
fixture used.

1862-1882: Consider adding one EnableSecretsStoreCSIDriver=true coverage case.

This block wires the new field, but only exercises the false path in updated fixtures.

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

In `@pkg/defaults/defaults_test.go` around lines 1862 - 1882, The test fixtures
only exercise EnableSecretsStoreCSIDriver=false; add a new table-driven test
case that sets EnableSecretsStoreCSIDriver=true in the constructed input (the
struct with fields like CIConfig, GraphConf, JobSpec,
EnableSecretsStoreCSIDriver, etc.), include any necessary paramFiles/other
fields copied from an existing similar case, and add assertions that verify the
code path for the true branch is exercised (e.g., expected behavior/state when
EnableSecretsStoreCSIDriver is true). Ensure the new case is named/annotated so
it runs with the rest of defaults_test.go cases.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/defaults/defaults.go`:
- Line 810: The condition that decides which tests to append currently only
checks test.ContainerTestConfiguration and
test.MultiStageTestConfigurationLiteral, which omits unresolved multi-stage
tests; update the test selection condition (the if that guards adding to
buildSteps) to also check for test.MultiStageTestConfiguration != nil so
unresolved MultiStageTestConfiguration instances are included; this change
should be made where tests are filtered before calling FromConfigStatic /
building the graph so buildSteps and validation keep unresolved tests (refer to
the local variable test and the buildSteps filtering if-statement).

---

Nitpick comments:
In `@pkg/defaults/defaults_test.go`:
- Around line 1624-1629: Test case name "openshift-installer test" is misleading
given the fixture uses MultiStageTestConfigurationLiteral; update the test
case's name string in defaults_test.go to something descriptive like
"multi-stage test (MultiStageTestConfigurationLiteral)" so failures clearly
indicate the config type and reference the
TestStepConfiguration/MultiStageTestConfigurationLiteral fixture used.
- Around line 1862-1882: The test fixtures only exercise
EnableSecretsStoreCSIDriver=false; add a new table-driven test case that sets
EnableSecretsStoreCSIDriver=true in the constructed input (the struct with
fields like CIConfig, GraphConf, JobSpec, EnableSecretsStoreCSIDriver, etc.),
include any necessary paramFiles/other fields copied from an existing similar
case, and add assertions that verify the code path for the true branch is
exercised (e.g., expected behavior/state when EnableSecretsStoreCSIDriver is
true). Ensure the new case is named/annotated so it runs with the rest of
defaults_test.go cases.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 732528df-e5e8-459d-8ef5-77c2aae50d59

📥 Commits

Reviewing files that changed from the base of the PR and between fb8181c and 102d82e.

⛔ Files ignored due to path filters (2)
  • pkg/api/zz_generated.deepcopy.go is excluded by !**/zz_generated*
  • pkg/webreg/zz_generated.ci_operator_reference.go is excluded by !**/zz_generated*
📒 Files selected for processing (39)
  • cmd/ci-operator/main.go
  • cmd/ci-operator/main_test.go
  • cmd/determinize-ci-operator/main.go
  • cmd/determinize-ci-operator/main_test.go
  • pkg/api/types.go
  • pkg/defaults/config.go
  • pkg/defaults/defaults.go
  • pkg/defaults/defaults_test.go
  • pkg/prowgen/jobbase.go
  • pkg/prowgen/jobbase_test.go
  • pkg/prowgen/podspec.go
  • pkg/prowgen/podspec_test.go
  • pkg/prowgen/prowgen_test.go
  • pkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yaml
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_different_template_with_command.yaml
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_a_custom_test_image.yaml
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_command.yaml
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_different_command.yaml
  • pkg/registry/server/testdata/zz_fixture_TestConfig_getting_config_works.yaml
  • pkg/registry/server/testdata/zz_fixture_TestConfigserved_config.yaml
  • pkg/steps/artifacts.go
  • pkg/steps/clusterinstall/OWNERS
  • pkg/steps/clusterinstall/clusterinstall.go
  • pkg/steps/clusterinstall/template.go
  • pkg/steps/template.go
  • pkg/steps/template_test.go
  • pkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_jobspec_with_refs__label_injection_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_nil_refs_in_jobspec__no_injection_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestInjectResourcesToPod_both_default_and_template_s_resource_requests_are_defined__pod_has_container_named_test__and_is_changed.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_only_default_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_but_the_test_container_has_existing_resources__no_changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_no_pod__no_changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_but_with_no_artifacts_Volume_VolumeMount__no_changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount__changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_and_artifacts_dir_defined__changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_but_not_artifacts_dir_defined__no_changes_expected.yaml
  • pkg/validation/test.go
  • pkg/validation/test_test.go
💤 Files with no reviewable changes (31)
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_command.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_but_with_no_artifacts_Volume_VolumeMount__no_changes_expected.yaml
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_different_command.yaml
  • pkg/steps/testdata/zz_fixture_TestInjectResourcesToPod_both_default_and_template_s_resource_requests_are_defined__pod_has_container_named_test__and_is_changed.yaml
  • cmd/ci-operator/main_test.go
  • pkg/prowgen/jobbase.go
  • pkg/steps/clusterinstall/OWNERS
  • pkg/registry/server/testdata/zz_fixture_TestConfig_getting_config_works.yaml
  • pkg/prowgen/podspec.go
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_no_pod__no_changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_and_artifacts_dir_defined__changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount__changes_expected.yaml
  • pkg/prowgen/jobbase_test.go
  • pkg/registry/server/testdata/zz_fixture_TestConfigserved_config.yaml
  • pkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_jobspec_with_refs__label_injection_expected.yaml
  • pkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_only_default_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yaml
  • pkg/steps/template_test.go
  • pkg/prowgen/prowgen_test.go
  • pkg/validation/test.go
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yaml
  • cmd/determinize-ci-operator/main_test.go
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_a_custom_test_image.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_but_not_artifacts_dir_defined__no_changes_expected.yaml
  • pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_but_the_test_container_has_existing_resources__no_changes_expected.yaml
  • pkg/steps/clusterinstall/clusterinstall.go
  • pkg/steps/clusterinstall/template.go
  • pkg/steps/artifacts.go
  • pkg/steps/template.go
  • pkg/prowgen/testdata/zz_fixture_TestTemplate_different_template_with_command.yaml
  • pkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_nil_refs_in_jobspec__no_injection_expected.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/prowgen/podspec_test.go

for i := range config.Tests {
test := &config.Tests[i]
if test.ContainerTestConfiguration != nil || test.MultiStageTestConfigurationLiteral != nil || (test.OpenshiftInstallerClusterTestConfiguration != nil && test.OpenshiftInstallerClusterTestConfiguration.Upgrade) {
if test.ContainerTestConfiguration != nil || test.MultiStageTestConfigurationLiteral != nil {
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Call sites of FromConfigStatic =="
rg -nP --type=go -C3 '\bFromConfigStatic\s*\('

echo
echo "== Where MultiStageTestConfigurationLiteral is populated =="
rg -nP --type=go -C3 'MultiStageTestConfigurationLiteral'

echo
echo "== Places constructing tests with MultiStageTestConfiguration (steps) =="
rg -nP --type=go -C3 'MultiStageTestConfiguration\s*:'

Repository: openshift/ci-tools

Length of output: 50375


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Context around line 810 in defaults.go ==="
sed -n '800,820p' pkg/defaults/defaults.go

echo
echo "=== Full FromConfigStatic function signature and start ==="
sed -n '527,550p' pkg/defaults/defaults.go

echo
echo "=== Looking for where tests are processed in FromConfigStatic ==="
grep -n "MultiStageTestConfiguration" pkg/defaults/defaults.go | head -20

Repository: openshift/ci-tools

Length of output: 2393


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Checking when resolver is invoked (before or after FromConfigStatic) ==="
echo "From ci-operator/main.go - checking resolver usage pattern:"
grep -n -B5 -A5 "FromConfigStatic" cmd/ci-operator/main.go

echo
echo "From ci-operator-checkconfig/main.go:"
grep -n -B5 -A5 "FromConfigStatic" cmd/ci-operator-checkconfig/main.go

Repository: openshift/ci-tools

Length of output: 1202


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Finding resolver.Resolve calls ==="
rg -n "\.Resolve\(" --type=go -B2 -A2

echo
echo "=== Finding ResolveTests or test resolution patterns ==="
rg -n "ResolveTests|Resolve.*Test" --type=go | head -20

echo
echo "=== Check if there's a resolver invocation in main flow before FromConfigStatic ==="
sed -n '550,600p' cmd/ci-operator/main.go

Repository: openshift/ci-tools

Length of output: 25282


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for where config.Tests are modified to have literal versions ==="
rg -n "MultiStageTestConfigurationLiteral\s*=" --type=go | grep -v "test\|spec" | head -15

Repository: openshift/ci-tools

Length of output: 412


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== IsValidResolvedConfiguration definition and usage ==="
rg -n "IsValidResolvedConfiguration" --type=go -B2 -A10 | head -50

echo
echo "=== Check if registry resolver is invoked in checkconfig path ==="
grep -n "resolver\|Resolve" cmd/ci-operator-checkconfig/main.go

Repository: openshift/ci-tools

Length of output: 3964


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check the helper function that detects unresolved tests ==="
sed -n '110,120p' pkg/api/helper/imageextraction.go

Repository: openshift/ci-tools

Length of output: 528


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Full checkconfig validation and FromConfigStatic flow ==="
sed -n '140,160p' cmd/ci-operator-checkconfig/main.go

Repository: openshift/ci-tools

Length of output: 909


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check ResolveConfig function ==="
rg -n "func ResolveConfig" --type=go -A15

Repository: openshift/ci-tools

Length of output: 3846


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check if ci-operator's IsValidResolvedConfiguration actually resolves tests ==="
sed -n '43,90p' pkg/validation/config.go

Repository: openshift/ci-tools

Length of output: 1742


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check what loadConfig or resolverClient.ConfigWithTest returns ==="
rg -n "ConfigWithTest\|loadConfig" cmd/ci-operator/main.go -B2 -A8 | head -40

Repository: openshift/ci-tools

Length of output: 132


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Look for where o.configSpec is populated in ci-operator/main.go ==="
grep -n "o.configSpec\s*=" cmd/ci-operator/main.go | head -10

echo
echo "=== Check the resolver client interface ==="
rg -n "type.*Client.*interface" pkg/load/agents/ -A20

Repository: openshift/ci-tools

Length of output: 205


Add check for unresolved steps config in test filtering condition

Line 810 currently only appends tests with ContainerTestConfiguration or MultiStageTestConfigurationLiteral set. This omits tests with unresolved MultiStageTestConfiguration (steps). In the ci-operator-checkconfig path (lines 142-151), the resolved config is validated but then discarded; the original unresolved configuration is passed to FromConfigStatic, allowing unresolved tests to silently bypass this condition and be excluded from buildSteps. This breaks test validation and graph configuration.

Add || test.MultiStageTestConfiguration != nil to the condition at line 810 to ensure unresolved tests are not silently omitted.

Location
if test.ContainerTestConfiguration != nil || test.MultiStageTestConfigurationLiteral != nil {

Should become:

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` at line 810, The condition that decides which tests
to append currently only checks test.ContainerTestConfiguration and
test.MultiStageTestConfigurationLiteral, which omits unresolved multi-stage
tests; update the test selection condition (the if that guards adding to
buildSteps) to also check for test.MultiStageTestConfiguration != nil so
unresolved MultiStageTestConfiguration instances are included; this change
should be made where tests are filtered before calling FromConfigStatic /
building the graph so buildSteps and validation keep unresolved tests (refer to
the local variable test and the buildSteps filtering if-statement).

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 13, 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/integration 102d82e link true /test integration
ci/prow/lint 102d82e link true /test lint
ci/prow/checkconfig 102d82e link true /test checkconfig
ci/prow/breaking-changes 102d82e link false /test breaking-changes

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants