deprecate all Openshift templates related code#4952
deprecate all Openshift templates related code#4952droslean wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughRemove OpenShift template processing and installer-based test configurations project-wide: delete template client/scheme, template execution subsystem, cluster-install step, template fixtures/tests/migrations, related API types and deepcopy methods, and adjust runtime/CLI wiring and job/pod spec generation accordingly. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can enable review details to help with troubleshooting, context usage and more.Enable the |
|
/hold Holding to babyshit this after merge. |
6ae5712 to
fb8181c
Compare
There was a problem hiding this comment.
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 | 🟠 MajorInclude unresolved
MultiStageTestConfigurationtests in the build graph.The condition at line 819 only processes literal test configurations. However, registry resolution is optional—if no
registryPathis provided toloadConfig, unresolvedMultiStageTestConfigurationtests are never converted to literal form and will be silently dropped from the graph. This is a silent failure that hides misconfiguration.Include
test.MultiStageTestConfigurationin the condition to ensure these tests are added to the step graph, or guarantee that all configs enteringFromConfigStatichave 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.
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
man that feels good /meow |
DetailsIn response to this:
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. |
fb8181c to
0ec3d6f
Compare
8101fb0 to
102d82e
Compare
There was a problem hiding this comment.
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 oneEnableSecretsStoreCSIDriver=truecoverage 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
⛔ Files ignored due to path filters (2)
pkg/api/zz_generated.deepcopy.gois excluded by!**/zz_generated*pkg/webreg/zz_generated.ci_operator_reference.gois excluded by!**/zz_generated*
📒 Files selected for processing (39)
cmd/ci-operator/main.gocmd/ci-operator/main_test.gocmd/determinize-ci-operator/main.gocmd/determinize-ci-operator/main_test.gopkg/api/types.gopkg/defaults/config.gopkg/defaults/defaults.gopkg/defaults/defaults_test.gopkg/prowgen/jobbase.gopkg/prowgen/jobbase_test.gopkg/prowgen/podspec.gopkg/prowgen/podspec_test.gopkg/prowgen/prowgen_test.gopkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_different_template_with_command.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_a_custom_test_image.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_command.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_different_command.yamlpkg/registry/server/testdata/zz_fixture_TestConfig_getting_config_works.yamlpkg/registry/server/testdata/zz_fixture_TestConfigserved_config.yamlpkg/steps/artifacts.gopkg/steps/clusterinstall/OWNERSpkg/steps/clusterinstall/clusterinstall.gopkg/steps/clusterinstall/template.gopkg/steps/template.gopkg/steps/template_test.gopkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_jobspec_with_refs__label_injection_expected.yamlpkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_nil_refs_in_jobspec__no_injection_expected.yamlpkg/steps/testdata/zz_fixture_TestInjectResourcesToPod_both_default_and_template_s_resource_requests_are_defined__pod_has_container_named_test__and_is_changed.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_only_default_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_but_the_test_container_has_existing_resources__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_no_pod__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_but_with_no_artifacts_Volume_VolumeMount__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount__changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_and_artifacts_dir_defined__changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_but_not_artifacts_dir_defined__no_changes_expected.yamlpkg/validation/test.gopkg/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 { |
There was a problem hiding this comment.
🧩 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 -20Repository: 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.goRepository: 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.goRepository: 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 -15Repository: 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.goRepository: 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.goRepository: 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.goRepository: openshift/ci-tools
Length of output: 909
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Check ResolveConfig function ==="
rg -n "func ResolveConfig" --type=go -A15Repository: 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.goRepository: 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 -40Repository: 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/ -A20Repository: 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).
102d82e to
fb15319
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
pkg/defaults/defaults.go (1)
808-810:⚠️ Potential issue | 🟠 MajorDon't filter out
steps:tests here.
api.TestStepConfigurationstill supportsMultiStageTestConfiguration, but Line 810 only admits container and literal tests. That silently drops unresolvedsteps:tests fromGraphConfiguration, so they never reach downstream graph construction/validation.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 808 - 810, The loop currently only includes tests when test.ContainerTestConfiguration != nil or test.MultiStageTestConfigurationLiteral != nil, which filters out unresolved "steps:" (api.TestStepConfiguration / MultiStageTestConfiguration) tests so they never reach GraphConfiguration; update the condition to also accept the TestStepConfiguration / MultiStageTestConfiguration form (or remove the restrictive conditional entirely) so tests with steps are preserved (e.g., check test.TestStepConfiguration != nil or test.MultiStageTestConfiguration != nil or simply push all config.Tests entries into the slice) and ensure callers like GraphConfiguration consumers receive these step-based tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@pkg/defaults/defaults.go`:
- Around line 808-810: The loop currently only includes tests when
test.ContainerTestConfiguration != nil or
test.MultiStageTestConfigurationLiteral != nil, which filters out unresolved
"steps:" (api.TestStepConfiguration / MultiStageTestConfiguration) tests so they
never reach GraphConfiguration; update the condition to also accept the
TestStepConfiguration / MultiStageTestConfiguration form (or remove the
restrictive conditional entirely) so tests with steps are preserved (e.g., check
test.TestStepConfiguration != nil or test.MultiStageTestConfiguration != nil or
simply push all config.Tests entries into the slice) and ensure callers like
GraphConfiguration consumers receive these step-based tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 67b53b6b-568b-4092-ad7a-32c0abf290ac
⛔ Files ignored due to path filters (18)
vendor/github.com/openshift/client-go/template/applyconfigurations/internal/internal.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/brokertemplateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/brokertemplateinstancespec.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/parameter.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/template.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancecondition.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstanceobject.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancerequester.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancespec.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancestatus.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/brokertemplateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/generated_expansion.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/template.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/template_client.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/templateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/modules.txtis excluded by!vendor/**,!**/vendor/**
📒 Files selected for processing (47)
cmd/ci-operator/main.gocmd/ci-operator/main_test.gocmd/determinize-ci-operator/main.gocmd/determinize-ci-operator/main_test.gopkg/api/types.gopkg/api/zz_generated.deepcopy.gopkg/defaults/config.gopkg/defaults/defaults.gopkg/defaults/defaults_test.gopkg/prowgen/jobbase.gopkg/prowgen/jobbase_test.gopkg/prowgen/podspec.gopkg/prowgen/podspec_test.gopkg/prowgen/prowgen_test.gopkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_different_template_with_command.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_a_custom_test_image.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_command.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_different_command.yamlpkg/registry/server/testdata/zz_fixture_TestConfig_getting_config_works.yamlpkg/registry/server/testdata/zz_fixture_TestConfigserved_config.yamlpkg/steps/artifacts.gopkg/steps/clusterinstall/OWNERSpkg/steps/clusterinstall/clusterinstall.gopkg/steps/clusterinstall/template.gopkg/steps/template.gopkg/steps/template_test.gopkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_jobspec_with_refs__label_injection_expected.yamlpkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_nil_refs_in_jobspec__no_injection_expected.yamlpkg/steps/testdata/zz_fixture_TestInjectResourcesToPod_both_default_and_template_s_resource_requests_are_defined__pod_has_container_named_test__and_is_changed.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_only_default_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_but_the_test_container_has_existing_resources__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_no_pod__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_but_with_no_artifacts_Volume_VolumeMount__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount__changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_and_artifacts_dir_defined__changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_but_not_artifacts_dir_defined__no_changes_expected.yamlpkg/validation/test.gopkg/validation/test_test.gopkg/webreg/zz_generated.ci_operator_reference.gotest/integration/ci-operator-prowgen/input/config/private/duper/private-duper-master.yamltest/integration/ci-operator-prowgen/input/config/super/duper/super-duper-master.yamltest/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-periodics.yamltest/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-presubmits.yamltest/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-periodics.yamltest/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
💤 Files with no reviewable changes (37)
- pkg/registry/server/testdata/zz_fixture_TestConfigserved_config.yaml
- test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
- pkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_nil_refs_in_jobspec__no_injection_expected.yaml
- pkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yaml
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_but_the_test_container_has_existing_resources__no_changes_expected.yaml
- pkg/webreg/zz_generated.ci_operator_reference.go
- pkg/steps/clusterinstall/template.go
- pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_a_custom_test_image.yaml
- test/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-periodics.yaml
- pkg/steps/clusterinstall/clusterinstall.go
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_no_pod__no_changes_expected.yaml
- pkg/steps/template_test.go
- pkg/prowgen/jobbase_test.go
- pkg/prowgen/testdata/zz_fixture_TestTemplate_different_template_with_command.yaml
- cmd/determinize-ci-operator/main_test.go
- pkg/prowgen/prowgen_test.go
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yaml
- pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_different_command.yaml
- pkg/steps/artifacts.go
- pkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_jobspec_with_refs__label_injection_expected.yaml
- pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_command.yaml
- pkg/registry/server/testdata/zz_fixture_TestConfig_getting_config_works.yaml
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_but_with_no_artifacts_Volume_VolumeMount__no_changes_expected.yaml
- pkg/validation/test.go
- test/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-presubmits.yaml
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount__changes_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_template_with_pod_with_artifacts_Volume_VolumeMount_and_artifacts_dir_defined__changes_expected.yaml
- test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-periodics.yaml
- cmd/ci-operator/main_test.go
- pkg/steps/template.go
- pkg/api/zz_generated.deepcopy.go
- pkg/prowgen/jobbase.go
- pkg/steps/clusterinstall/OWNERS
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_but_not_artifacts_dir_defined__no_changes_expected.yaml
- pkg/prowgen/podspec.go
🚧 Files skipped from review as they are similar to previous changes (2)
- pkg/defaults/config.go
- pkg/prowgen/podspec_test.go
Signed-off-by: Nikolaos Moraitis <nmoraiti@redhat.com>
fb15319 to
7f07e5e
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
pkg/defaults/defaults.go (1)
810-810:⚠️ Potential issue | 🔴 CriticalUnresolved multi-stage tests are still being dropped from
buildSteps.At Line 810,
FromConfigStaticstill filters out tests that only haveMultiStageTestConfigurationset, so those tests never enter the graph.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` at line 810, In FromConfigStatic, tests that only set MultiStageTestConfiguration are being filtered out because the condition checks only ContainerTestConfiguration or MultiStageTestConfigurationLiteral; update the conditional in FromConfigStatic to also accept test.MultiStageTestConfiguration (i.e., include MultiStageTestConfiguration != nil alongside ContainerTestConfiguration != nil and MultiStageTestConfigurationLiteral != nil) so those multi-stage tests are added into buildSteps/graph rather than dropped.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@pkg/defaults/defaults.go`:
- Line 810: In FromConfigStatic, tests that only set MultiStageTestConfiguration
are being filtered out because the condition checks only
ContainerTestConfiguration or MultiStageTestConfigurationLiteral; update the
conditional in FromConfigStatic to also accept test.MultiStageTestConfiguration
(i.e., include MultiStageTestConfiguration != nil alongside
ContainerTestConfiguration != nil and MultiStageTestConfigurationLiteral != nil)
so those multi-stage tests are added into buildSteps/graph rather than dropped.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1e9c19fd-8805-46d5-a7be-110b1b41b295
⛔ Files ignored due to path filters (18)
vendor/github.com/openshift/client-go/template/applyconfigurations/internal/internal.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/brokertemplateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/brokertemplateinstancespec.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/parameter.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/template.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancecondition.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstanceobject.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancerequester.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancespec.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/applyconfigurations/template/v1/templateinstancestatus.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/brokertemplateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/generated_expansion.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/template.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/template_client.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/client-go/template/clientset/versioned/typed/template/v1/templateinstance.gois excluded by!vendor/**,!**/vendor/**vendor/modules.txtis excluded by!vendor/**,!**/vendor/**
📒 Files selected for processing (48)
cmd/ci-operator/main.gocmd/ci-operator/main_test.gocmd/determinize-ci-operator/main.gocmd/determinize-ci-operator/main_test.gopkg/api/types.gopkg/api/zz_generated.deepcopy.gopkg/defaults/config.gopkg/defaults/defaults.gopkg/defaults/defaults_test.gopkg/prowgen/jobbase.gopkg/prowgen/jobbase_test.gopkg/prowgen/podspec.gopkg/prowgen/podspec_test.gopkg/prowgen/prowgen_test.gopkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_different_template_with_command.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_a_custom_test_image.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_command.yamlpkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_different_command.yamlpkg/registry/server/testdata/zz_fixture_TestConfig_getting_config_works.yamlpkg/registry/server/testdata/zz_fixture_TestConfigserved_config.yamlpkg/steps/artifacts.gopkg/steps/clusterinstall/OWNERSpkg/steps/clusterinstall/clusterinstall.gopkg/steps/clusterinstall/template.gopkg/steps/template.gopkg/steps/template_test.gopkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_jobspec_with_refs__label_injection_expected.yamlpkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_nil_refs_in_jobspec__no_injection_expected.yamlpkg/steps/testdata/zz_fixture_TestInjectResourcesToPod_both_default_and_template_s_resource_requests_are_defined__pod_has_container_named_test__and_is_changed.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_only_default_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_but_the_test_container_has_existing_resources__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_no_existing_resources_in_the_container__changes_are_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_no_pod__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_but_with_no_artifacts_Volume_VolumeMount__no_changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount__changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_and_artifacts_dir_defined__changes_expected.yamlpkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_but_not_artifacts_dir_defined__no_changes_expected.yamlpkg/validation/test.gopkg/validation/test_test.gopkg/webreg/zz_generated.ci_operator_reference.gotest/integration/ci-operator-prowgen/input/config/private/duper/private-duper-master.yamltest/integration/ci-operator-prowgen/input/config/super/duper/super-duper-master.yamltest/integration/ci-operator-prowgen/input/jobs/super/duper/super-duper-master-periodics.yamltest/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-periodics.yamltest/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-presubmits.yamltest/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-periodics.yamltest/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
💤 Files with no reviewable changes (38)
- 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/clusterinstall/template.go
- pkg/webreg/zz_generated.ci_operator_reference.go
- pkg/prowgen/jobbase.go
- pkg/registry/server/testdata/zz_fixture_TestConfig_getting_config_works.yaml
- pkg/steps/clusterinstall/OWNERS
- test/integration/ci-operator-prowgen/input/jobs/super/duper/super-duper-master-periodics.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/artifacts.go
- test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-periodics.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/validation/test.go
- test/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-periodics.yaml
- pkg/prowgen/podspec.go
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount__changes_expected.yaml
- pkg/prowgen/jobbase_test.go
- cmd/ci-operator/main_test.go
- pkg/prowgen/prowgen_test.go
- pkg/registry/server/testdata/zz_fixture_TestConfigserved_config.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_TestInjectLabelsToTemplate_nil_refs_in_jobspec__no_injection_expected.yaml
- pkg/prowgen/testdata/zz_fixture_TestTemplate_different_template_with_command.yaml
- test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
- pkg/steps/clusterinstall/clusterinstall.go
- pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_different_command.yaml
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_no_pod__no_changes_expected.yaml
- pkg/steps/testdata/zz_fixture_TestInjectLabelsToTemplate_jobspec_with_refs__label_injection_expected.yaml
- pkg/steps/template.go
- 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_but_with_no_artifacts_Volume_VolumeMount__no_changes_expected.yaml
- pkg/prowgen/testdata/zz_fixture_TestTemplate_template_with_command.yaml
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_template_with_pod_with_artifacts_Volume_VolumeMount_and_artifacts_dir_defined__changes_expected.yaml
- test/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-presubmits.yaml
- pkg/steps/template_test.go
- pkg/api/zz_generated.deepcopy.go
- pkg/prowgen/testdata/zz_fixture_TestReleaseRpms_envvar_generated_for_non_origin_repo.yaml
- pkg/steps/testdata/zz_fixture_TestOperateOnTemplatePods_resources_defined_in_the_config_but_the_test_container_has_existing_resources__no_changes_expected.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- test/integration/ci-operator-prowgen/input/config/private/duper/private-duper-master.yaml
|
@droslean: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |

Cleanup all template-related code from all tools that were using templates.
/cc @openshift/test-platform