Add explicit branch protection for openshift/origin active branches - #82281
Add explicit branch protection for openshift/origin active branches#82281redhat-chai-bot wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: redhat-chai-bot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[REHEARSALNOTIFIER] Note: If this PR includes changes to step registry files ( |
|
/hold I don't think this is right |
|
Thanks for the feedback @smg247 — could you elaborate on what you think is incorrect here? Happy to adjust the approach. For context: the goal is to ensure that the second-stage pipeline-controlled e2e jobs (the Is the concern about:
|
|
@redhat-chai-bot: The following test 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughBranch protection configuration for ChangesOrigin branch protection
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds explicit
branch-protectionconfiguration foropenshift/origin's active branches (main,release-4.21throughrelease-5.1) in the Prow config.Problem
Origin's
_prowconfig.yamlhas nobranch-protectionsection — it relies entirely on the org-wideprotect-tested-repos: truedefault. Combined with the global Tide settingfrom-branch-protection: true(which derives required CI contexts from GitHub branch protection), this means the second-stage pipeline-controlled e2e jobs are not listed as required status checks. If the pipeline controller ever fails to trigger them, PRs can merge silently without any e2e testing.This was observed on release branches where PRs merged without any e2e jobs running (see openshift/origin#31353, openshift/origin#31406).
Fix
Adds a
branch-protectionsection that explicitly lists all required CI contexts for each active branch:First-stage (5 jobs,
always_run: true):ci/prow/go-verify-deps,ci/prow/lint,ci/prow/unit,ci/prow/verify,ci/prow/verify-depsSecond-stage (15 jobs,
always_run: false+optional: false, pipeline-controlled):ci/prow/e2e-aws-csi,ci/prow/e2e-aws-jenkins,ci/prow/e2e-aws-ovn-fips,ci/prow/e2e-aws-ovn-image-registry,ci/prow/e2e-aws-ovn-microshift,ci/prow/e2e-aws-ovn-microshift-serial,ci/prow/e2e-aws-ovn-serial,ci/prow/e2e-gcp-csi,ci/prow/e2e-gcp-ovn,ci/prow/e2e-gcp-ovn-builds,ci/prow/e2e-gcp-ovn-image-ecosystem,ci/prow/e2e-gcp-ovn-upgrade,ci/prow/e2e-metal-ipi-ovn-ipv6,ci/prow/e2e-vsphere-ovn,ci/prow/e2e-vsphere-ovn-upiAll 6 active branches share the identical set of 20 required contexts.
Excluded:
verify-image-manifest-lists— despitealways_rundefaulting to true, it setsrun_if_changed(conditional trigger). Requiring a conditional context in branch protection would block every PR that doesn't touch its trigger files.Also adds
required_pull_request_reviews.required_approving_review_count: 1for all active branches.Related
@smg247 requested in Slack thread
Summary by CodeRabbit
openshift/origin’smainandrelease-4.21throughrelease-5.1branches.