Validate main promotion: Prow includedBranches + periodic current-release, require release-X disabled only when repo has main/master#76343
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepsm007 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 |
98da76c to
2fb53df
Compare
…ease, require release-X disabled only when repo has main/master
2fb53df to
2eb8eb8
Compare
|
[REHEARSALNOTIFIER] Note: If this PR includes changes to step registry files ( Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@deepsm007: all tests passed! 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. |
CI fails when an image tag (e.g.
ocp/4.23) is promoted from more than one branch (e.g. bothmainandrelease-4.23). Each promotion target must have exactly one promoting branch: main should be the current development branch (e.g. 4.22) and only release-X should promote to X. This PR adds a validation check so we catch misconfigurations in CI instead of at runtime.What
make check-validate-main-promotion(wired intomake check) runshack/validate-main-promotion-guard.py.periodic-prow-auto-config-brancherinci-operator/jobs/infra-periodics.yaml(--current-release=), same as config-brancher.core-services/prow/02_config/{org}/{repo}/_prowconfig.yamlhasopenshift-{current}orrelease-{current}in a tide query’sincludedBranches(i.e. they have that release as the development branch).Rules enforced
ocp/{current}andocp-private/{current}-priv. They must not be disabled.*-release-4.22.yaml,*-openshift-4.22.yaml) must have promotion disabled — but only for repos that also have a main or master config. Repos that only have versioned configs (e.g. etcd with onlyopenshift-4.22) are excluded so they can keep promoting from that branch.Result
--current-release(and Prow’sincludedBranches) need to be updated; the validator adapts to 4.22, 4.23, 5.0, etc.make checkbefore merge.