Skip to content

prowgen: remove .config.prowgen support#5167

Open
Prucek wants to merge 3 commits into
openshift:mainfrom
Prucek:remove-prowgen-config-v2
Open

prowgen: remove .config.prowgen support#5167
Prucek wants to merge 3 commits into
openshift:mainfrom
Prucek:remove-prowgen-config-v2

Conversation

@Prucek
Copy link
Copy Markdown
Member

@Prucek Prucek commented May 7, 2026

Summary

  • Remove .config.prowgen file support entirely from prowgen
  • All features previously configured via .config.prowgen are now available inline in ci-operator configuration YAML:
    • prowgen: {private, expose, disable_rehearsals, skip_operator_presubmits, enable_secrets_store_csi_driver}
    • Per-test reporter_config and disable_rehearsal fields
  • Remove config.Prowgen struct and all associated types/functions from pkg/config/load.go
  • Remove ProwgenInfo.Config field — ProwgenInfo now only contains Metadata
  • Remove .config.prowgen loading from ci-operator-prowgen and image-graph-generator
  • Remove .config.prowgen skip from check-gh-automation
  • Migrate integration test fixtures from .config.prowgen to inline ci-operator config equivalents

🤖 Generated with Claude Code

prowgen: remove .config.prowgen support

This PR removes support for the legacy .config.prowgen file and consolidates all prowgen configuration into ci-operator YAML under a new prowgen: section (with per-test fields added on test entries). Repositories that still rely on .config.prowgen must migrate those settings into their ci-operator configs; the PR includes updated integration test fixtures as examples.

What this means for CI users and operators

  • .config.prowgen is no longer read. Move any settings into the ci-operator YAML:
    • Repository/top-level prowgen fields (place under prowgen:):
      • private
      • expose
      • disable_rehearsals
      • skip_operator_presubmits
      • enable_secrets_store_csi_driver
    • Per-test fields (place on each test item):
      • reporter_config (Slack reporter settings)
      • disable_rehearsal
  • Prowgen behavior is now driven solely by ci-operator config; previous fallback behavior from a separate .config.prowgen file has been removed.

Component-level changes and effects

  • ci-operator-prowgen / job generation
    • Stopped loading/merging .config.prowgen. GenerateJobs and related call sites now accept *cioperatorapi.Metadata directly (no ProwgenInfo wrapper) and read prowgen settings from the ReleaseBuildConfiguration.
    • Removed per-run prowgen cache plumbing and simplified function signatures.
  • pkg/config
    • Removed the Prowgen-related types, helpers, and constant: Prowgen, SlackReporterConfig, SkipOperatorPresubmits, Rehearsals, LoadProwgenConfig, validateProwgenConfig, and ProwgenFile.
  • pkg/prowgen
    • Dropped the ProwgenInfo wrapper type; generation functions now use *cioperatorapi.Metadata.
    • Rehearsals, skip-operator-presubmits, private/expose, and Secrets Store CSI driver enabling are determined solely from inline prowgen fields in ci-operator config.
    • Slack reporter selection simplified to use per-test reporter_config only (removed fallback lookup via .config.prowgen).
  • Other callers and controllers
    • image-graph-generator, ephemeral-cluster controllers, multi-pr-prow-plugin, and reconciler code were updated to pass metadata directly rather than a ProwgenInfo wrapper.
  • cmd/check-gh-automation
    • No longer skips files named .config.prowgen when deriving changed repositories; changes to that filename will now count in repository detection.
  • Tests and fixtures
    • Integration and unit tests and fixtures migrated from .config.prowgen to inline prowgen: and per-test reporter_config / disable_rehearsal fields. Tests updated to use *cioperatorapi.Metadata and ci-operator API prowgen override types.

Migration guidance

  • Move existing .config.prowgen values into the corresponding ci-operator YAML (examples are provided in the updated test fixtures).
  • Update per-test slack reporter settings and rehearsal disabling to use reporter_config and disable_rehearsal on each test.
  • After migration, prowgen behavior will be deterministic from ci-operator config alone (no cross-file fallbacks).

The PR removes legacy loader/types and simplifies prowgen codepaths to rely exclusively on ci-operator API fields.

@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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0ac7ca91-0999-4c91-92e0-776121ea8b80

📥 Commits

Reviewing files that changed from the base of the PR and between 2b4f143 and 8506637.

