-
Notifications
You must be signed in to change notification settings - Fork 111
Conversation
pull_request_template.md
Outdated
1. Open PRs preemptively (i.e. whenever you start working on it), especially for the case of large tasks | ||
2. Create PRs with a healthy amount of description. A PR without a description will not be approved | ||
3. PR names should adhere to the following standard: "(affected package(s)): description". examples: "storage: fix panic on hasherstore put", "network, storage, p2p: integrate capabilities api". if many (many) packages are affected, use "all" instead of individual names | ||
3. Mark the PR with a `ready for review` label once it is. If a second(or more) round of reviews is required, remove the `ready for review` label and add a `ready for another review` label |
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.
use "in progress" inbetween
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.
TBH i find the in progress
label redundant and never use it. if the package is not marked ready for review it means it is in progress and we should not review it. not sure why we need a label for every permutation of the universe
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 it is first "ready for review" and then needs some more work I change it to "in progress" while it's not ready for review anymore. I think this protocol makes it more clear when to re-review PRs.
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 @nolash says it is in order for a second reviewer to judge if submitter works on fixes atm.
pull_request_template.md
Outdated
2. Create PRs with a healthy amount of description. A PR without a description will not be approved | ||
3. PR names should adhere to the following standard: "(affected package(s)): description". examples: "storage: fix panic on hasherstore put", "network, storage, p2p: integrate capabilities api". if many (many) packages are affected, use "all" instead of individual names | ||
3. Mark the PR with a `ready for review` label once it is. If a second(or more) round of reviews is required, remove the `ready for review` label and add a `ready for another review` label | ||
4. Never(!) force-push a PR once reviews have started! This has the unfortunate side-effect of resolving/outdating previous comments over the PR |
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.
so rebase only in the end?
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.
ideally yes. and ideally you shouldn't need to rebase at all. i'm willing to reconcile with adding "rebasing while the pr is under review is to be done only if requested by reviewers"
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.
this is more complicated. if the PR review is a longer process, it is super important to keep it rebased, since it can bring up incompatibilities etc.
Another reason not to keep review process too long and PRs to be small.
@janos you usually do a merge what do u think is the best way?
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.
This point is fine as a warning, even I doubt that it can be always applied, but at least it would minimize force pushing. As we cannot restore old history after force pushing, I do not see what we can do when that happens. It has a bit of conflict with point number 1. With preemptive PRs, we are encouraging early comments, which means that this point would be activated very early.
I think that rebasing and force pushing breaks history for other clones, especially when conflicts need to be resolved afterwards repeatedly. Having a merge commit allows better automatic conflict resolution by not loosing commits and history. But, I have nothing against force pushing as it provides cleaner history. It is completely ok to do force push for me, as it is a usual operation on swarm codebase. I would prefer forbidding force pushing completely, as we are squashing commits at the end, but that would be too drastic.
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.
Should we encourage development in parallell temporary files where possible? That way we have less issues with rebase.
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.
My idea is to avoid force pushing as much as possible, that is why I added the reservations that the reviewer can ask to do so once the review process has started.
Rebasing brings a plethora of problems ranging from regressions due to human error while rebasing to github quirks that resolve comments and other branches that break while rebasing. These thing happen to us all the time and I would like to reduce the number of points of possible failures. We shouldn't rebase unless another branch contains a changeset that is needed in the current one we're working on. If master changes in the meanwhile when we work on the PR - it does not infer that a rebase is in need. If our CI runs a merge
build and not a push
build the incompatibilities should pop up and be shown on the CI build.
I agree that this point somehow is in conflict with point 1, but the idea is to give guidelines to contributors while allowing core members a bit more flexibility according to fluctuating needs. There's no silver bullet here but we can at least minimize error by new and external contributors.
@nolash you are welcome to PR or start a document on development best practices. I really don't wanna make a PR template into a gocode best practices knowledge-base
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.
@acud my point is not a go-specific one. Conflicts would happen in any kind of source. By keeping separate temporary files, rebase is even less likely. This is also aligned with your announced goal:
My idea is to avoid force pushing as much as possible
pull_request_template.md
Outdated
3. Mark the PR with a `ready for review` label once it is. If a second(or more) round of reviews is required, remove the `ready for review` label and add a `ready for another review` label | ||
4. Never(!) force-push a PR once reviews have started! This has the unfortunate side-effect of resolving/outdating previous comments over the PR | ||
5. It is up to the reviewer to resolve a comment | ||
6. A comment does not account as a blocker to merging a PR unless explicitly mentioned in the comment: `BLOCKER: .....` |
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.
👍
pull_request_template.md
Outdated
6. A comment does not account as a blocker to merging a PR unless explicitly mentioned in the comment: `BLOCKER: .....` | ||
7. When reviewing - please make the comment on a line that would constitute a change when addressed - this will resolve the comments automatically once addressed | ||
8. Once you address a review comment with a code change - no need to comment on it with "done"/"ok"/:+1: - this generates redundant email notifications (to those who have them enabled) and once you push git will automatically resolve/outdate the comment and the reviewer could then mark the comment as resolved without any further taxation of reading even more comments on the PR | ||
9. We are all here to ship working software with a continuous attention to technical excellence and good design (https://agilemanifesto.org/principles.html); not to make each other's lives miserable. Thus, we ask you to take PR reviews as a process of reflection rather than a fencing duel(!) |
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'd like to add something like "in difference of opinion focus on the arguments." and perhaps "matters of pure taste should be the discretion of thte author"
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.
can you please write the complete suggested bulletpoint?
pull_request_template.md
Outdated
9. We are all here to ship working software with a continuous attention to technical excellence and good design (https://agilemanifesto.org/principles.html); not to make each other's lives miserable. Thus, we ask you to take PR reviews as a process of reflection rather than a fencing duel(!) | ||
10. Please reference related issues that should be closed with the most favorite keyword of your choice - https://github.com/blog/1506-closing-issues-via-pull-requests | ||
11. Always use the `Squash` method of merging the PR to the branch | ||
12. Always tidy up the commit message when using squash - having a very long commit message does not help anyone. Summerize the work done in bullet points and only then merge |
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.
how about "including trivial intermediate commit messages" - sometimes maybe it's not a dumb idea to have a bit of a log.
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.
TBH in the context of big pull requests, intermediate commit messages are redundant because the underlying diff is very difficult to compare anyway. in the case of small PRs intermediate commits are trivial. i'm willing to reconcile with adding a small request to include intermediate commit message only in the case that they are very important
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.
big pull requests
But there shouldn't be any, right? ;)
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.
Yep. especially on planet nolash
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.
Overall looks good to me.
I would add:
|
@acud is it a conscious choice that you have omitted encouragement to keep the PR deltas small? |
How about this? @acud |
...though in case of wholly external contributors this is not possible, I guess. |
@zelig @nolash I have nothing against your propositions but may I remind you that these guidelines should appear in the following (tiny) textbox: |
Adds a PR template to the repo for the welfare of all our contributors and reviewers alike