prowgen: generate stricter branch: stanzas for presubmits#2136
Conversation
|
/hold |
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.
ff8047a to
560ec91
Compare
stevekuznetsov
left a comment
There was a problem hiding this comment.
Can we get a unit test for this?
@stevekuznetsov hm, do you have a specific one in mind? |
stevekuznetsov
left a comment
There was a problem hiding this comment.
I was thinking something at a lower level than the full fixture-based thing but whatever
/lgtm
/hold cancel
|
[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 |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@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. |
In the past, we considered any
$branch$suffixa feature branch of"base" CI branch (e.g. PRs to
master-nextwould receive presubmitsfrom
masterconfig). We need to make this convention stricter to notbreak on
4.10, because the current convention means thatrelease-4.10is a feature branch forrelease-4.1.All generated presubmits now have two items in their
branches:stanza.One item that matches exactly the branch (
^branch$), just likepostsubmits have, and one item that matches branches with
$base-prefix. Practically this means that we enforce exactly the
-separatorfor a branch to be considered a feature branch.