From gli at openjdk.java.net Wed Jun 1 08:21:30 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 08:21:30 GMT Subject: RFR: 1434: Testissue#addLink doesn't generate the right relationship for the reversed link In-Reply-To: References: Message-ID: On Tue, 31 May 2022 17:23:07 GMT, Erik Joelsson wrote: >> Hi all, >> >> This patch fixes the reversed link type. For example, when adding a `csr for` link at `ISSUE-1` which links to `ISSUE-2`, the `ISSUE-2` should have a reversed link `csr of` instead of the same link type `csr for`. >> >> The reversed relations are shown below: >> - `backported by` and `backport of` >> - `csr for` and `csr of` >> - `blocks` and `is blocked by` >> - `clones` and `is cloned by` >> >> And the `duplicates` link type doesn't have the reversed linke type like `duplicated by` now. So we should use the link type `duplicates` instead of `duplicated by` in the test cases so that the tests can be closer to the actual situation. >> >> Thanks for taking the time to review. >> >> Best Regards, >> -- Guoxiong > > Marked as reviewed by erikj (Lead). @erikj79 Thanks for the review. ------------- PR: https://git.openjdk.java.net/skara/pull/1325 From gli at openjdk.java.net Wed Jun 1 08:21:31 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 08:21:31 GMT Subject: Integrated: 1434: Testissue#addLink doesn't generate the right relationship for the reversed link In-Reply-To: References: Message-ID: On Sat, 28 May 2022 08:33:36 GMT, Guoxiong Li wrote: > Hi all, > > This patch fixes the reversed link type. For example, when adding a `csr for` link at `ISSUE-1` which links to `ISSUE-2`, the `ISSUE-2` should have a reversed link `csr of` instead of the same link type `csr for`. > > The reversed relations are shown below: > - `backported by` and `backport of` > - `csr for` and `csr of` > - `blocks` and `is blocked by` > - `clones` and `is cloned by` > > And the `duplicates` link type doesn't have the reversed linke type like `duplicated by` now. So we should use the link type `duplicates` instead of `duplicated by` in the test cases so that the tests can be closer to the actual situation. > > Thanks for taking the time to review. > > Best Regards, > -- Guoxiong This pull request has now been integrated. Changeset: 925bd2b8 Author: Guoxiong Li URL: https://git.openjdk.java.net/skara/commit/925bd2b8de1ea4a86d6b1e1815f7fd194ee13624 Stats: 13 lines in 3 files changed: 5 ins; 0 del; 8 mod 1434: Testissue#addLink doesn't generate the right relationship for the reversed link Reviewed-by: erikj ------------- PR: https://git.openjdk.java.net/skara/pull/1325 From gli at openjdk.java.net Wed Jun 1 08:30:21 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 08:30:21 GMT Subject: RFR: SKARA-1119: A bot should remind a PR author not to force push [v2] In-Reply-To: References: Message-ID: > Hi all, > > This patch adds a suggestion comment to the PR when the developers force-push the branch each time. Because I can't find the related rest api of the GitLab so I only implement it for GitHub. > > Thanks for taking the time to review. > > Best Regards, > -- Guoxiong Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: Fix suggestion comment. ------------- Changes: - all: https://git.openjdk.java.net/skara/pull/1328/files - new: https://git.openjdk.java.net/skara/pull/1328/files/d4717ebf..c68c9680 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=skara&pr=1328&range=01 - incr: https://webrevs.openjdk.java.net/?repo=skara&pr=1328&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/skara/pull/1328.diff Fetch: git fetch https://git.openjdk.java.net/skara pull/1328/head:pull/1328 PR: https://git.openjdk.java.net/skara/pull/1328 From gli at openjdk.java.net Wed Jun 1 08:30:22 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 08:30:22 GMT Subject: RFR: SKARA-1119: A bot should remind a PR author not to force push [v2] In-Reply-To: References: Message-ID: <2eMuV0oaGCyjSRQbMU9a9xEVHYW_mm4mKO0fOuyvm7A=.cd3b4797-d901-4249-9e02-94df67409b05@github.com> On Tue, 31 May 2022 18:16:13 GMT, Erik Joelsson wrote: >> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix suggestion comment. > > bots/notify/src/main/java/org/openjdk/skara/bots/notify/prbranch/PullRequestBranchNotifier.java line 39: > >> 37: Please don't rebase and force-push to your branch of this PR because it invalidates previous review comments. \ >> 38: To keep track of your changes incrementally, you only need to merge the target branch (optionally), \ >> 39: commit your new change and push normally. The bot can squash them as a single commit when integrating. > > Suggestion: > > Please do not rebase or force-push to an active PR as it invalidates existing review comments. \ > All changes will be squashed into a single commit automatically when integrating. \ > See [OpenJDK Developers? Guide](https://openjdk.java.net/guide/#working-with-pull-requests). Fixed ------------- PR: https://git.openjdk.java.net/skara/pull/1328 From gli at openjdk.java.net Wed Jun 1 08:34:37 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 08:34:37 GMT Subject: RFR: 1410: The reply message of the 'reviewers' command should be more accurate [v2] In-Reply-To: References: Message-ID: > Hi all, > > This trivial patch fixes the reply message of the `reviewers` command. > > Thanks for taking the time to review. > > Best Regards, > -- Guoxiong Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: Fix comment. ------------- Changes: - all: https://git.openjdk.java.net/skara/pull/1326/files - new: https://git.openjdk.java.net/skara/pull/1326/files/0c2a7024..9aa54824 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=skara&pr=1326&range=01 - incr: https://webrevs.openjdk.java.net/?repo=skara&pr=1326&range=00-01 Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/skara/pull/1326.diff Fetch: git fetch https://git.openjdk.java.net/skara pull/1326/head:pull/1326 PR: https://git.openjdk.java.net/skara/pull/1326 From gli at openjdk.java.net Wed Jun 1 08:34:39 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 08:34:39 GMT Subject: RFR: 1410: The reply message of the 'reviewers' command should be more accurate [v2] In-Reply-To: References: Message-ID: On Tue, 31 May 2022 17:28:43 GMT, Erik Joelsson wrote: >> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix comment. > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java line 123: > >> 121: if (previous.isPresent()) { >> 122: if (roleIsLower(role, previous.get().role())) { >> 123: reply.println("Only the [Reviewers](https://openjdk.java.net/bylaws#reviewer) are allowed to lower the role for additional reviewers."); > > Suggestion: > > reply.println("Only [Reviewers](https://openjdk.java.net/bylaws#reviewer) are allowed to lower the role for additional reviewers."); Fixed > bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java line 127: > >> 125: } >> 126: if (numReviewers < previous.get().number()) { >> 127: reply.println("Only the [Reviewers](https://openjdk.java.net/bylaws#reviewer) are allowed to decrease the number of required reviewers."); > > Suggestion: > > reply.println("Only [Reviewers](https://openjdk.java.net/bylaws#reviewer) are allowed to decrease the number of required reviewers."); Fixed ------------- PR: https://git.openjdk.java.net/skara/pull/1326 From gli at openjdk.java.net Wed Jun 1 09:35:39 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 09:35:39 GMT Subject: RFR: 1433: The change of the CSR status doesn't force the CheckWorkItem to re-run the check [v2] In-Reply-To: <-MDfjgv6xlvMPuzvOzYAorhO9eNjpw5rgvVb54-9RKs=.950c1faa-35a6-4c04-904f-a9dc35285691@github.com> References: <-MDfjgv6xlvMPuzvOzYAorhO9eNjpw5rgvVb54-9RKs=.950c1faa-35a6-4c04-904f-a9dc35285691@github.com> Message-ID: On Tue, 31 May 2022 17:44:48 GMT, Erik Joelsson wrote: >> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: >> >> Only check the Skara generated part. Adjust log. Avoid adding marker multiple times. > > bots/csr/src/main/java/org/openjdk/skara/bots/csr/CSRBot.java line 90: > >> 88: pr.body().contains(csr.webUrl().toString()) && >> 89: pr.body().contains(csr.title() + " (**CSR**)"); >> 90: } > > We could consider making these checks safer by only looking in the Skara generated part of the body. There is a delimiter line you could split on. Fixed. > bots/csr/src/main/java/org/openjdk/skara/bots/csr/CSRBot.java line 121: > >> 119: var csr = csrOptional.get(); >> 120: >> 121: log.info("Found CSR for " + describe(pr) + ". It has id " + csr.id()); > > I reacted to this log message the other day. Could you shorten it like this while in the area? > > Suggestion: > > log.info("Found CSR " + csr.id() + " for " + describe(pr) + "); Fixed. > bots/csr/src/main/java/org/openjdk/skara/bots/csr/CSRBot.java line 184: > >> 182: // this bot need to add the csr update marker so that the PR bot can update the message of the PR body. >> 183: log.info("CSR closed and approved for " + describe(pr) + ", adding the csr update marker"); >> 184: pr.setBody(pr.body() + CSR_UPDATE_MARKER); > > We need to make sure we only add the update marker once. Otherwise we would end up adding a very large amount of these if the PR bot happens to be stuck for a while. I would recommend a method for adding the marker, which first checks if the body contains the marker already. Fixed. ------------- PR: https://git.openjdk.java.net/skara/pull/1327 From gli at openjdk.java.net Wed Jun 1 09:35:38 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Wed, 1 Jun 2022 09:35:38 GMT Subject: RFR: 1433: The change of the CSR status doesn't force the CheckWorkItem to re-run the check [v2] In-Reply-To: References: Message-ID: > Hi all, > > Currently, the CheckWorkItem of the PR bot doesn't re-run the check in the following two situations so that the message of the PR body is not updated and then confuses the developers. > > Situation 1 steps: > - The issue has no csr at first > - Use command `/csr needed` (now the PR has `csr` label) > - Create a csr for this issue > - Then the CheckWorkItem doesn't re-run the check (Because the `csr` label is kept in the PR and no new metadata found by CheckWorkItem) > - (optionally) use command `/csr needed` again > - (optionally) then the CheckWorkItem also doesn't re-run the check > > Situation 2 steps: > - The issue has no csr at first (now the PR doesn't have `csr` label) > - Add the new fix version to the existing approved csr. (Now the issue has the csr issue. And because this csr issue had been approved, PR also doesn't have `csr` label.) > - then the CheckWorkItem doesn't re-run the check (No new metadata found by CheckWorkItem) > - (optionally) use command `/csr needed` > - (optionally) then the CheckWorkItem doesn't re-run the check > > It is because these two situations don't add or remove the `csr` label so that the `CheckWorkItem#getMetadata` doesn't return new metadata and then `CheckWorkItem#currentCheckValid` returns true and then the check doesn't re-run. > > This patch adds a new tag/marker named `"; >> 37: private static final String CSR_UNNEEDED_MARKER = ""; > > Did you intend to look for this in the CSRBot? > (optionally) use command /csr needed again > (optionally) then the CheckWorkItem also doesn't re-run the check Sometimes the developers may use the `/csr` command again. I would like to let the CheckWorkItem re-run the check immediately instead of waiting for JEPBot, which may reduce about 10 minutes. ------------- PR: https://git.openjdk.java.net/skara/pull/1327 From erikj at openjdk.java.net Fri Jun 3 23:25:19 2022 From: erikj at openjdk.java.net (Erik Joelsson) Date: Fri, 3 Jun 2022 23:25:19 GMT Subject: RFR: SKARA-1119: A bot should remind a PR author not to force push [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 08:30:21 GMT, Guoxiong Li wrote: >> Hi all, >> >> This patch adds a suggestion comment to the PR when the developers force-push the branch each time. Because I can't find the related rest api of the GitLab so I only implement it for GitHub. >> >> Thanks for taking the time to review. >> >> Best Regards, >> -- Guoxiong > > Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: > > Fix suggestion comment. Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.java.net/skara/pull/1328 From erikj at openjdk.java.net Fri Jun 3 23:25:58 2022 From: erikj at openjdk.java.net (Erik Joelsson) Date: Fri, 3 Jun 2022 23:25:58 GMT Subject: RFR: 1410: The reply message of the 'reviewers' command should be more accurate [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 08:34:37 GMT, Guoxiong Li wrote: >> Hi all, >> >> This trivial patch fixes the reply message of the `reviewers` command. >> >> Thanks for taking the time to review. >> >> Best Regards, >> -- Guoxiong > > Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: > > Fix comment. Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.java.net/skara/pull/1326 From erikj at openjdk.java.net Fri Jun 3 23:26:22 2022 From: erikj at openjdk.java.net (Erik Joelsson) Date: Fri, 3 Jun 2022 23:26:22 GMT Subject: RFR: 1466: Empty backport causes endless retries of command Message-ID: If a user tries to /backport a commit that results in an empty change, the BackportCommand fails to realize this and just errors out. It will then endlessly retry the command. This patch makes the BackportCommand detect an empty change and report it to the user. ------------- Commit messages: - SKARA-1466 Changes: https://git.openjdk.java.net/skara/pull/1329/files Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1329&range=00 Issue: https://bugs.openjdk.java.net/browse/SKARA-1466 Stats: 50 lines in 2 files changed: 50 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/skara/pull/1329.diff Fetch: git fetch https://git.openjdk.java.net/skara pull/1329/head:pull/1329 PR: https://git.openjdk.java.net/skara/pull/1329 From gli at openjdk.java.net Sat Jun 4 07:50:40 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Sat, 4 Jun 2022 07:50:40 GMT Subject: RFR: 1410: The reply message of the 'reviewers' command should be more accurate [v2] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 23:23:56 GMT, Erik Joelsson wrote: >> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix comment. > > Marked as reviewed by erikj (Lead). @erikj79 Thanks for the review. Integrating. ------------- PR: https://git.openjdk.java.net/skara/pull/1326 From gli at openjdk.java.net Sat Jun 4 07:50:40 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Sat, 4 Jun 2022 07:50:40 GMT Subject: Integrated: 1410: The reply message of the 'reviewers' command should be more accurate In-Reply-To: References: Message-ID: On Sat, 28 May 2022 09:17:55 GMT, Guoxiong Li wrote: > Hi all, > > This trivial patch fixes the reply message of the `reviewers` command. > > Thanks for taking the time to review. > > Best Regards, > -- Guoxiong This pull request has now been integrated. Changeset: fd17f61d Author: Guoxiong Li URL: https://git.openjdk.java.net/skara/commit/fd17f61dfca8bf27cfc76b21da33e7b82c4e4404 Stats: 17 lines in 2 files changed: 14 ins; 0 del; 3 mod 1410: The reply message of the 'reviewers' command should be more accurate Reviewed-by: erikj ------------- PR: https://git.openjdk.java.net/skara/pull/1326 From gli at openjdk.java.net Sat Jun 4 07:51:29 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Sat, 4 Jun 2022 07:51:29 GMT Subject: Integrated: SKARA-1119: A bot should remind a PR author not to force push In-Reply-To: References: Message-ID: On Sun, 29 May 2022 13:30:26 GMT, Guoxiong Li wrote: > Hi all, > > This patch adds a suggestion comment to the PR when the developers force-push the branch each time. Because I can't find the related rest api of the GitLab so I only implement it for GitHub. > > Thanks for taking the time to review. > > Best Regards, > -- Guoxiong This pull request has now been integrated. Changeset: 2ba31183 Author: Guoxiong Li URL: https://git.openjdk.java.net/skara/commit/2ba3118357b945cf8b200af412eba3bcb306a615 Stats: 163 lines in 9 files changed: 159 ins; 0 del; 4 mod 1119: A bot should remind a PR author not to force push 225: Notify when commits are force pushed to a branch Reviewed-by: erikj ------------- PR: https://git.openjdk.java.net/skara/pull/1328 From gli at openjdk.java.net Sat Jun 4 07:51:29 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Sat, 4 Jun 2022 07:51:29 GMT Subject: RFR: SKARA-1119: A bot should remind a PR author not to force push [v2] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 23:23:13 GMT, Erik Joelsson wrote: >> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix suggestion comment. > > Marked as reviewed by erikj (Lead). @erikj79 Thanks for the review. Integrating. ------------- PR: https://git.openjdk.java.net/skara/pull/1328 From erikj at openjdk.java.net Mon Jun 6 08:12:57 2022 From: erikj at openjdk.java.net (Erik Joelsson) Date: Mon, 6 Jun 2022 08:12:57 GMT Subject: RFR: 1433: The change of the CSR status doesn't force the CheckWorkItem to re-run the check [v2] In-Reply-To: References: <-MDfjgv6xlvMPuzvOzYAorhO9eNjpw5rgvVb54-9RKs=.950c1faa-35a6-4c04-904f-a9dc35285691@github.com> Message-ID: On Wed, 1 Jun 2022 09:39:14 GMT, Guoxiong Li wrote: >> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRCommand.java line 37: >> >>> 35: private static final String CSR_LABEL = "csr"; >>> 36: private static final String CSR_NEEDED_MARKER = ""; >>> 37: private static final String CSR_UNNEEDED_MARKER = ""; >> >> Did you intend to look for this in the CSRBot? > >> (optionally) use command /csr needed again >> (optionally) then the CheckWorkItem also doesn't re-run the check > > Sometimes the developers may use the `/csr` command again. I would like to let the CheckWorkItem re-run the check immediately instead of waiting for JEPBot, which may reduce about 10 minutes. I don't understand what you mean. You set these markers, but I don't see anything looking for them. ------------- PR: https://git.openjdk.java.net/skara/pull/1327 From gli at openjdk.java.net Mon Jun 6 08:26:19 2022 From: gli at openjdk.java.net (Guoxiong Li) Date: Mon, 6 Jun 2022 08:26:19 GMT Subject: RFR: 1433: The change of the CSR status doesn't force the CheckWorkItem to re-run the check [v2] In-Reply-To: References: <-MDfjgv6xlvMPuzvOzYAorhO9eNjpw5rgvVb54-9RKs=.950c1faa-35a6-4c04-904f-a9dc35285691@github.com> Message-ID: On Mon, 6 Jun 2022 08:10:14 GMT, Erik Joelsson wrote: >>> (optionally) use command /csr needed again >>> (optionally) then the CheckWorkItem also doesn't re-run the check >> >> Sometimes the developers may use the `/csr` command again. I would like to let the CheckWorkItem re-run the check immediately instead of waiting for JEPBot, which may reduce about 10 minutes. > > I don't understand what you mean. You set these markers, but I don't see anything looking for them. // file CheckWorkItem.java - private final Pattern metadataComments = Pattern.compile("