Skip to content

prowgen: add rehearsal control to ci-operator config#5106

Open
Prucek wants to merge 2 commits intoopenshift:mainfrom
Prucek:prowgen-rehearsals
Open

prowgen: add rehearsal control to ci-operator config#5106
Prucek wants to merge 2 commits intoopenshift:mainfrom
Prucek:prowgen-rehearsals

Conversation

@Prucek
Copy link
Copy Markdown
Member

@Prucek Prucek commented Apr 15, 2026

Summary

  • Adds ProwgenExtras struct with DisableRehearsals field to ci-operator config (prowgen.disable_rehearsals)
  • Adds per-test DisableRehearsal field to TestStepConfiguration (disable_rehearsal)
  • ci-operator config takes precedence over .config.prowgen settings
  • This is the first step of an incremental migration away from .config.prowgen

Details

Previously, rehearsal control was only possible via .config.prowgen:

  • rehearsals.disable_all: true — disables all rehearsals for a repo
  • rehearsals.disabled_rehearsals: [test1, test2] — disables specific tests

This PR adds equivalent fields directly in ci-operator config:

  • prowgen.disable_rehearsals: true — global disable (replaces disable_all)
  • Per-test disable_rehearsal: true — per-test disable (replaces disabled_rehearsals list)

Both .config.prowgen and ci-operator config are supported simultaneously, with ci-operator config taking precedence.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for disabling rehearsals globally and per-test in CI configuration
    • Added Slack reporter configuration options for job notifications
    • Added operator presubmit skip configuration
  • Refactor

    • Consolidated Prowgen configuration types into unified API structure with enhanced methods
  • Tests

    • Added comprehensive test fixtures for rehearsal disabling scenarios

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

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

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

This repository is configured in: automatic mode

@openshift-ci openshift-ci bot requested review from droslean and jmguzik April 15, 2026 11:56
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Prucek

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 Apr 15, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

3 similar comments
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@Prucek Prucek force-pushed the prowgen-rehearsals branch from 80aa6cf to 68332b0 Compare April 17, 2026 13:43
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

Walkthrough

This pull request consolidates Prowgen configuration models by moving type definitions from the config package to the api package. New configuration types are added to pkg/api/types.go, corresponding definitions are removed from pkg/config/load.go, and all references throughout the codebase are updated accordingly. Rehearsal disable logic is refactored from precomputed values to per-call method invocations.

Changes

Cohort / File(s) Summary
API Type Definitions
pkg/api/types.go
Added new exported types ProwgenExtras, Prowgen, Rehearsals, SlackReporterConfig, and SkipOperatorPresubmit. Added methods AreRehearsalsDisabled(), IsRehearsalDisabledForTest(), MergeDefaults(), GetSlackReporterConfigForJobName(), and SkipPresubmits(). Extended ReleaseBuildConfiguration with optional Prowgen field and TestStepConfiguration with optional DisableRehearsal field.
Config Package Migration
pkg/config/load.go
Removed local Prowgen, Rehearsals, SlackReporterConfig, and SkipOperatorPresubmits type definitions and associated methods. Updated LoadProwgenConfig() to return *cioperatorapi.Prowgen instead of local *Prowgen.
Main CLI Updates
cmd/ci-operator-prowgen/main.go
Modified generateJobsToDir and generateJobs to accept/cache cioperatorapi.Prowgen. Updated ProwgenInfo construction to use cioperatorapi.ProwgenExtras{Prowgen: ...} and assign config values into pInfo.Config.Prowgen.
Prowgen Job Generation
pkg/prowgen/prowgen.go
Changed ProwgenInfo.Config field type from config.Prowgen to cioperatorapi.ProwgenExtras. Refactored rehearsal disable logic to call info.Config.IsRehearsalDisabledForTest(configSpec, element.As) per-test instead of precomputing disabled rehearsals.
Image Graph Generator
pkg/image-graph-generator/operator.go
Updated callback to instantiate configProwgen using api.Prowgen instead of config.Prowgen.
Test Code Updates
cmd/ci-operator-prowgen/main_test.go, pkg/config/load_test.go, pkg/prowgen/prowgen_test.go, pkg/prowgen/jobbase_test.go
Updated test dependencies and type references from config package to api package. Replaced pointer.StringPtr with ptr.To. Updated test data structures to use ciop.ProwgenExtras and api.* types. Expanded rehearsal disable test coverage.
Rehearsal Test Fixtures
pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_all_rehearsals_*.yaml, zz_fixture_TestGenerateJobs_disabled_rehearsals_at_job_level_*.yaml
Added new YAML fixture files validating rehearsal disabling behavior across Prowgen file settings and ci-operator config settings, including per-test and global disable scenarios.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: adding rehearsal control capabilities to the ci-operator configuration through new fields and logic.
Stable And Deterministic Test Names ✅ Passed PR uses standard Go testing with table-driven tests, not Ginkgo. All test names are static descriptive strings with no dynamic information.
Test Structure And Quality ✅ Passed The custom check requires Ginkgo test patterns, but this PR contains only standard Go tests using testing.T framework with no Ginkgo code.
Microshift Test Compatibility ✅ Passed This pull request does not add any new Ginkgo e2e tests. The changes are limited to refactoring internal configuration handling and updating unit tests with standard Go testing patterns. No new Ginkgo e2e tests are being added, so the MicroShift test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR contains only unit tests for CI infrastructure tools, not Ginkgo e2e tests. SNO compatibility assessment is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Pull request introduces only configuration schema refactoring and tool logic updates with no scheduling constraints or topology-related assumptions.
Ote Binary Stdout Contract ✅ Passed PR introduces no stdout writes in process-level code; all logging uses logrus (defaults to stderr) and fmt usage limited to error wrapping/string formatting.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This pull request does not add any new Ginkgo e2e tests. All test files use the standard Go testing package with func Test* patterns, not Ginkgo patterns. YAML files are test fixtures for unit tests, not e2e tests.

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

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

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

Copy link
Copy Markdown

@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 (1)
pkg/prowgen/prowgen_test.go (1)

703-718: Consider adding a test for the edge case where global disable cannot be overridden by per-test enable.

The documentation in types.go (lines 872-874) states that DisableRehearsal cannot re-enable rehearsals if globally disabled. Consider adding a test case to verify this behavior explicitly.

💡 Suggested test case
{
    id: "per-test enable cannot override global disable",
    config: &ciop.ReleaseBuildConfiguration{
        Prowgen: &ciop.ProwgenExtras{DisableRehearsals: ptr.To(true)},
        Tests: []ciop.TestStepConfiguration{
            // DisableRehearsal: false should NOT re-enable since global is disabled
            {As: "unit", DisableRehearsal: ptr.To(false), ContainerTestConfiguration: &ciop.ContainerTestConfiguration{From: "bin"}},
        },
    },
    repoInfo: &ProwgenInfo{Metadata: ciop.Metadata{
        Org:    "organization",
        Repo:   "repository",
        Branch: "branch",
    }},
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/prowgen/prowgen_test.go` around lines 703 - 718, Add a new test case that
verifies a per-test DisableRehearsal=false does not re-enable rehearsals when
the global flag is set: create an entry similar to the suggested snippet using
ReleaseBuildConfiguration with ProwgenExtras{DisableRehearsals: ptr.To(true)}
and a TestStepConfiguration having DisableRehearsal: ptr.To(false) (e.g., As:
"unit"), include the same ProwgenInfo Metadata used by other cases, and assert
the generated job respects the global disable (i.e., rehearsal remains
disabled); update the test table alongside the existing cases that use
TestStepConfiguration, ProwgenInfo, Metadata, DisableRehearsal and
DisableRehearsals.
🤖 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/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_CSI_enabled_from_ci_operator_config.yaml`:
- Around line 38-40: The container mounts a secret named "gcs-credentials" at
mountPath "/secrets/gcs" but there is no corresponding volume in the "volumes"
section; add a volume entry named "gcs-credentials" of type secret (matching
other fixtures) under the top-level volumes so the mount has a defined source
and uses the correct secret name.

---

Nitpick comments:
In `@pkg/prowgen/prowgen_test.go`:
- Around line 703-718: Add a new test case that verifies a per-test
DisableRehearsal=false does not re-enable rehearsals when the global flag is
set: create an entry similar to the suggested snippet using
ReleaseBuildConfiguration with ProwgenExtras{DisableRehearsals: ptr.To(true)}
and a TestStepConfiguration having DisableRehearsal: ptr.To(false) (e.g., As:
"unit"), include the same ProwgenInfo Metadata used by other cases, and assert
the generated job respects the global disable (i.e., rehearsal remains
disabled); update the test table alongside the existing cases that use
TestStepConfiguration, ProwgenInfo, Metadata, DisableRehearsal and
DisableRehearsals.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: ed5d27a3-4885-4979-988c-82c74c5007c5

📥 Commits

Reviewing files that changed from the base of the PR and between fe055db and 68332b0.

⛔ 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 (10)
  • cmd/ci-operator-prowgen/main.go
  • pkg/api/types.go
  • pkg/config/load.go
  • pkg/prowgen/jobbase.go
  • pkg/prowgen/prowgen.go
  • pkg/prowgen/prowgen_test.go
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_ci_operator_config_takes_precedence_over_prowgen_config.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_rehearsals_from_ci_operator_prowgen_config.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_per_test_disable_rehearsal_from_ci_operator_config.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_CSI_enabled_from_ci_operator_config.yaml

Comment on lines +38 to +40
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Missing gcs-credentials volume definition.

The container mounts gcs-credentials at /secrets/gcs (lines 38-40), but the corresponding volume is not defined in the volumes section (lines 57-81). Other fixtures typically include this volume as a secret.

🔧 Proposed fix to add the missing volume
   volumes:
   - name: boskos
     secret:
       items:
       - key: credentials
         path: credentials
       secretName: boskos-credentials
+  - name: gcs-credentials
+    secret:
+      secretName: gce-sa-credentials-gcs-publisher
   - configMap:
       name: gsm-config
     name: gsm-config

Also applies to: 57-81

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

In
`@pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_CSI_enabled_from_ci_operator_config.yaml`
around lines 38 - 40, The container mounts a secret named "gcs-credentials" at
mountPath "/secrets/gcs" but there is no corresponding volume in the "volumes"
section; add a volume entry named "gcs-credentials" of type secret (matching
other fixtures) under the top-level volumes so the mount has a defined source
and uses the correct secret name.

Comment thread pkg/api/types.go
RestrictNetworkAccess *bool `json:"restrict_network_access,omitempty"`

// DisableRehearsal prevents this specific test from being picked up for rehearsals.
// Note: this cannot re-enable rehearsals if they are globally disabled via
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, the note here is irrelevant since you will depreciate that. Also, we need to override it. So if its globaly disabled, then enabling it here should override the global setting. So the comment is wrong too.

Comment thread pkg/config/load.go Outdated
}

