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

improve PR reviews #5616

Merged
merged 2 commits into from
Aug 2, 2019
Merged

improve PR reviews #5616

merged 2 commits into from
Aug 2, 2019

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Jul 1, 2019

What it does

I want to start working on improving our review process. We have many PRs and I feel being a bottleneck in the process when many things can be checked without me. This PR proposes:

  • the PR template with a checklist which should be filled in before a PR can be merged. It does not matter by whom (contributor or reviewers).
  • more strict rules on approves to make sure that testing and design validation gets higher priority than human linting of empty lines. It should also make it easier for reviewers to judge whether some aspects already reviewed and improve knowledge sharing by nudging developers to test and review design.

Rendered PR guidelines

How to test

Review whether something missing, too strict or unnecessary in the proposed review checklist

Review checklist

  • as an author, I have thoroughly tested my changes and carefully reviewed following the review guidelines

Reminder for reviewers

.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
@tsmaeder
Copy link
Contributor

tsmaeder commented Jul 1, 2019

I know it's a lot of work for you doing all those reviews, but I think it has served us well, so far. You have made sure the architectural integrity has been preserved. I fear the "design validation" could start to suffer. It's always hard to tell someone to start over when they've invested 2 weeks on the implementation. I think doing threads like this one https://spectrum.chat/theia/dev/how-should-we-go-about-register-monaco-commands-used-by-vs-code-extensions~2c74f56c-2d24-4f21-9db6-8041f0e861c9 will help with validating a design before we get too invested in them.

.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
@akosyakov akosyakov force-pushed the ak/pr_template branch 2 times, most recently from 9aaf72e to 37db60a Compare July 2, 2019 09:59
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

Very nice initiative 👍 , I have added a few remarks on typos.

.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
@akosyakov
Copy link
Member Author

Please have a look again. I've tried to address all comments and did following changes:

  • beginning of the review checklist clarifies responsibilities of an author and reviewers
  • following points are ordered according to the importance, starting from testing and design checking and finishing with proper git history
  • inapplicable items should be just marked as completed as well, crossing them out is big effort with the GH UI

@akosyakov
Copy link
Member Author

I know it's a lot of work for you doing all those reviews, but I think it has served us well, so far. You have made sure the architectural integrity has been preserved. I fear the "design validation" could start to suffer. It's always hard to tell someone to start over when they've invested 2 weeks on the implementation. I think doing threads like this one https://spectrum.chat/theia/dev/how-should-we-go-about-register-monaco-commands-used-by-vs-code-extensions~2c74f56c-2d24-4f21-9db6-8041f0e861c9 will help with validating a design before we get too invested in them.

Agree that contributors should start discussions and open PRs early even if they are incomplete in order to verify the design first.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

Thank you for putting all this together! 👍

@benoitf
Copy link
Contributor

benoitf commented Jul 4, 2019

it would be great to use https://www.conventionalcommits.org as well

@akosyakov
Copy link
Member Author

akosyakov commented Jul 4, 2019

@benoitf let's discuss it next dev meeting?

The goal of this PR to make existing review expectations clear.

Also @benoitf had some good points in #5622 (comment). I try to summarise here:

  • the PR should be minimal as possible or at least make unnecessary clean ups as separate commits
  • description should be complete
  • such review checklist can be long

Regarding the last point. It looks already long to me as well. I still think we should have it to make it clear about expectations in order to help new contributors to know what to look for. Maybe we better to add Reviewing Pull Request guide as a separate document and here have a short checklist like:

Review checklist

  • as an author, I have thoroughly tested my changes and carefully reviewed in accordance with [the review guideline](a link to guide here).
  • each approve has supporting comments in accordance with [the review guideline](a link to guide here).
    • the approve without a comment should be dismissed

@benoitf
Copy link
Contributor

benoitf commented Jul 4, 2019

@akosyakov sure I don't want to hijack the thread, let's discuss it on dev meeting

@akosyakov akosyakov added the quality issues related to code and application quality label Jul 8, 2019
@akosyakov akosyakov force-pushed the ak/pr_template branch 3 times, most recently from e44228a to 73229b2 Compare July 18, 2019 13:52
@akosyakov
Copy link
Member Author

Can we remove them and have a general section on how to do code reviews? Or is there a template for code reviews as well?

I've extracted a new document on how to collaborate and review PRs. The PR template is short now and references this document.

@akosyakov akosyakov force-pushed the ak/pr_template branch 2 times, most recently from a2bdb69 to 5414a3b Compare July 18, 2019 15:16
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

The changes look good to me :)
I'm glad we took steps in order to improve the review process and make it easier
for authors as well as reviewers and document our process.

Copy link
Member

@thegecko thegecko left a comment

Choose a reason for hiding this comment

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

Looks good, I've suggested a bunch of minor grammar amendments

doc/pull-requests.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
doc/pull-requests.md Outdated Show resolved Hide resolved
doc/pull-requests.md Outdated Show resolved Hide resolved
doc/pull-requests.md Outdated Show resolved Hide resolved

<a name="reverting-pr"></a>
- [1.](#reverting-pr) If a PR causes regressions after landing
then an author has 2 days to resolve them after that a PR has to be reverted.
Copy link
Member

Choose a reason for hiding this comment

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

has 2 days

How will this be managed?

Copy link
Member Author

Choose a reason for hiding this comment

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

We will ask an author to look into a fix if there is no response and we don't have time to fix it ourself then we revert it. As it was done here: #5770

Copy link
Member Author

Choose a reason for hiding this comment

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

Also if an author is responsive and trying to fix, but we keep receiving bug reports from users as it was the case with SCM PR, then we will revert everything and wait for the better PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think we need to rephrase it somehow to make it more clear?

doc/pull-requests.md Outdated Show resolved Hide resolved
doc/pull-requests.md Outdated Show resolved Hide resolved
doc/pull-requests.md Outdated Show resolved Hide resolved
@akosyakov
Copy link
Member Author

@thegecko thank for looking at it, I've applied your suggestions

@akosyakov
Copy link
Member Author

@marcdumais-work @svenefftinge please have a look whether you happy with the current state

## Reviewing

<a name="reviewing-template"></a>
- [1.](#eviewing-template) Reviewers should check that a PR has a [proper description](#pr-template).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: also make it clear that the commit(s) should have a proper description (at minimum equivalent to What it does from the PR template. Other info from filled-in template could be nice-to-have as well). This is missed sometimes and makes it harder to understand what a commit does without digging-in the code.

Copy link
Contributor

@marcdumais-work marcdumais-work Jul 29, 2019

Choose a reason for hiding this comment

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

Maybe this (requirement to have meaningful commit message) would fit better in the "review checklist" section, around points number 8 / 9

Copy link
Member Author

Choose a reason for hiding this comment

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

@marcdumais-work i think it should go to review checklist, could you suggest wording.

Also @benoitf suggested to use conventional commits. I think it is a good idea in the sense that we should automate as much as possible from this checklist. With conventional commits we will need only ask to provide proper commit messages and then we can generate changelogs from them. I know that electon follow such approach. It could be worth to look into after landing this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

could you suggest wording.

  • 10. Each commit has meaningful title and a body that explains what it does. One can take inspiration from the "what it does" section from the PR.

Also @benoitf suggested to use conventional commits. [...] It could be worth to look into after landing this PR.

👍

Copy link
Contributor

@marcdumais-work marcdumais-work left a comment

Choose a reason for hiding this comment

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

Added a suggestion about meaningful commit message for consideration.
Very nice, thanks for putting this together @akosyakov

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov
Copy link
Member Author

pinged Sven offline, he said that he is fine to follow it, merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality issues related to code and application quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants