release icon indicating copy to clipboard operation
release copied to clipboard

[notes] Rework getting the number of the origin PR for cherry-picks

Open trasc opened this issue 1 year ago • 12 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

Also attempt to get the number of the origin PR for cherry-picks from the PR's branch name besides the commit message.

This way we get the same behavior, using the origin release note if the current one is empty, for the cherry-picks created by the hack/.. script and those created by prow, regardless of the merge strategy used in the project.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

trasc avatar Feb 14 '24 16:02 trasc

/assign cici37

alculquicondor avatar Feb 14 '24 18:02 alculquicondor

Get the number of the origin PR for cherry-picks from the PR's branch name instead of the commit message.

Can it be both?

alculquicondor avatar Feb 14 '24 18:02 alculquicondor

Get the number of the origin PR for cherry-picks from the PR's branch name instead of the commit message.

Can it be both?

If the merge method is "Merge" and found in the commit message the it will be found in the pr's Head.Label. If only found in the commit message, and not in the PR it can be a match over some unrelated string in the commit message body, hence false positive.

trasc avatar Feb 15 '24 12:02 trasc

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: trasc Once this PR has been reviewed and has the lgtm label, please ask for approval from cici37. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

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

k8s-ci-robot avatar Feb 15 '24 12:02 k8s-ci-robot

@puerco WDYT of this proposal? For context, in kubernetes-sigs/kueue we use a similar script as k/k, but additionally we use the prow plugin /cherry-pick. Another fundamental difference is that we also configured squash during merge.

alculquicondor avatar Feb 16 '24 16:02 alculquicondor

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 16 '24 17:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 15 '24 17:06 k8s-triage-robot

/remove-lifecycle rotten @puerco @kubernetes/release-engineering PTAL

xmudrii avatar Jun 17 '24 10:06 xmudrii

The PR seems stuck in review for a while now, but it provides a ground work for https://github.com/kubernetes/release/issues/3746. @trasc would it be possible to tidy, minimize the changes in this PR for the ease of reviewing and merging it?

mimowo avatar Sep 06 '24 10:09 mimowo

@xmudrii @puerco @kubernetes/release-engineering Can we do something to get this moving?

trasc avatar Sep 10 '24 06:09 trasc

Get the number of the origin PR for cherry-picks from the PR's branch name instead of the commit message

Note that not all cherry picks are created with the script and don't have the generated branch names, so we should only do this if the branch fits the pattern.

BenTheElder avatar Sep 10 '24 14:09 BenTheElder

Get the number of the origin PR for cherry-picks from the PR's branch name instead of the commit message

Note that not all cherry picks are created with the script and don't have the generated branch names, so we should only do this if the branch fits the pattern.

We can fully preserve the old behavior and just add extracting the original pr number from the branch name.

trasc avatar Sep 11 '24 14:09 trasc