📒 Files selected for processing (1)
  • pkg/prowgen/jobbase_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/prowgen/jobbase_test.go

📝 Walkthrough

Walkthrough

Move Prowgen config into per-repo CI Operator YAML (prowgen:), remove shared Prowgen types and loaders, refactor job generation to use ci-operator Metadata-only inputs, update job base builder/tests, migrate integration fixtures, and update downstream callsites and small tooling behavior.

Changes

Prowgen Configuration Type Removal

Layer / File(s) Summary
Prowgen types and loaders
pkg/config/load.go, pkg/config/load_test.go
Prowgen, SlackReporterConfig, SkipOperatorPresubmits, and Rehearsals types and associated loader/validation helpers are removed; tests referencing them are simplified.

Job Generation Simplification

Layer / File(s) Summary
Job generation core refactor
pkg/prowgen/prowgen.go, pkg/prowgen/prowgen_test.go
Replace ProwgenInfo with *cioperatorapi.Metadata; compute rehearsal/operator-presubmit behavior solely from configSpec.Prowgen; derive Slack reporter config only from per-test SlackReporterConfig. Tests updated to use metadata-only inputs.
CLI generate jobs
cmd/ci-operator-prowgen/main.go, cmd/ci-operator-prowgen/main_test.go
Remove per-run prowConfig cache from generateJobsToDir/generateJobs; build per-run output map and call prowgen.GenerateJobs with metadata-only info; tests updated accordingly.
Test fixture cleanup
pkg/prowgen/testdata/*
Removed or updated fixtures that relied on removed prowgen config precedence or slack-report wiring.

Job Base Builder Updates

Layer / File(s) Summary
Private/expose and CSI flag derivation
pkg/prowgen/jobbase.go, pkg/prowgen/jobbase_test.go
Builders now accept *cioperatorapi.Metadata; private/expose and CSI enablement are read exclusively from ReleaseBuildConfiguration.Prowgen; tests migrated to use ProwgenOverrides in ciop types.

Downstream and Tooling Updates

Layer / File(s) Summary
Downstream callers and plugin updates
cmd/multi-pr-prow-plugin/server.go, pkg/controller/...
Remove temporary prowgen.ProwgenInfo wrappers; pass *api.Metadata/ciop.Metadata directly into prowgen builders and generators.
Image graph & repo gathering
pkg/image-graph-generator/operator.go, cmd/check-gh-automation/main.go
Remove Prowgen loading/merge in image graph operator callback; stop excluding .config.prowgen changes when collecting modified repos.

Integration Test Fixture Migration

Layer / File(s) Summary
Config files to YAML migration
test/integration/ci-operator-prowgen/input/config/*/.config.prowgen, test/integration/ci-operator-prowgen/input/config/*/*/*.yaml
Prowgen metadata moved from .config.prowgen files into CI Operator YAML prowgen: blocks and per-test reporter_config/disable_rehearsal fields; several fixtures updated to reflect metadata relocation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Stable And Deterministic Test Names ❌ Error In pkg/config/load_test.go, TestExtractRepoElementsFromPath uses testCase.path as the test name instead of testCase.name. While paths are static, they're not descriptive user-facing test names. Change t.Run(testCase.path, ...) to t.Run(testCase.name, ...) in pkg/config/load_test.go to use proper descriptive test names like "simple path parses fine" instead of file paths.
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Go Error Handling ⚠️ Warning Found 3 instances of bare error returns without context wrapping in modified code, violating Go error handling best practices. Wrap errors with context using fmt.Errorf at: (1) cmd/ci-operator-prowgen/main.go:135, (2) pkg/image-graph-generator/operator.go:74, (3) pkg/controller/prpqr_reconciler/prpqr_reconciler.go:209
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'prowgen: remove .config.prowgen support' directly and concisely describes the main objective of the PR—removing .config.prowgen file support throughout the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test Coverage For New Features ✅ Passed Refactored functions have test coverage. Tests updated for signature changes and deprecated types. 33+ test cases in prowgen_test.go verify inline config. Integration fixtures migrated.
Test Structure And Quality ✅ Passed Custom check requires review of Ginkgo test code. PR contains no Ginkgo imports or tests; it only modifies standard Go unit tests which use the testing package. Check is not applicable to this PR.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added. Changes are limited to unit test and fixture modifications plus backend prowgen refactoring. Check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR contains only unit test refactoring, configuration migration, and infrastructure changes. SNO compatibility check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed This PR refactors prowgen config handling. No deployment manifests, affinity rules, node selectors, or topology-aware scheduling constraints are added or modified.
Ote Binary Stdout Contract ✅ Passed No OTE Binary Stdout Contract violations found. All entry points use logrus (stderr by default) with no unredirected klog, fmt.Print*, or stdout writes in process-level code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests added in this PR. Only standard Go unit tests and integration test fixtures were modified. Check is not applicable.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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 May 7, 2026
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

Caution

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

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

43-65: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Propagate repo-level disable_rehearsals to non-test presubmits.

disableAllRehearsals is only threaded through the configSpec.Tests loop. The generated images and operator bundle presubmits below still call generatePresubmitForTest(...) without disableRehearsal, so a repo-wide prowgen.disable_rehearsals: true will stop suppressing rehearsals for those jobs after this migration.

Proposed fix
 		presubmits[orgrepo] = append(presubmits[orgrepo], *generatePresubmitForTest(jobBaseGen, imagesTestName, info, func(options *generatePresubmitOptions) {
+			options.disableRehearsal = disableAllRehearsals
 			options.optional = optional
 			options.runIfChanged = configSpec.Images.RunIfChanged
 			options.skipIfOnlyChanged = configSpec.Images.SkipIfOnlyChanged
 			options.pipelineRunIfChanged = configSpec.Images.PipelineRunIfChanged
 			options.pipelineSkipIfOnlyChanged = configSpec.Images.PipelineSkipIfOnlyChanged
@@
 			presubmits[orgrepo] = append(presubmits[orgrepo], *generatePresubmitForTest(jobBaseGen, testName, info, func(options *generatePresubmitOptions) {
+				options.disableRehearsal = disableAllRehearsals
 				options.optional = bundle.Optional
 				options.Capabilities = bundle.Capabilities
 			}))
@@
-			presubmits[orgrepo] = append(presubmits[orgrepo], *generatePresubmitForTest(jobBaseGen, name, info))
+			presubmits[orgrepo] = append(presubmits[orgrepo], *generatePresubmitForTest(jobBaseGen, name, info, func(options *generatePresubmitOptions) {
+				options.disableRehearsal = disableAllRehearsals
+			}))

Also applies to: 143-149, 181-208

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/prowgen/prowgen.go` around lines 43 - 65, The repo-level
disableAllRehearsals flag is computed when iterating configSpec.Tests but never
propagated into the other presubmit generators, so generatePresubmitForTest(...)
calls for images and operator bundles ignore it; update the call sites that
create non-test presubmits (calls to generatePresubmitForTest and any wrappers
that build presubmits) to accept and pass a disableRehearsal boolean (derived
from disableAllRehearsals || element.DisableRehearsal or appropriate repo-level
value), and adjust the signature of generatePresubmitForTest (and any helper
like NewProwJobBaseBuilderForTest usage) to honor that parameter so rehearsals
are suppressed consistently. Ensure all places noted in the review (the
additional presubmit generation blocks) pass the propagated disableRehearsal
flag.
🧹 Nitpick comments (1)
cmd/ci-operator-prowgen/main.go (1)

123-136: ⚡ Quick win

Wrap GenerateJobs failures with repo context.

The raw return err here drops which org/repo was being processed, so one bad config becomes hard to isolate during a full tree run.

Proposed fix
 		generated, err := prowgen.GenerateJobs(configSpec, pInfo)
 		if err != nil {
-			return err
+			return fmt.Errorf("generate jobs for %s: %w", orgRepo, err)
 		}

As per coding guidelines, "Wrap errors with fmt.Errorf("context: %w", err), lowercase messages, no trailing punctuation"

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/ci-operator-prowgen/main.go` around lines 123 - 136, The call to
prowgen.GenerateJobs in generateJobs returns an error that is currently returned
raw, losing repo context; update the error return to wrap the failure with the
org/repo context (use orgRepo) using fmt.Errorf with the %w verb and a
lowercase, no-trailing-punctuation message (e.g., "generate jobs for %s: %w",
orgRepo, err) so failures from prowgen.GenerateJobs include which repository
failed while keeping existing variables (configSpec, pInfo, generated)
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/prowgen/prowgen.go`:
- Around line 262-275: slackReporterConfig currently only reads
tests[*].reporter_config and thus drops reporter settings for
synthesized/non-test jobs; update slackReporterConfig (and its callers) to
accept and merge a repo-level reporter config (e.g., a second parameter
repoSlackConfig *cioperatorapi.SlackReporterConfig) so that if testSlackConfig
is nil or missing fields you fall back to repoSlackConfig, then apply the
existing default-job-states logic and return the merged prowv1.ReporterConfig;
reference slackReporterConfig, cioperatorapi.SlackReporterConfig and
prowv1.ReporterConfig when locating where to implement the merge.

---

Outside diff comments:
In `@pkg/prowgen/prowgen.go`:
- Around line 43-65: The repo-level disableAllRehearsals flag is computed when
iterating configSpec.Tests but never propagated into the other presubmit
generators, so generatePresubmitForTest(...) calls for images and operator
bundles ignore it; update the call sites that create non-test presubmits (calls
to generatePresubmitForTest and any wrappers that build presubmits) to accept
and pass a disableRehearsal boolean (derived from disableAllRehearsals ||
element.DisableRehearsal or appropriate repo-level value), and adjust the
signature of generatePresubmitForTest (and any helper like
NewProwJobBaseBuilderForTest usage) to honor that parameter so rehearsals are
suppressed consistently. Ensure all places noted in the review (the additional
presubmit generation blocks) pass the propagated disableRehearsal flag.

---

Nitpick comments:
In `@cmd/ci-operator-prowgen/main.go`:
- Around line 123-136: The call to prowgen.GenerateJobs in generateJobs returns
an error that is currently returned raw, losing repo context; update the error
return to wrap the failure with the org/repo context (use orgRepo) using
fmt.Errorf with the %w verb and a lowercase, no-trailing-punctuation message
(e.g., "generate jobs for %s: %w", orgRepo, err) so failures from
prowgen.GenerateJobs include which repository failed while keeping existing
variables (configSpec, pInfo, generated) unchanged.
🪄 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 YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: dc6a2fde-2869-489f-84b3-9bb7477a288f

📥 Commits

Reviewing files that changed from the base of the PR and between 53463e8 and 55deef5.

📒 Files selected for processing (29)
  • cmd/check-gh-automation/main.go
  • cmd/ci-operator-prowgen/main.go
  • cmd/ci-operator-prowgen/main_test.go
  • pkg/config/load.go
  • pkg/config/load_test.go
  • pkg/image-graph-generator/operator.go
  • pkg/prowgen/jobbase.go
  • pkg/prowgen/jobbase_test.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_images_job_is_configured_for_slack_reporting.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_job_excluded_by_patterns_should_not_have_slack_reporter_config.yaml
  • test/integration/ci-operator-prowgen/input/config/norehearsals/duper/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/norehearsals/duper/norehearsals-duper-master.yaml
  • test/integration/ci-operator-prowgen/input/config/norehearsals/stuper/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/norehearsals/stuper/norehearsals-stuper-master.yaml
  • test/integration/ci-operator-prowgen/input/config/private-org/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/private-org/duper/private-org-duper-master.yaml
  • test/integration/ci-operator-prowgen/input/config/private-org/super/private-org-super-master.yaml
  • test/integration/ci-operator-prowgen/input/config/private/duper/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/private/duper/private-duper-master.yaml
  • test/integration/ci-operator-prowgen/input/config/slack-report/duper/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/slack-report/duper/slack-report-duper-master.yaml
  • test/integration/ci-operator-prowgen/input/config/super/duper/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/super/duper/super-duper-release-4.19__periodics.yaml
  • test/integration/ci-operator-prowgen/output/jobs/slack-report-inline/duper/slack-report-inline-duper-master-periodics.yaml
  • test/integration/ci-operator-prowgen/output/jobs/slack-report-inline/duper/slack-report-inline-duper-master-postsubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/slack-report-inline/duper/slack-report-inline-duper-master-presubmits.yaml
💤 Files with no reviewable changes (16)
  • test/integration/ci-operator-prowgen/input/config/norehearsals/stuper/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/private-org/.config.prowgen
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_ci_operator_config_takes_precedence_over_prowgen_config.yaml
  • test/integration/ci-operator-prowgen/input/config/norehearsals/duper/.config.prowgen
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_job_excluded_by_patterns_should_not_have_slack_reporter_config.yaml
  • test/integration/ci-operator-prowgen/input/config/super/duper/.config.prowgen
  • test/integration/ci-operator-prowgen/input/config/private/duper/.config.prowgen
  • test/integration/ci-operator-prowgen/output/jobs/slack-report-inline/duper/slack-report-inline-duper-master-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/slack-report-inline/duper/slack-report-inline-duper-master-periodics.yaml
  • test/integration/ci-operator-prowgen/input/config/slack-report/duper/.config.prowgen
  • test/integration/ci-operator-prowgen/output/jobs/slack-report-inline/duper/slack-report-inline-duper-master-postsubmits.yaml
  • pkg/image-graph-generator/operator.go
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_images_job_is_configured_for_slack_reporting.yaml
  • pkg/config/load_test.go
  • cmd/check-gh-automation/main.go
  • pkg/config/load.go

Comment thread pkg/prowgen/prowgen.go
Comment on lines +262 to +275
func slackReporterConfig(testSlackConfig *cioperatorapi.SlackReporterConfig) *prowv1.ReporterConfig {
if testSlackConfig == nil {
return nil
}
if slackReporter := info.Config.GetSlackReporterConfigForJobName(jobName, testName, info.Metadata.Variant); slackReporter != nil {
return &prowv1.ReporterConfig{
Slack: &prowv1.SlackReporterConfig{
Channel: slackReporter.Channel,
JobStatesToReport: slackReporter.JobStatesToReport,
ReportTemplate: slackReporter.ReportTemplate,
},
}
jobStatesToReport := testSlackConfig.JobStatesToReport
if len(jobStatesToReport) == 0 {
jobStatesToReport = cioperatorapi.DefaultSlackReporterJobStatesToReport
}
return &prowv1.ReporterConfig{
Slack: &prowv1.SlackReporterConfig{
Channel: testSlackConfig.Channel,
JobStatesToReport: jobStatesToReport,
ReportTemplate: testSlackConfig.ReportTemplate,
},
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 | 🟠 Major | 🏗️ Heavy lift

This migration drops reporter config for generated images jobs.

After narrowing slackReporterConfig to tests[*].reporter_config only, synthesized jobs like the images promotion postsubmit have no inline field that can ever reach this helper. Repos that previously configured Slack reporting for those jobs via .config.prowgen lose that behavior with no replacement.

If that deprecation is intentional, it should be called out explicitly; otherwise this needs a non-test reporter-config source before the old path is removed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/prowgen/prowgen.go` around lines 262 - 275, slackReporterConfig currently
only reads tests[*].reporter_config and thus drops reporter settings for
synthesized/non-test jobs; update slackReporterConfig (and its callers) to
accept and merge a repo-level reporter config (e.g., a second parameter
repoSlackConfig *cioperatorapi.SlackReporterConfig) so that if testSlackConfig
is nil or missing fields you fall back to repoSlackConfig, then apply the
existing default-job-states logic and return the merged prowv1.ReporterConfig;
reference slackReporterConfig, cioperatorapi.SlackReporterConfig and
prowv1.ReporterConfig when locating where to implement the merge.

All features previously configured via .config.prowgen files are now
available inline in ci-operator configuration YAML via the `prowgen:`
field (private, expose, disable_rehearsals, skip_operator_presubmits,
enable_secrets_store_csi_driver) and per-test `reporter_config` /
`disable_rehearsal` fields.

This removes:
- config.Prowgen struct and all associated types/functions from
  pkg/config/load.go (Rehearsals, SlackReporterConfig,
  SkipOperatorPresubmits, LoadProwgenConfig, validateProwgenConfig,
  MergeDefaults, GetSlackReporterConfigForJobName, SkipPresubmits)
- ProwgenInfo.Config field — ProwgenInfo now only contains Metadata
- .config.prowgen loading from ci-operator-prowgen and
  image-graph-generator
- .config.prowgen skip from check-gh-automation

Integration test fixtures migrated from .config.prowgen to inline
ci-operator config equivalents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Prucek Prucek force-pushed the remove-prowgen-config-v2 branch from 55deef5 to a14f0f7 Compare May 13, 2026 08:16
@Prucek Prucek marked this pull request as ready for review May 13, 2026 09:43
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@openshift-ci openshift-ci Bot requested review from droslean and jmguzik May 13, 2026 09:44
@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

@Prucek
Copy link
Copy Markdown
Member Author

Prucek commented May 13, 2026

/hold

@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 May 13, 2026
After removing .config.prowgen support, ProwgenInfo was an empty wrapper
around cioperatorapi.Metadata. Replace all usages with *cioperatorapi.Metadata.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Prucek
Copy link
Copy Markdown
Member Author

Prucek commented May 15, 2026

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 15, 2026
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.

🧹 Nitpick comments (1)
pkg/prowgen/prowgen_test.go (1)

1-1105: ⚡ Quick win

Test coverage gap: images job Slack reporting no longer tested.

The removed "images job is configured for slack reporting" test case validated Slack reporter config for images jobs via the old ProwgenInfo.Config.SlackReporterConfigs path. That test should be replaced with a new one that verifies images jobs respect configSpec.Images.SlackReporterConfig in the inline approach. Without it, regressions in this feature could go undetected.

📋 Add a test case for images job inline Slack config

Add a test case to TestGenerateJobs similar to:

{
    id: "images job with inline slack reporter config",
    config: &ciop.ReleaseBuildConfiguration{
        Images: ciop.ImageConfiguration{
            Items: []ciop.ProjectDirectoryImageBuildStepConfiguration{{}},
            SlackReporterConfig: &ciop.SlackReporterConfig{
                Channel:           "test-channel",
                JobStatesToReport: []prowv1.ProwJobState{prowv1.FailureState},
            },
        },
        PromotionConfiguration: &ciop.PromotionConfiguration{},
    },
    repoInfo: &ciop.Metadata{
        Org:    "organization",
        Repo:   "repository",
        Branch: "branch",
    },
},

Then verify the generated presubmit has base.ReporterConfig populated correctly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/prowgen/prowgen_test.go` around lines 1 - 1105, Add a new test case to
TestGenerateJobs that supplies Images.SlackReporterConfig
(ciop.SlackReporterConfig) in the ReleaseBuildConfiguration and a
PromotionConfiguration so GenerateJobs produces an images presubmit; after
calling GenerateJobs, locate the generated presubmit for the images job in
jobConfig.PresubmitsStatic and assert its Base.ReporterConfig (or equivalent
reporter field produced by GenerateJobs) is non-nil and populated with the
Channel/JobStatesToReport you set. Update TestGenerateJobs (and the test vector
slice) to include this case so GenerateJobs and the images-slack wiring from
Images.SlackReporterConfig are covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pkg/prowgen/prowgen_test.go`:
- Around line 1-1105: Add a new test case to TestGenerateJobs that supplies
Images.SlackReporterConfig (ciop.SlackReporterConfig) in the
ReleaseBuildConfiguration and a PromotionConfiguration so GenerateJobs produces
an images presubmit; after calling GenerateJobs, locate the generated presubmit
for the images job in jobConfig.PresubmitsStatic and assert its
Base.ReporterConfig (or equivalent reporter field produced by GenerateJobs) is
non-nil and populated with the Channel/JobStatesToReport you set. Update
TestGenerateJobs (and the test vector slice) to include this case so
GenerateJobs and the images-slack wiring from Images.SlackReporterConfig are
covered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9a06a72d-a85e-410a-9216-a0f7b9cad5ff

📥 Commits

Reviewing files that changed from the base of the PR and between a14f0f7 and 2b4f143.

📒 Files selected for processing (8)
  • cmd/ci-operator-prowgen/main.go
  • cmd/multi-pr-prow-plugin/server.go
  • pkg/controller/ephemeralcluster/reconciler.go
  • pkg/controller/prpqr_reconciler/prpqr_reconciler.go
  • pkg/prowgen/jobbase.go
  • pkg/prowgen/jobbase_test.go
  • pkg/prowgen/prowgen.go
  • pkg/prowgen/prowgen_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/prowgen/jobbase.go
  • cmd/ci-operator-prowgen/main.go

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Prucek
Copy link
Copy Markdown
Member Author

Prucek commented May 15, 2026

/retest-required

@Prucek
Copy link
Copy Markdown
Member Author

Prucek commented May 18, 2026

/retest-required
/test e2e

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

@Prucek: The following test 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/breaking-changes 8506637 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.

@Prucek
Copy link
Copy Markdown
Member Author

Prucek commented May 18, 2026

/retest-required

@psalajova
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 19, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Prucek, psalajova

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

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. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants