Skip to content

Prevent aggregated, informing jobs#788

Open
bradmwilliams wants to merge 1 commit into
openshift:mainfrom
bradmwilliams:prevent-optional-aggregated-jobs
Open

Prevent aggregated, informing jobs#788
bradmwilliams wants to merge 1 commit into
openshift:mainfrom
bradmwilliams:prevent-optional-aggregated-jobs

Conversation

@bradmwilliams

@bradmwilliams bradmwilliams commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Due to the inherent cost of "Aggregated Prow Jobs", the implementation expects that any aggregatedProwJob must be defined as a Blocking Job to be properly tracked by release-payload-controller.

This PR adds a validation check to ensure that any aggregatedProwJob does not also specify optional: true. These checks run automatically on any PR's, in the openshift/release repo, to ensure compliance before merging.

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Summary by CodeRabbit

  • Bug Fixes
    • Improved configuration validation to catch invalid combinations where an optional verification job is also configured as an aggregated job.
    • Reduced the chance of misconfigured release settings by surfacing clearer validation errors before processing.

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: adca2edd-43ac-427f-aa52-79dcf5fe1149

📥 Commits

Reviewing files that changed from the base of the PR and between 74edc96 and b8c6319.

📒 Files selected for processing (2)
  • cmd/release-controller/config_validate.go
  • cmd/release-controller/config_validate_test.go

📝 Walkthrough

Walkthrough

This PR adds a new validation function, validateOptionalAggregatedJobs, which checks release configs for verification jobs that are simultaneously marked Optional and have a non-nil AggregatedProwJob. This validation is wired into validateConfigs, and a corresponding table-driven test is added.

Changes

Optional/AggregatedProwJob validation

Layer / File(s) Summary
Validation logic and integration
cmd/release-controller/config_validate.go
Adds validateOptionalAggregatedJobs to detect verification jobs with conflicting Optional and AggregatedProwJob settings, and calls it from validateConfigs to append resulting errors.
Validation tests
cmd/release-controller/config_validate_test.go
Adds TestValidateOptionalAggregatedJobs covering valid and invalid combinations across single and multiple release configs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit checked each prow job twig,
"Optional and aggregated? Too big!"
With hop and a test, I sealed the gate,
No contradictory configs escape my fate.
🐇✅

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title points to the core change: preventing aggregated jobs from being treated as optional/informing.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@bradmwilliams

Copy link
Copy Markdown
Collaborator Author

/hold
Need to cleanup all existing, non-compliant, files in openshift/release before this goes live

@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 Jun 30, 2026
@openshift-ci openshift-ci Bot requested review from AlexNPavel and hoxhaeris June 30, 2026 19:59
@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bradmwilliams

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 Jun 30, 2026
@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@bradmwilliams: all tests passed!

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.

@bradmwilliams

Copy link
Copy Markdown
Collaborator Author

Depends on: openshift/release#81330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant