Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

trasc
Copy link

@trasc trasc commented Feb 14, 2024

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

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority area/release-eng Issues or PRs related to the Release Engineering subproject labels Feb 14, 2024
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 14, 2024
@trasc trasc force-pushed the origin-from-pr-branch branch from a2f8603 to f8f4f46 Compare February 14, 2024 16:28
@trasc trasc force-pushed the origin-from-pr-branch branch from f8f4f46 to e39476e Compare February 14, 2024 16:34
@alculquicondor
Copy link
Member

/assign cici37

@alculquicondor
Copy link
Member

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?

@trasc
Copy link
Author

trasc commented Feb 15, 2024

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 15, 2024
@trasc trasc force-pushed the origin-from-pr-branch branch from e39476e to 473b9e6 Compare February 15, 2024 12:25
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 15, 2024
@k8s-ci-robot
Copy link
Contributor

[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

@trasc trasc force-pushed the origin-from-pr-branch branch from 473b9e6 to 7e22c05 Compare February 15, 2024 12:26
@alculquicondor
Copy link
Member

@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.

@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 16, 2024
@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 15, 2024
@xmudrii
Copy link
Member

xmudrii commented Jun 17, 2024

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

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jun 17, 2024
@mimowo
Copy link

mimowo commented Sep 6, 2024

The PR seems stuck in review for a while now, but it provides a ground work for #3746. @trasc would it be possible to tidy, minimize the changes in this PR for the ease of reviewing and merging it?

@trasc
Copy link
Author

trasc commented Sep 10, 2024

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

@BenTheElder
Copy link
Member

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.

@trasc trasc force-pushed the origin-from-pr-branch branch from bd78a01 to caa1527 Compare September 11, 2024 14:21
@trasc
Copy link
Author

trasc commented Sep 11, 2024

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 trasc force-pushed the origin-from-pr-branch branch from caa1527 to 9c1515a Compare September 11, 2024 14:30
Get the number of the origin PR for cherry-picks from the PR's
branch name instead of 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.
@trasc trasc force-pushed the origin-from-pr-branch branch from 9c1515a to 36b6ca5 Compare September 12, 2024 07:46
@trasc trasc force-pushed the origin-from-pr-branch branch from 36b6ca5 to 35981e7 Compare September 12, 2024 09:11
@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-priority release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants