prowgen: generate stricter branch: stanzas for presubmits#2199
Conversation
In the past, we considered any `$branch$suffix` a feature branch of "base" CI branch (e.g. PRs to `master-next` would receive presubmits from `master` config). We need to make this convention stricter to not break on `4.10`, because the current convention means that `release-4.10` is a feature branch for `release-4.1`. All generated presubmits now have two items in their `branches:` stanza. One item that matches exactly the branch (`^branch$`), just like postsubmits have, and one item that matches branches with `$base-` prefix. Practically this means that we enforce exactly the `-` separator for a branch to be considered a feature branch.
Instead of bailing out on multiple presubmits, iterate over them and try to find a branch name that is a "simple name" after stripping regex decoration.
452a0ca to
24f0d93
Compare
|
/hold |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: petr-muller, stevekuznetsov 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 |
|
/hold cancel |
|
@petr-muller: 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/test-infra repository. I understand the commands that are listed here. |
|
/test e2e |
branch:stanzas for presubmitsReintroduce #2136 that needed to be
reverted because pj-rehearse was unable to handle the new presubmit shape. I
regenerated the pj-reharse test data to reflect the change in Prowgen and
therefore reproduce the pj-rehearse problem. Then I fixed pj-rehearse by
processing all
Brancheritems in a presubmit and extracting a "simple name"from what is potentially a regex. If at least one branch name is successfully
extracted, it is used for rehearsal.
Resolves: DPTP-2414
Doc update: #2199
o/release update: openshift/release#20738