// ApplyOverrides applies overrides from ci-operator config's prowgen stanza.
// Fields set in the ci-operator config take precedence over .config.prowgen values.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comments are irrelevant. Same for the other. Just remove them all.

Comment thread pkg/prowgen/jobbase.go Outdated
"time"

utilpointer "k8s.io/utils/pointer"
"k8s.io/utils/ptr"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

all changes in this file are not related to what you are introducing in this PR.

Comment thread pkg/prowgen/prowgen.go Outdated
var periodics []prowconfig.Periodic
rehearsals := info.Config.Rehearsals
disabledRehearsals := sets.New[string](rehearsals.DisabledRehearsals...)
disabledRehearsals := sets.New(rehearsals.DisabledRehearsals...)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here. Its not that important but it would be better to open another PR that fixes that in the whole ci-tools repo.

Comment thread pkg/prowgen/prowgen_test.go Outdated

for _, tc := range tests {
t.Run(tc.id, func(t *testing.T) {
// Mimic the behavior of ci-operator config loading where the repo config is overridden
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No need for that comment.

Comment thread pkg/prowgen/prowgen_test.go Outdated
t.Run(tc.id, func(t *testing.T) {
// Mimic the behavior of ci-operator config loading where the repo config is overridden
// by prowgen config and then generate jobs based on the merged config
tc.repoInfo.Config.ApplyOverrides(tc.config.Prowgen)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is wrong here. This is proof that the whole test cases are wrong now. You shouldn't need to apply the override before running the function you want to test. It seems that you are trying to hack the test to work instead.

@Prucek Prucek force-pushed the prowgen-rehearsals branch from 68332b0 to 52aa218 Compare April 20, 2026 12:56
Copy link
Copy Markdown

@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/config/load.go (1)

50-95: ⚠️ Potential issue | 🟠 Major

Validate regex syntax even when there is only one slack_reporter entry.

Line 52 currently skips all validation unless there are multiple configs. That lets a single invalid job_name_patterns or excluded_job_patterns value through and only fails later by being silently ignored at match time. Keep the duplicate checks conditional if you want, but regex compilation should run for every config.

Suggested fix
 func validateProwgenConfig(pConfig *cioperatorapi.Prowgen) error {
 	var errs []error
-	if len(pConfig.SlackReporterConfigs) > 1 { // There is no reason to validate if we only have one slack_reporter_config
-		jobsSeen := sets.NewString()
-		patternsSeen := sets.NewString()
+	jobsSeen := sets.NewString()
+	patternsSeen := sets.NewString()
+	checkDuplicates := len(pConfig.SlackReporterConfigs) > 1
 
-		for _, sc := range pConfig.SlackReporterConfigs {
-			// Validate exact job names
-			for _, job := range sc.JobNames {
-				if jobsSeen.Has(job) {
-					errs = append(errs, fmt.Errorf("job: %s exists in multiple slack_reporter_configs, it should only be in one", job))
-					continue
-				}
-				jobsSeen.Insert(job)
+	for _, sc := range pConfig.SlackReporterConfigs {
+		for _, job := range sc.JobNames {
+			if checkDuplicates && jobsSeen.Has(job) {
+				errs = append(errs, fmt.Errorf("job: %s exists in multiple slack_reporter_configs, it should only be in one", job))
+				continue
 			}
+			jobsSeen.Insert(job)
+		}
 
-			// Validate regex patterns
-			for _, pattern := range sc.JobNamePatterns {
-				// Check if regex pattern is valid
-				if _, err := regexp.Compile(pattern); err != nil {
-					errs = append(errs, fmt.Errorf("invalid regex pattern: %s, error: %w", pattern, err))
-					continue
-				}
-
-				// Check for duplicate patterns
-				if patternsSeen.Has(pattern) {
-					errs = append(errs, fmt.Errorf("regex pattern: %s exists in multiple slack_reporter_configs, it should only be in one", pattern))
-					continue
-				}
-				patternsSeen.Insert(pattern)
+		for _, pattern := range sc.JobNamePatterns {
+			if _, err := regexp.Compile(pattern); err != nil {
+				errs = append(errs, fmt.Errorf("invalid regex pattern: %s, error: %w", pattern, err))
+				continue
 			}
-
-			// Validate excluded job patterns
-			for _, pattern := range sc.ExcludedJobPatterns {
-				// Check if regex pattern is valid
-				if _, err := regexp.Compile(pattern); err != nil {
-					errs = append(errs, fmt.Errorf("invalid excluded job pattern: %s, error: %w", pattern, err))
-					continue
-				}
-
-				// Note: We don't check for duplicates in excluded patterns as it's reasonable
-				// to have the same exclusion in multiple configs
+			if checkDuplicates && patternsSeen.Has(pattern) {
+				errs = append(errs, fmt.Errorf("regex pattern: %s exists in multiple slack_reporter_configs, it should only be in one", pattern))
+				continue
 			}
+			patternsSeen.Insert(pattern)
 		}
+
+		for _, pattern := range sc.ExcludedJobPatterns {
+			if _, err := regexp.Compile(pattern); err != nil {
+				errs = append(errs, fmt.Errorf("invalid excluded job pattern: %s, error: %w", pattern, err))
+			}
+		}
 	}
 	return utilerrors.NewAggregate(errs)
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/config/load.go` around lines 50 - 95, The current validateProwgenConfig
function only runs validation when len(pConfig.SlackReporterConfigs) > 1, which
skips regex compilation for JobNamePatterns and ExcludedJobPatterns when there
is a single SlackReporterConfig; update validateProwgenConfig so that you always
iterate through pConfig.SlackReporterConfigs to compile each pattern in
sc.JobNamePatterns and sc.ExcludedJobPatterns and append any regexp.Compile
errors to errs (preserving the existing error messages), but keep the
duplicate-detection logic that uses jobsSeen/patternsSeen conditional on having
more than one config (i.e., perform the duplicate job/pattern checks only when
len(pConfig.SlackReporterConfigs) > 1); return utilerrors.NewAggregate(errs) as
before.
♻️ Duplicate comments (1)
pkg/prowgen/prowgen_test.go (1)

714-720: ⚠️ Potential issue | 🟠 Major

Use the actual ci-operator field in this scenario.

This case is labeled as ci-operator config, but it still sets the legacy Prowgen.Rehearsals.DisableAll path. That means a regression in prowgen.disable_rehearsals parsing or ci-operator-over-file precedence would still pass here. Switch this setup to DisableRehearsals: ptr.To(true) and add one mixed-source case if you want to lock in the precedence contract.

Suggested test setup
-				Prowgen: &ciop.ProwgenExtras{Prowgen: ciop.Prowgen{Rehearsals: ciop.Rehearsals{DisableAll: true}}},
+				Prowgen: &ciop.ProwgenExtras{DisableRehearsals: ptr.To(true)},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/prowgen/prowgen_test.go` around lines 714 - 720, The test case is using
the legacy field Prowgen.Rehearsals.DisableAll but should exercise the actual
ci-operator field; update the test vector that builds a
ReleaseBuildConfiguration (symbol: ReleaseBuildConfiguration) so its
ProwgenExtras.Prowgen.Rehearsals uses DisableRehearsals: ptr.To(true) instead of
DisableAll, and add an additional mixed-source test case combining a ci-operator
DisableRehearsals and a Prowgen.Rehearsals.DisableAll to assert
ci-operator-over-file precedence (check the test names and assertions around
prowgen.disable_rehearsals parsing to validate the behavior).
🤖 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/config/load.go`:
- Around line 50-95: The current validateProwgenConfig function only runs
validation when len(pConfig.SlackReporterConfigs) > 1, which skips regex
compilation for JobNamePatterns and ExcludedJobPatterns when there is a single
SlackReporterConfig; update validateProwgenConfig so that you always iterate
through pConfig.SlackReporterConfigs to compile each pattern in
sc.JobNamePatterns and sc.ExcludedJobPatterns and append any regexp.Compile
errors to errs (preserving the existing error messages), but keep the
duplicate-detection logic that uses jobsSeen/patternsSeen conditional on having
more than one config (i.e., perform the duplicate job/pattern checks only when
len(pConfig.SlackReporterConfigs) > 1); return utilerrors.NewAggregate(errs) as
before.

---

Duplicate comments:
In `@pkg/prowgen/prowgen_test.go`:
- Around line 714-720: The test case is using the legacy field
Prowgen.Rehearsals.DisableAll but should exercise the actual ci-operator field;
update the test vector that builds a ReleaseBuildConfiguration (symbol:
ReleaseBuildConfiguration) so its ProwgenExtras.Prowgen.Rehearsals uses
DisableRehearsals: ptr.To(true) instead of DisableAll, and add an additional
mixed-source test case combining a ci-operator DisableRehearsals and a
Prowgen.Rehearsals.DisableAll to assert ci-operator-over-file precedence (check
the test names and assertions around prowgen.disable_rehearsals parsing to
validate the behavior).

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: fa168e00-6623-4165-825c-985e24fa9167

📥 Commits

Reviewing files that changed from the base of the PR and between 68332b0 and 52aa218.

⛔ 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 (13)
  • cmd/ci-operator-prowgen/main.go
  • cmd/ci-operator-prowgen/main_test.go
  • pkg/api/types.go
  • pkg/config/load.go
  • pkg/config/load_test.go
  • pkg/image-graph-generator/operator.go
  • pkg/prowgen/jobbase_test.go
  • pkg/prowgen/prowgen.go
  • pkg/prowgen/prowgen_test.go
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_all_rehearsals_ci_operator_config_.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_all_rehearsals_prowgen_file_.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_rehearsals_at_job_level_ci_operator_config_.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_rehearsals_at_job_level_prowgen_file_.yaml
✅ Files skipped from review due to trivial changes (3)
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_all_rehearsals_prowgen_file_.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_all_rehearsals_ci_operator_config_.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_disabled_rehearsals_at_job_level_prowgen_file_.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • cmd/ci-operator-prowgen/main.go
  • pkg/prowgen/prowgen.go

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 20, 2026

@Prucek: 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/images 52aa218 link true /test images
ci/prow/integration 52aa218 link true /test integration
ci/prow/format 52aa218 link true /test format
ci/prow/codegen 52aa218 link true /test codegen
ci/prow/checkconfig 52aa218 link true /test checkconfig
ci/prow/breaking-changes 52aa218 link false /test breaking-changes
ci/prow/frontend-checks 52aa218 link true /test frontend-checks
ci/prow/unit 52aa218 link true /test unit

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants