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

Policy and criteria for backporting to stable release branches #5137

Merged
merged 3 commits into from
Mar 12, 2021

Conversation

davidvossel
Copy link
Member

This PR adds a document outlining our policy and expectations when it comes to backporting bug fixes to stable release branches. It's important that we as maintainers of the project uphold the policy outlined here so we clearly communicate what fixes are going into our release branches.

Added our policy around release branch backporting in docs/release-branch-backporting.md

Signed-off-by: David Vossel <davidvossel@gmail.com>
Signed-off-by: David Vossel <davidvossel@gmail.com>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Mar 2, 2021
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign davidvossel
You can assign the PR to them by writing /assign @davidvossel in a comment when ready.

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


- **Bug Fix Only:** The backport must be a bug fix and the bug fix must be
first merged into the master branch. The only exception is when a bug only
exists in a stable branch and does not exist in the master branch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be explicit about preferring that a url describing the bug/issue is included in the pr text, and preferably also in the commit message?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the commit messages. These are (most of the time) being backported automatically with a label /cherrypick [release]
If we want bugs to be added to commit messages we probably need to automate this process.
@rmohr what do you think?

Copy link
Member Author

@davidvossel davidvossel Mar 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be explicit about preferring that a url describing the bug/issue is included in the pr text

sure, doesn't the "Detailed Description" section in this doc cover this though?

- **Detailed Description** The backport pull request's description must either
contain a detailed explanation for what the bug fix addresses or contain a
link to such a explanation present in another PR/Issue.

preferably also in the commit message?

This will be harder to enforce. Often bug fixes are split across multiple commits. I don't think we'll be successful in requiring this, but i think it should be encouraged.

Copy link
Contributor

@dhiller dhiller Mar 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would make sense to just add a mention of the issue id or bug url in the release note itself? This would then automatically and directly end up in the release description? Or would that be too much?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer a full URL. I'd assume bug trackers of multiple vendors might be involved, so better to be explicit.

Copy link
Member

@vladikr vladikr Mar 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see neither Kubernetes nor Openstack Nova uses company-specific bug trackers. I can't tell how healthy will be for the project long term.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I wasn't clear. I'm not suggesting KubeVirt to use private bugtrackers. I'm just saying that we can tolerate any kind of private reference tucked in the commit message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it good enough, like david said?

Can we be explicit about preferring that a url describing the bug/issue is included in the pr text

sure, doesn't the "Detailed Description" section in this doc cover this though?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main thing I care about is that backports PRs provide a clear case for why the backport is necessary. That gives us two things.

  1. As a reviewer/approver i can make a judgement call for whether the PR is a bug fix and what functionality it impacts.
  2. Anyone can retroactively trace back the commit to the PR to discover why the bug fix was introduced.

My primary goal here is to ensure that both the defense and reasoning for a backport is transparent. This avoids the cycle where a couple of approvers get together out of band and decide something must be backported without documenting any sort of hint for why the backport is necessary.

I'm probably the primary offender here. This is to protect the project from me :D

So, from my standpoint, the minimum is to have all this info in the PR description. Having full info in a commit message is nice, but like i said previously, difficult to enforce (especially with our cherry-pick plugin). I don't think it's reasonable to ask someone to cherry-pick a PR, then modify the commit messages for whatever is cherry-picked. Instead they should supplement the PR's description with more info if needed for tracking why the PR is being backported.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it good enough, like david said?

Can we be explicit about preferring that a url describing the bug/issue is included in the pr text

sure, doesn't the "Detailed Description" section in this doc cover this though?

It is certainly good enough.

@dhiller
Copy link
Contributor

dhiller commented Mar 5, 2021

FYI @mazzystr

docs/release.md Show resolved Hide resolved
considered. It is the reviewer's and approver's responsibility to uphold this
policy.

- **Bug Fix Only:** The backport must be a bug fix and the bug fix must be
Copy link
Member

@rmohr rmohr Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were a lot of discussions in the past regarding to infra-related changes: It would be very helpful for infra-work and test-stabiliziation PRs, if they can just be done. Without creating somewhere extra issues (if on github, there is no clear opinion if PRs need an issue, I would prefer not, since it is close enough together).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were a lot of discussions in the past regarding to infra-related changes

I'm going to explicitly call out infra changes as being welcome for backporting just to make sure there's no confusion later on.

Without creating somewhere extra issues

yep, makes sense. I think i have reflected that in the doc. I'm not of the opinion that we have to have issues created somewhere for every PR we consider backporting. I think it's enough that we have a policy of ensuring that a reviewer can accurately determine using information within the description (whether links or a text explanation) the purpose of the backport.


- **Bug Fix Only:** The backport must be a bug fix and the bug fix must be
first merged into the master branch. The only exception is when a bug only
exists in a stable branch and does not exist in the master branch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it good enough, like david said?

Can we be explicit about preferring that a url describing the bug/issue is included in the pr text

sure, doesn't the "Detailed Description" section in this doc cover this though?

It is certainly good enough.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 10, 2021
Signed-off-by: David Vossel <davidvossel@gmail.com>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2021
@davidvossel
Copy link
Member Author

To clear up any confusion about what is eligible to be backported, I added some guidelines to the document for how we define a "bug fix".

@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Mar 12, 2021

@davidvossel: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubevirt-e2e-k8s-1.18 c3ecb49 link /test pull-kubevirt-e2e-k8s-1.18

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.

Copy link
Member

@rmohr rmohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 12, 2021
@davidvossel
Copy link
Member Author

we don't need to waste CI resources on this. i'm force merging

@davidvossel davidvossel merged commit 59cecdd into kubevirt:master Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants