Skip to content

prowgen: generate stricter branch: stanzas for presubmits#2199

Merged
openshift-ci[bot] merged 3 commits into
openshift:masterfrom
petr-muller:stricter-feature-branches-w-rehearsals
Aug 3, 2021
Merged

prowgen: generate stricter branch: stanzas for presubmits#2199
openshift-ci[bot] merged 3 commits into
openshift:masterfrom
petr-muller:stricter-feature-branches-w-rehearsals

Conversation

@petr-muller
Copy link
Copy Markdown
Member

@petr-muller petr-muller commented Jul 30, 2021

  • prowgen: generate stricter branch: stanzas for presubmits
  • prowgen: regenerate pj-rehearse test data
  • pj-rehearse: handle presubmits with multiple branches

Reintroduce #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 Brancher items 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

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.
@openshift-ci openshift-ci Bot requested review from bbguimaraes and droslean July 30, 2021 14:02
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 30, 2021
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.
@petr-muller
Copy link
Copy Markdown
Member Author

/hold
Needs regenerate/merge openshift/release#20738 after merge

@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 Jul 30, 2021
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jul 30, 2021

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [petr-muller,stevekuznetsov]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@petr-muller
Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 3, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 3, 2021

@petr-muller: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
ci/prow/breaking-changes 24f0d93 link /test breaking-changes

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/test-infra repository. I understand the commands that are listed here.

@petr-muller
Copy link
Copy Markdown
Member Author

/test e2e

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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants