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

New PR and commit guidelines #2752

Closed
wants to merge 1 commit into from

Conversation

ShellyKa13
Copy link
Contributor

The new guidelines should help us improve
the review process by having clearer PRs
with better explanations and commits divided
better to smaller parts to tell the reviewer
a story.

This is my take on how the guidelines should be, you are welcome to suggest other guideline, suggest better wording etc..
Your opinion is welcomed!

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jun 14, 2023
CONTRIBUTING.md Outdated
@@ -76,6 +76,10 @@ Maintainers are:
### PR Checklist

Before your PR can be merged it must meet the following criteria:
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! I'm glad we are addressing this issue and I think it's a great idea to update this document. That said, I think we should differentiate between merging criteria (need for documentation, unit tests, etc.) and PR quality guidelines.

I would add these in a separate section and avoid mixing them with the strict merge criteria. Maybe we could also add examples for each one of the fields (for example, I think #2709 would fit nicely as an example for this first point).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to overload the lines but an example can be good.
Regarding putting it in a different section Im not sure cause I do think this should be a criteria before merging a PR not just a quality thing.

CONTRIBUTING.md Outdated
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
* Commits should be split logically with a single clear purpose for each.
* Commits title should be concise and clear while commit message should be as informative as possible.
* New changes done (after review for example) should be squashed to relevant commit.
Copy link
Member

@mhenriks mhenriks Jun 14, 2023

Choose a reason for hiding this comment

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

Until commits are squashed on mainline (and let's not discuss that here), I see no advantage to this. IMO it makes the reviewer's job harder to exactly find what was changed during the review process. Personally would rather have all changes in new commits.

edit: NOT squashed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It depends cause if a second reviewer is going over the PR after more changes were introduced then he will comment on the commit and then in the newer "updates" commit he might see that everything that he invested time on reviewing was already fix or that his review is already unrelevant

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 sure if we go through our PR history the vast majority of PRs were reviewed by a single person. So I'm not sure it makes sense to make the submitters job harder in every case. I say we revisit this if we ever move from squashing main

Copy link
Collaborator

Choose a reason for hiding this comment

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

I can see why this is not trivial... harder to review vs harder to make sense of later
but until we start not squashing I lean towards dropping this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think as long as you are not the first reviewer, this is one of the most important things to change because if you have a lot of new "review updates" commits you simply can't review the PR commit by commit since it is redundant cause stuff you will comment on might be irrelevant in the new update commits.. and I believe when reviewing all changed files and not by commit (especially in big PRs) its not only harder to review but also a potential to miss possible bugs..
If the majority thinks we should drop it then I will, but I still thing the value of squashing is better then how a bit harder it is for the first reviewer to review.
Also you have the comment you commented on the place you asked for a change so you can find if what you asked for was changed accordingly or not so I dont think its so much harder..

Copy link
Member

Choose a reason for hiding this comment

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

If the majority thinks we should drop it then I will,

@ShellyKa13 the burden is on you to convince the majority. Not the other way around. This PR will rot until a significant number of active contributors come forward in support.

Copy link
Member

Choose a reason for hiding this comment

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

I support @ShellyKa13 on this point. This was a principal part of her arguments. The commit log of CDI should be clean and changing the same exact lines in multiple commits introduces noise and makes going back to look at individual commits useless. The thrust of this PR is to "Make git-log readable again".

Copy link
Member

Choose a reason for hiding this comment

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

I think you can compare changes between force-pushes using the github UI so even if a PR author squashes their review comment driven changes into the set of existing commits you can still see only what's been changed since the last round of review.

CONTRIBUTING.md Outdated
@@ -76,6 +76,10 @@ Maintainers are:
### PR Checklist

Before your PR can be merged it must meet the following criteria:
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
* Commits should be split logically with a single clear purpose for each.
* Commits title should be concise and clear while commit message should be as informative as possible.
Copy link
Member

Choose a reason for hiding this comment

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

"As possible" is a pretty high bar, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are welcome to suggest a new wording for this sentence :)

Copy link
Member

Choose a reason for hiding this comment

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

Add a period after informative. End of sentence.

Copy link
Collaborator

@akalenyu akalenyu Jun 15, 2023

Choose a reason for hiding this comment

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

I think we may be able to drop

Commits title should be concise and clear while commit message should be as informative as possible.

I think the idea will get communicated in a softer manner via the previous point

Copy link
Member

Choose a reason for hiding this comment

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

Maybe "the commit message should clearly and completely state the nature and purpose of the changes in the commit"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we may be able to drop

Commits title should be concise and clear while commit message should be as informative as possible.

I think the idea will get communicated in a softer manner via the previous point

I think there is a big difference between how one splits and organizes the commits (the 2nd point) to make sure the title and message of each commit is clear. I have examples in existing PRs for such difference

CONTRIBUTING.md Outdated
@@ -76,6 +76,10 @@ Maintainers are:
### PR Checklist

Before your PR can be merged it must meet the following criteria:
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
* Commits should be split logically with a single clear purpose for each.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Commits should be split logically with a single clear purpose for each.
* Commits split logically with a clear purpose for each.

CONTRIBUTING.md Outdated
@@ -76,6 +76,10 @@ Maintainers are:
### PR Checklist

Before your PR can be merged it must meet the following criteria:
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
* Commits should be split logically with a single clear purpose for each.
* Commits title should be concise and clear while commit message should be as informative as possible.
Copy link
Collaborator

@akalenyu akalenyu Jun 15, 2023

Choose a reason for hiding this comment

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

I think we may be able to drop

Commits title should be concise and clear while commit message should be as informative as possible.

I think the idea will get communicated in a softer manner via the previous point

CONTRIBUTING.md Outdated
@@ -76,6 +76,10 @@ Maintainers are:
### PR Checklist

Before your PR can be merged it must meet the following criteria:
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
* Informative PR Description alongside an overview of the changes, high-level design in case of new feature

If you don't choose to go forward with this, note there's a typo Desciption

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah noted

CONTRIBUTING.md Outdated
* PR Desciption should be informative, explaining what is in it and a high level design in case of new feature
* Commits should be split logically with a single clear purpose for each.
* Commits title should be concise and clear while commit message should be as informative as possible.
* New changes done (after review for example) should be squashed to relevant commit.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can see why this is not trivial... harder to review vs harder to make sense of later
but until we start not squashing I lean towards dropping this

The new guidlines should help us improve
the review process by having clearer PRs
with better explanations and commits divided
better to smaller parts to tell the reviewer
a story.

Signed-off-by: Shelly Kagan <skagan@redhat.com>
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign aglitke for approval. 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

Comment on lines +79 to +81
* Informative PR Description alongside an overview of the changes and a high-level design in case of a new feature
* Commits split logically with a clear purpose.
* Commits title concise and clear while commit message informative stating the nature and purpose of the changes in the commit.
Copy link
Collaborator

@arnongilboa arnongilboa Jun 26, 2023

Choose a reason for hiding this comment

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

You may add

  • Currently our merge policy is squashing all PR commits, so consider:
  1. Splitting to incremental small PRs instead of a full feature PR
  2. Interactive rebase (git rebase -i) before PR is getting merged, so it won’t look like a list of useless titles

@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 24, 2023
@alromeros
Copy link
Collaborator

/remove-lifecycle stale

@kubevirt-bot kubevirt-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 25, 2023
@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 24, 2023
@kubevirt-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kubevirt-bot kubevirt-bot 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 Jan 23, 2024
@alromeros
Copy link
Collaborator

/remove-lifecycle rotten
/retest-required

@kubevirt-bot kubevirt-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 23, 2024
@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 22, 2024
@kubevirt-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kubevirt-bot kubevirt-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 22, 2024
@kubevirt-bot kubevirt-bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label May 22, 2024
@kubevirt-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

@kubevirt-bot
Copy link
Contributor

@kubevirt-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

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-sigs/prow repository.

@alromeros
Copy link
Collaborator

/reopen
I think it's important we eventually merge this

@alromeros alromeros reopened this Jun 21, 2024
@coveralls
Copy link

Coverage Status

coverage: 59.036%. remained the same
when pulling 5554f41 on ShellyKa13:pr-guidelines
into 301f0ab on kubevirt:main.

@kubevirt-bot
Copy link
Contributor

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

Test name Commit Details Required Rerun command
pull-cdi-unit-test 5554f41 link false /test pull-cdi-unit-test
pull-containerized-data-importer-e2e-ceph-wffc 5554f41 link true /test pull-containerized-data-importer-e2e-ceph-wffc
pull-containerized-data-importer-e2e-nfs 5554f41 link true /test pull-containerized-data-importer-e2e-nfs

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

@kubevirt-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

@kubevirt-bot
Copy link
Contributor

@kubevirt-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

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-sigs/prow repository.

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. release-note-none Denotes a PR that doesn't merit a release note. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants