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

217: Enforce check on number of required reviewers #364

Closed
wants to merge 5 commits into from

Conversation

rwestberg
Copy link
Member

@rwestberg rwestberg commented Jan 17, 2020

Hi all,

Please review this change that allows Reviewers of a PR to override the default number of required reviews as configured in the jcheck configuration file.

Best regards,
Robin

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Issue

SKARA-217: Enforce check on number of required reviewers

Approvers

  • Erik Helin (ehelin - Reviewer)

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 17, 2020

👋 Welcome back rwestberg! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 17, 2020

Webrevs

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Jan 17, 2020

In addition to allowing a reviewer to increase the required number of reviewers, which is the use case described in the Enhancement request, this will allow a reviewer to reduce the number of required reviewers below the minimum set in .jcheck/conf, including setting it to 0, right? Is this what we want?

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Jan 17, 2020

One more question: If I increase the number of required reviewers to 2, does that mean both have to have the Reviewer role? If so, this won't be nearly as useful to us on the openjfx project. I suspect the same is true of many sub-projects in the JDK itself. For example, the policy in the client team is that fixes in general need 2 reviewers, at least one of which must be a "R" reviewer. OpenJFX has a similar policy (except that only "high-impact" fixes need a second reviewer) in that only one of the reviewers needs to be a "R" reviewer.

@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented Jan 20, 2020

Now that #368 has been implemented, I'll update this to support more complex reviewer requirements. Also, it makes sense not to allow relaxing the requirements below what the jcheck configuration specifies.

@nlisker
Copy link

@nlisker nlisker commented Jan 21, 2020

/reviewers <n> [<role>] where <n> is the additional number of required reviewers.

I fear that this will be confusing. I expect that n is the number of reviewers, not the number of additional reviewers.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Jan 21, 2020

I agree with @nlisker. I believe that both the jdk and openjfx projects will set 1 reviewer in the .jcheck/conf file (which must be someone with a Reviewer role), with the common use case to increase that being to bump the required reviewers to 2 or maybe 3 where the additional reviewers don't have a required role. If I want to add a requirement for 2 reviewers, I would expect to be able to type:

/reviewers 2

And the bot would figure out that it means one extra reviewer with no required role in the project. Anything else would be a "nice to have", but I wouldn't want to make it more confusing to do the simple thing.

… requiring a role of "author" or above (i.e. any project member).
edvbld
edvbld approved these changes Jan 22, 2020
Copy link
Member

@edvbld edvbld left a comment

Looks good, particularly the tests!

@openjdk openjdk bot removed the rfr label Jan 22, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Jan 22, 2020

@rwestberg This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

217: Enforce check on number of required reviewers

Reviewed-by: ehelin
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 8 commits pushed to the master branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to do this manually, please merge master into your branch first.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jan 22, 2020
@edvbld
Copy link
Member

@edvbld edvbld commented Jan 22, 2020

/test tier1

@openjdk
Copy link

@openjdk openjdk bot commented Jan 22, 2020

A test job has been started with id: github.com-193500053-364-577162747

@openjdk
Copy link

@openjdk openjdk bot commented Jan 22, 2020

@edvbld your test job with id github.com-193500053-364-577162747 for commits up until 52c4374 has finished.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Jan 22, 2020

Thanks for making the requested update. To check that it matches my understanding, if the default policy as set in .jcheck/conf is 1 reviewer with a role of Reviewer, then I expect the following:

/reviewers 0 -- error
/reviewers 1 -- reset to default (1 reviewer with role of Reviewer in this example)
/reviewers 2 -- num reviewers is now two, one of which must have the role of Reviewer and the other must have the role of Author (or higher)

Is my understanding correct? It seems so in looking at your most recent change, but wanted to double-check.

@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented Jan 22, 2020

Yep, that's correct!

@nlisker
Copy link

@nlisker nlisker commented Jan 22, 2020

Looks good. After this is integrated, when will it take effect? Reviewers need to be notified.

@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented Jan 23, 2020

Will probably deploy it later this week.

@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented Jan 23, 2020

/integrate

@openjdk openjdk bot closed this Jan 23, 2020
@openjdk openjdk bot added integrated and removed ready labels Jan 23, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Jan 23, 2020

@rwestberg The following commits have been pushed to master since your change was applied:

  • 73dda3f: 241: Gradle version plugin should allow a version.txt file
  • 5efaf03: 239: Add link to pull requests to automatically generated webrevs
  • db6fbee: 238: Add link to upstream repository to generated webrevs
  • 633d79f: 237: Add pull request author's full name to generated webrev
  • d206029: 236: Add links to issue in generated webrevs
  • f4cc461: 220: webrev version unknown message
  • f99220d: 235: git-webrev can't handle empty files

Your commit was automatically rebased without conflicts.

Pushed as commit 8b3b386.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 23, 2020

Mailing list message from Robin Westberg on skara-dev:

Changeset: 8b3b386
Author: Robin Westberg <rwestberg at openjdk.org>
Date: 2020-01-23 09:52:16 +0000
URL: https://git.openjdk.java.net/skara/commit/8b3b3860

217: Enforce check on number of required reviewers

Reviewed-by: ehelin

+ bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/CommandWorkItem.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/IntegrateCommand.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestCheckIssueVisitor.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestInstance.java
+ bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java
+ bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersTracker.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/SponsorCommand.java
+ bots/pr/src/test/java/org/openjdk/skara/bots/pr/ReviewersTests.java
! jcheck/src/main/java/org/openjdk/skara/jcheck/JCheck.java
! test/src/main/java/org/openjdk/skara/test/CheckableRepository.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants