-
Notifications
You must be signed in to change notification settings - Fork 260
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
Conversation
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 |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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..
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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>
d995c15
to
5554f41
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
* 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. |
There was a problem hiding this comment.
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:
- Splitting to incremental small PRs instead of a full feature PR
- Interactive rebase (git rebase -i) before PR is getting merged, so it won’t look like a list of useless titles
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with /lifecycle rotten |
/remove-lifecycle rotten |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. /close |
@kubevirt-bot: Closed this PR. In response to this:
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. |
/reopen |
@ShellyKa13: The following tests failed, say
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. |
Rotten issues close after 30d of inactivity. /close |
@kubevirt-bot: Closed this PR. In response to this:
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. |
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: