-
Notifications
You must be signed in to change notification settings - Fork 89
2479: PR marked as ready with jcheck error #1714
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
Conversation
👋 Welcome back zsong! A progress list of the required criteria for merging this PR into |
@zhaosongzs This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. 🔍 One or more changes in this pull request modifies files in areas of the source code that often require two reviewers. Please consider if this is the case for this pull request, and if so, await a second reviewer to approve this pull request before you integrate it. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
var onlyReviewersCheckFailed = visitor.errorFailedChecksMessages().stream() | ||
.allMatch(message -> message.contains("Too few 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 looks awkward. Can we extend the Visitor with an explicit method for this instead? The role of the Visitor implementation is to gather the jcheck errors and present them in a way that makes sense to the caller, in this case the pr bot classes.
@@ -72,6 +72,14 @@ List<String> errorFailedChecksMessages() { | |||
return errorFailedChecks.values().stream().flatMap(List::stream).toList(); | |||
} | |||
|
|||
List<String> errorFailedCheckMessagesWithoutReviewersCheck() { |
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 a mouthful. I was thinking something like boolean tooFewReviewers()
.
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.
Do you mean that tooFewReviewers()
should return true when there is only ReviewersCheck Failure?
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.
Or does tooFewReviewers()
return true when there is a ReviewersCheck Failure in the list?
If so, the logic should be like this
var readyToPostApprovalNeededComment = readyForReview && ((!reviewNeeded && visitor.errorFailedChecksMessages().size() == 1 && visitor.tooFewReviewers()) || visitor.errorFailedChecksMessages().isEmpty()) && integrationBlockers.isEmpty() && !statusMessage.contains(TEMPORARY_ISSUE_FAILURE_MARKER);
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.
Right, I didn't think that through and this gets messy and I think it's because we aren't using the right abstraction. Can we just push something like this down to the visitor:
boolean hasErrors(boolean reviewNeeded)
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.
Yes, sounds good
@@ -1470,7 +1470,7 @@ private void checkStatus() { | |||
var commitMessage = String.join("\n", commit.message()); | |||
|
|||
var readyToPostApprovalNeededComment = readyForReview && | |||
(!reviewNeeded || visitor.errorFailedChecksMessages().isEmpty()) && | |||
visitor.hasErrors(reviewNeeded) && |
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.
Shouldn't this be negated?
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.
Thanks for catching it. You are right. I remember I added "!" but Somehow it disappeared...
Thanks for the review! |
Going to push as commit 1107983. |
@zhaosongzs Pushed as commit 1107983. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Currently, when determining if a PR is ready, if the PR doesn't require a review, it also ignores all jcheck failures. Instead, only reviewers check should be ignored in this case.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/skara.git pull/1714/head:pull/1714
$ git checkout pull/1714
Update a local copy of the PR:
$ git checkout pull/1714
$ git pull https://git.openjdk.org/skara.git pull/1714/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1714
View PR using the GUI difftool:
$ git pr show -t 1714
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/skara/pull/1714.diff
Using Webrev
Link to Webrev Comment