From erikj at openjdk.org Fri Dec 1 14:24:31 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 1 Dec 2023 14:24:31 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v5] In-Reply-To: <7e0YyzqrAx3gKXiD2-KBvb9Nf77CwxEjPfV27X-3Hio=.8dbcaf5f-985b-4b6c-8119-0dd9f8dd9782@github.com> References: <7e0YyzqrAx3gKXiD2-KBvb9Nf77CwxEjPfV27X-3Hio=.8dbcaf5f-985b-4b6c-8119-0dd9f8dd9782@github.com> Message-ID: On Thu, 30 Nov 2023 19:34:32 GMT, Erik Duveblad wrote: >> Hi all, >> >> please review this patch that ensures that we pass the correct `.jcheck/conf` to [AdditionalConfiguration.java](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java). The `.jcheck/conf` should either come from the "overriding" `.jcheck/conf` (if the PR bot is configured to use that) or the pull request's target branch. >> >> I have added that test that passes with this patch but fails without it. >> >> Thanks, >> Erik > > Erik Duveblad has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: > > - Merge 'master' > - Reviewer feedback > - Merge master > - optimize > - final review > - refactor > - whitespace > - do not throw from checkStatus > - Merge branch 'master' into pr-correct-jcheck-conf > - Fix .jcheck/conf parsing in multiple places > - ... and 1 more: https://git.openjdk.org/skara/compare/a9727b65...f22f4878 I like how this is shaping out. Just some minor issues left. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1253: > 1251: > 1252: var commitJCheckConf = checkablePullRequest.parseJCheckConfiguration(hash); > 1253: var commitVisitor = checkablePullRequest.createVisitor(commitJCheckConf); I think these should be moved inside the if block below. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1254: > 1252: var commitJCheckConf = checkablePullRequest.parseJCheckConfiguration(hash); > 1253: var commitVisitor = checkablePullRequest.createVisitor(commitJCheckConf); > 1254: if (isJCheckConfUpdatedInMergePR) { Shouldn't this be conditional on the repo using an external jcheck conf? bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1304: > 1302: // then we won't use the one in the repo anyway. > 1303: if (workItem.bot.confOverrideRepository().isEmpty() && > 1304: (isFileUpdated(Path.of(".jcheck").resolve("conf"), localHash) || isJCheckConfUpdatedInMergePR)) { Style nit. I think this way of creating a path looks a bit overly complex. I would suggest either just `Path.of(".jcheck/conf")` or split the elements like this `Path.of(".jcheck", "conf")`. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1308: > 1306: var localJCheckConf = checkablePullRequest.parseJCheckConfiguration(localHash); > 1307: var localVisitor = checkablePullRequest.createVisitor(localJCheckConf); > 1308: log.info("Run jcheck against localHash with JCHeck configuration from localHash"); Suggestion: log.info("Run JCheck against localHash with configuration from localHash"); bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1320: > 1318: } > 1319: > 1320: var confFile = localRepo.lines(Path.of(".jcheck").resolve("conf"), localHash); Same style nit as above. ------------- PR Review: https://git.openjdk.org/skara/pull/1578#pullrequestreview-1759864698 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412135881 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412152819 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412143916 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412154904 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412156967 From ehelin at openjdk.org Fri Dec 1 15:23:09 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Fri, 1 Dec 2023 15:23:09 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v6] In-Reply-To: References: Message-ID: > Hi all, > > please review this patch that ensures that we pass the correct `.jcheck/conf` to [AdditionalConfiguration.java](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java). The `.jcheck/conf` should either come from the "overriding" `.jcheck/conf` (if the PR bot is configured to use that) or the pull request's target branch. > > I have added that test that passes with this patch but fails without it. > > Thanks, > Erik Erik Duveblad has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - Merge branch 'master' into pr-correct-jcheck-conf - Reviewer feedback - Merge 'master' - Reviewer feedback - Merge master - optimize - final review - refactor - whitespace - do not throw from checkStatus - ... and 3 more: https://git.openjdk.org/skara/compare/b5752053...1b6ddac9 ------------- Changes: https://git.openjdk.org/skara/pull/1578/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1578&range=05 Stats: 191 lines in 9 files changed: 111 ins; 4 del; 76 mod Patch: https://git.openjdk.org/skara/pull/1578.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1578/head:pull/1578 PR: https://git.openjdk.org/skara/pull/1578 From ehelin at openjdk.org Fri Dec 1 15:23:10 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Fri, 1 Dec 2023 15:23:10 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v5] In-Reply-To: References: <7e0YyzqrAx3gKXiD2-KBvb9Nf77CwxEjPfV27X-3Hio=.8dbcaf5f-985b-4b6c-8119-0dd9f8dd9782@github.com> Message-ID: On Fri, 1 Dec 2023 13:58:55 GMT, Erik Joelsson wrote: >> Erik Duveblad has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: >> >> - Merge 'master' >> - Reviewer feedback >> - Merge master >> - optimize >> - final review >> - refactor >> - whitespace >> - do not throw from checkStatus >> - Merge branch 'master' into pr-correct-jcheck-conf >> - Fix .jcheck/conf parsing in multiple places >> - ... and 1 more: https://git.openjdk.org/skara/compare/a9727b65...f22f4878 > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1253: > >> 1251: >> 1252: var commitJCheckConf = checkablePullRequest.parseJCheckConfiguration(hash); >> 1253: var commitVisitor = checkablePullRequest.createVisitor(commitJCheckConf); > > I think these should be moved inside the if block below. Agree, fixed in latest > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1254: > >> 1252: var commitJCheckConf = checkablePullRequest.parseJCheckConfiguration(hash); >> 1253: var commitVisitor = checkablePullRequest.createVisitor(commitJCheckConf); >> 1254: if (isJCheckConfUpdatedInMergePR) { > > Shouldn't this be conditional on the repo using an external jcheck conf? Yep, agree, fixed in latest > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1304: > >> 1302: // then we won't use the one in the repo anyway. >> 1303: if (workItem.bot.confOverrideRepository().isEmpty() && >> 1304: (isFileUpdated(Path.of(".jcheck").resolve("conf"), localHash) || isJCheckConfUpdatedInMergePR)) { > > Style nit. I think this way of creating a path looks a bit overly complex. I would suggest either just `Path.of(".jcheck/conf")` or split the elements like this `Path.of(".jcheck", "conf")`. Sure, fixed in latest > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1308: > >> 1306: var localJCheckConf = checkablePullRequest.parseJCheckConfiguration(localHash); >> 1307: var localVisitor = checkablePullRequest.createVisitor(localJCheckConf); >> 1308: log.info("Run jcheck against localHash with JCHeck configuration from localHash"); > > Suggestion: > > log.info("Run JCheck against localHash with configuration from localHash"); Fixed in latest > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1320: > >> 1318: } >> 1319: >> 1320: var confFile = localRepo.lines(Path.of(".jcheck").resolve("conf"), localHash); > > Same style nit as above. Fixed in latest ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412238698 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412238335 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412238564 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412238180 PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412238041 From erikj at openjdk.org Fri Dec 1 17:55:46 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 1 Dec 2023 17:55:46 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v6] In-Reply-To: References: Message-ID: On Fri, 1 Dec 2023 15:23:09 GMT, Erik Duveblad wrote: >> Hi all, >> >> please review this patch that ensures that we pass the correct `.jcheck/conf` to [AdditionalConfiguration.java](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java). The `.jcheck/conf` should either come from the "overriding" `.jcheck/conf` (if the PR bot is configured to use that) or the pull request's target branch. >> >> I have added that test that passes with this patch but fails without it. >> >> Thanks, >> Erik > > Erik Duveblad has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: > > - Merge branch 'master' into pr-correct-jcheck-conf > - Reviewer feedback > - Merge 'master' > - Reviewer feedback > - Merge master > - optimize > - final review > - refactor > - whitespace > - do not throw from checkStatus > - ... and 3 more: https://git.openjdk.org/skara/compare/b5752053...1b6ddac9 Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1578#pullrequestreview-1760313456 From erikj at openjdk.org Fri Dec 1 17:55:46 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 1 Dec 2023 17:55:46 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v5] In-Reply-To: References: <7e0YyzqrAx3gKXiD2-KBvb9Nf77CwxEjPfV27X-3Hio=.8dbcaf5f-985b-4b6c-8119-0dd9f8dd9782@github.com> Message-ID: <6bF2Qc9GtaY_UX4whYh5Z_aOwZi8NPnKpBSkOVR8Uxs=.3c42b1c1-d58a-4e0b-987a-4d6e3ac1e288@github.com> On Fri, 1 Dec 2023 15:19:01 GMT, Erik Duveblad wrote: >> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1320: >> >>> 1318: } >>> 1319: >>> 1320: var confFile = localRepo.lines(Path.of(".jcheck").resolve("conf"), localHash); >> >> Same style nit as above. > > Fixed in latest This one wasn't changed. :) ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412416122 From ehelin at openjdk.org Fri Dec 1 18:28:04 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Fri, 1 Dec 2023 18:28:04 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v6] In-Reply-To: References: Message-ID: On Fri, 1 Dec 2023 17:53:38 GMT, Erik Joelsson wrote: >> Erik Duveblad has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: >> >> - Merge branch 'master' into pr-correct-jcheck-conf >> - Reviewer feedback >> - Merge 'master' >> - Reviewer feedback >> - Merge master >> - optimize >> - final review >> - refactor >> - whitespace >> - do not throw from checkStatus >> - ... and 3 more: https://git.openjdk.org/skara/compare/b5752053...1b6ddac9 > > Marked as reviewed by erikj (Lead). Thanks @erikj79 for the thorough review! @zhaosongzs would you mind taking a look as well? ------------- PR Comment: https://git.openjdk.org/skara/pull/1578#issuecomment-1836581112 From ehelin at openjdk.org Fri Dec 1 18:28:01 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Fri, 1 Dec 2023 18:28:01 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v7] In-Reply-To: References: Message-ID: > Hi all, > > please review this patch that ensures that we pass the correct `.jcheck/conf` to [AdditionalConfiguration.java](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java). The `.jcheck/conf` should either come from the "overriding" `.jcheck/conf` (if the PR bot is configured to use that) or the pull request's target branch. > > I have added that test that passes with this patch but fails without it. > > Thanks, > Erik Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: Last Path.of ------------- Changes: - all: https://git.openjdk.org/skara/pull/1578/files - new: https://git.openjdk.org/skara/pull/1578/files/1b6ddac9..d3c54eae Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1578&range=06 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1578&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1578.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1578/head:pull/1578 PR: https://git.openjdk.org/skara/pull/1578 From ehelin at openjdk.org Fri Dec 1 18:28:04 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Fri, 1 Dec 2023 18:28:04 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v5] In-Reply-To: <6bF2Qc9GtaY_UX4whYh5Z_aOwZi8NPnKpBSkOVR8Uxs=.3c42b1c1-d58a-4e0b-987a-4d6e3ac1e288@github.com> References: <7e0YyzqrAx3gKXiD2-KBvb9Nf77CwxEjPfV27X-3Hio=.8dbcaf5f-985b-4b6c-8119-0dd9f8dd9782@github.com> <6bF2Qc9GtaY_UX4whYh5Z_aOwZi8NPnKpBSkOVR8Uxs=.3c42b1c1-d58a-4e0b-987a-4d6e3ac1e288@github.com> Message-ID: On Fri, 1 Dec 2023 17:53:22 GMT, Erik Joelsson wrote: >> Fixed in latest > > This one wasn't changed. :) Now it is ? ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1578#discussion_r1412442453 From zsong at openjdk.org Fri Dec 1 18:31:42 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 1 Dec 2023 18:31:42 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v7] In-Reply-To: References: Message-ID: <72Q4ZWjhgV1zVBh7PprB_DFRBmg16XrcEEayAE8EBHM=.21e2728a-295a-4fdc-a2f3-e835e1e2ebd1@github.com> On Fri, 1 Dec 2023 18:28:01 GMT, Erik Duveblad wrote: >> Hi all, >> >> please review this patch that ensures that we pass the correct `.jcheck/conf` to [AdditionalConfiguration.java](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java). The `.jcheck/conf` should either come from the "overriding" `.jcheck/conf` (if the PR bot is configured to use that) or the pull request's target branch. >> >> I have added that test that passes with this patch but fails without it. >> >> Thanks, >> Erik > > Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: > > Last Path.of Looks very good! ------------- Marked as reviewed by zsong (Reviewer). PR Review: https://git.openjdk.org/skara/pull/1578#pullrequestreview-1760364766 From zsong at openjdk.org Fri Dec 1 18:31:42 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 1 Dec 2023 18:31:42 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v6] In-Reply-To: References: Message-ID: On Fri, 1 Dec 2023 17:53:38 GMT, Erik Joelsson wrote: >> Erik Duveblad has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: >> >> - Merge branch 'master' into pr-correct-jcheck-conf >> - Reviewer feedback >> - Merge 'master' >> - Reviewer feedback >> - Merge master >> - optimize >> - final review >> - refactor >> - whitespace >> - do not throw from checkStatus >> - ... and 3 more: https://git.openjdk.org/skara/compare/b5752053...1b6ddac9 > > Marked as reviewed by erikj (Lead). > Thanks @erikj79 for the thorough review! @zhaosongzs would you mind taking a look as well? I reviewed your latest patch yesterday and thought it pretty good. However, I hesitated to approve it because I thought ErikJ might discover some minor issues. ------------- PR Comment: https://git.openjdk.org/skara/pull/1578#issuecomment-1836585374 From erikj at openjdk.org Fri Dec 1 18:38:19 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 1 Dec 2023 18:38:19 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v7] In-Reply-To: References: Message-ID: On Fri, 1 Dec 2023 18:28:01 GMT, Erik Duveblad wrote: >> Hi all, >> >> please review this patch that ensures that we pass the correct `.jcheck/conf` to [AdditionalConfiguration.java](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java). The `.jcheck/conf` should either come from the "overriding" `.jcheck/conf` (if the PR bot is configured to use that) or the pull request's target branch. >> >> I have added that test that passes with this patch but fails without it. >> >> Thanks, >> Erik > > Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: > > Last Path.of Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1578#pullrequestreview-1760373211 From duke at openjdk.org Mon Dec 4 07:44:39 2023 From: duke at openjdk.org (mrcode) Date: Mon, 4 Dec 2023 07:44:39 GMT Subject: RFR: 2112: Update JDK to 21 and Gradle to 8.5 [v5] In-Reply-To: References: Message-ID: On Thu, 30 Nov 2023 22:36:15 GMT, Erik Joelsson wrote: >> Bumping JDK version to 21.0.1 and Gradle version to 8.4. >> >> There were two tests that needed to be updated. One was assuming iteration order on HashMap. The other was more complex as it was triggered by [JDK-8289689](https://bugs.openjdk.org/browse/JDK-8289689). My conclusion is that we can't count on unicode normalization returned from Git to match what the files in the filesystem have on mac, and so the test needs to accommodate for that. There is a longer explanation in a comment. > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Update readme Unsupported Java. Your build is currently configured to use Java 21.0.1 and Gradle 8.5. Possible solution: - Use Java 20 as Gradle JVM: Open Gradle settings - Open Gradle wrapper settings, change `distributionUrl` property to use compatible Gradle version and reload the project ----- Why can't I run my project with JDK 21 on Gradle 8.5 final version? ------------- PR Comment: https://git.openjdk.org/skara/pull/1590#issuecomment-1837994577 From ehelin at openjdk.org Mon Dec 4 09:54:23 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Mon, 4 Dec 2023 09:54:23 GMT Subject: RFR: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java [v7] In-Reply-To: References: Message-ID: On Fri, 1 Dec 2023 18:36:01 GMT, Erik Joelsson wrote: >> Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: >> >> Last Path.of > > Marked as reviewed by erikj (Lead). Thanks @erikj79 and @zhaosongzs for reviewing! ------------- PR Comment: https://git.openjdk.org/skara/pull/1578#issuecomment-1838189735 From ehelin at openjdk.org Mon Dec 4 09:54:23 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Mon, 4 Dec 2023 09:54:23 GMT Subject: Integrated: 2082: Use correct .jcheck/conf in AdditionalConfiguration.java In-Reply-To: References: Message-ID: On Fri, 27 Oct 2023 08:32:26 GMT, Erik Duveblad wrote: > Hi all, > > please review this patch that ensures that we pass the correct `.jcheck/conf` to [AdditionalConfiguration.java](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java). The `.jcheck/conf` should either come from the "overriding" `.jcheck/conf` (if the PR bot is configured to use that) or the pull request's target branch. > > I have added that test that passes with this patch but fails without it. > > Thanks, > Erik This pull request has now been integrated. Changeset: da8baf07 Author: Erik Duveblad URL: https://git.openjdk.org/skara/commit/da8baf07ddffb58323582bfd6f4e40f8b18440d7 Stats: 191 lines in 9 files changed: 111 ins; 4 del; 76 mod 2082: Use correct .jcheck/conf in AdditionalConfiguration.java Reviewed-by: erikj, zsong ------------- PR: https://git.openjdk.org/skara/pull/1578 From erikj at openjdk.org Mon Dec 4 14:34:13 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 4 Dec 2023 14:34:13 GMT Subject: RFR: 2112: Update JDK to 21 and Gradle to 8.5 [v5] In-Reply-To: References: Message-ID: <9DIUpecFDfiPnlUGgdotbaLweVHMuM7kcm39A3MnRbs=.525d9842-e7e8-443d-9e71-19663c2325f5@github.com> On Mon, 4 Dec 2023 07:41:21 GMT, mrcode wrote: > Unsupported Java. Your build is currently configured to use Java 21.0.1 and Gradle 8.5. > > Possible solution: > > * Use Java 20 as Gradle JVM: Open Gradle settings > * Open Gradle wrapper settings, change `distributionUrl` property to use compatible Gradle version and reload the project > > Why can't I run my project with JDK 21 on Gradle 8.5 final version? I don't know, it works on all the machines I tried this one before integrating. While working on this I found people saying that at least with Gradle 8.4, if some other error occurred, Gradle would still automatically blame JDK 21 if you were running with it, hiding the actual problems. You could try with `--info` and/or `--stacktrace` to try to get more information about your failure. ------------- PR Comment: https://git.openjdk.org/skara/pull/1590#issuecomment-1838757991 From zsong at openjdk.org Tue Dec 5 17:35:19 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 5 Dec 2023 17:35:19 GMT Subject: RFR: 2111: Normalize usernames before comparing Message-ID: In https://github.com/openjdk/jdk/pull/16788#issuecomment-1827984539, although the user's full name and the head commit author's name seems exactly same in the GitHub. The bot was thinking they are different, Erik pointed out the root cause "The problem was that a unicode character was encoded differently, one as a composition and one as a single character. " To avoid this kind of problems in the future, we should normalize the strings before comparison to ensure unicode characters are encoded in the same way. ------------- Commit messages: - SKARA-2111 Changes: https://git.openjdk.org/skara/pull/1591/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1591&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2111 Stats: 6 lines in 1 file changed: 4 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1591.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1591/head:pull/1591 PR: https://git.openjdk.org/skara/pull/1591 From erikj at openjdk.org Tue Dec 5 23:20:15 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 5 Dec 2023 23:20:15 GMT Subject: RFR: 2111: Normalize usernames before comparing In-Reply-To: References: Message-ID: On Tue, 5 Dec 2023 17:22:56 GMT, Zhao Song wrote: > In https://github.com/openjdk/jdk/pull/16788#issuecomment-1827984539, although the user's full name and the head commit author's name seems exactly same in the GitHub. The bot was thinking they are different, Erik pointed out the root cause "The problem was that a unicode character was encoded differently, one as a composition and one as a single character. " > > To avoid this kind of problems in the future, we should normalize the strings before comparison to ensure unicode characters are encoded in the same way. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1591#pullrequestreview-1766280692 From zsong at openjdk.org Wed Dec 6 00:10:33 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 6 Dec 2023 00:10:33 GMT Subject: RFR: 2111: Normalize usernames before comparing In-Reply-To: References: Message-ID: On Tue, 5 Dec 2023 17:22:56 GMT, Zhao Song wrote: > In https://github.com/openjdk/jdk/pull/16788#issuecomment-1827984539, although the user's full name and the head commit author's name seems exactly same in the GitHub. The bot was thinking they are different, Erik pointed out the root cause "The problem was that a unicode character was encoded differently, one as a composition and one as a single character. " > > To avoid this kind of problems in the future, we should normalize the strings before comparison to ensure unicode characters are encoded in the same way. Thanks! ------------- PR Comment: https://git.openjdk.org/skara/pull/1591#issuecomment-1841855696 From zsong at openjdk.org Wed Dec 6 00:10:33 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 6 Dec 2023 00:10:33 GMT Subject: Integrated: 2111: Normalize usernames before comparing In-Reply-To: References: Message-ID: <8hO7bWtdR2JwLEpi6VJrBNxTowf_zfShFJUjj599XeI=.75a3d7d9-ad8e-46f0-8db5-c91b359c4dc1@github.com> On Tue, 5 Dec 2023 17:22:56 GMT, Zhao Song wrote: > In https://github.com/openjdk/jdk/pull/16788#issuecomment-1827984539, although the user's full name and the head commit author's name seems exactly same in the GitHub. The bot was thinking they are different, Erik pointed out the root cause "The problem was that a unicode character was encoded differently, one as a composition and one as a single character. " > > To avoid this kind of problems in the future, we should normalize the strings before comparison to ensure unicode characters are encoded in the same way. This pull request has now been integrated. Changeset: 20edc895 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/20edc895375f9c4c37b3b8a7289e9db6e9d16c77 Stats: 6 lines in 1 file changed: 4 ins; 0 del; 2 mod 2111: Normalize usernames before comparing Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1591 From ehelin at openjdk.org Wed Dec 6 10:38:18 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Wed, 6 Dec 2023 10:38:18 GMT Subject: RFR: 2115: More flexible merge PR review configuration Message-ID: Hi all, please review this patch that enables a bit more flexible configuration for checking merge pull requests. Today we can configure that a merge pull requests always should be checked and if that isn't configured then the `.jcheck/conf` from the repository is used. If we ever want to set `merge=check` in the `.jcheck/conf` file in repos then we will need a way to _disable_ running jcheck on merge pull requests (for example for projects using merge pull requests to sync in commits). This patch makes it possible to configure that merge pull requests should either always be checked, never be checked or checked according to `.jcheck/conf` in the repo. Thanks, Erik ------------- Commit messages: - skara-2115 Changes: https://git.openjdk.org/skara/pull/1592/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1592&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2115 Stats: 61 lines in 11 files changed: 41 ins; 0 del; 20 mod Patch: https://git.openjdk.org/skara/pull/1592.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1592/head:pull/1592 PR: https://git.openjdk.org/skara/pull/1592 From zsong at openjdk.org Wed Dec 6 18:44:05 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 6 Dec 2023 18:44:05 GMT Subject: RFR: 2115: More flexible merge PR review configuration In-Reply-To: References: Message-ID: On Wed, 6 Dec 2023 10:35:18 GMT, Erik Duveblad wrote: > Hi all, > > please review this patch that enables a bit more flexible configuration for checking merge pull requests. Today we can configure that a merge pull requests always should be checked and if that isn't configured then the `.jcheck/conf` from the repository is used. If we ever want to set `merge=check` in the `.jcheck/conf` file in repos then we will need a way to _disable_ running jcheck on merge pull requests (for example for projects using merge pull requests to sync in commits). > > This patch makes it possible to configure that merge pull requests should either always be checked, never be checked or checked according to `.jcheck/conf` in the repo. > > Thanks, > Erik It's a reasonable change for me and it looks quite good to me! bots/pr/src/main/java/org/openjdk/skara/bots/pr/MergePullRequestReviewConfiguration.java line 2: > 1: /* > 2: * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. Remove 2019? ------------- PR Review: https://git.openjdk.org/skara/pull/1592#pullrequestreview-1768335047 PR Review Comment: https://git.openjdk.org/skara/pull/1592#discussion_r1417800873 From erikj at openjdk.org Wed Dec 6 19:13:55 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 6 Dec 2023 19:13:55 GMT Subject: RFR: 2115: More flexible merge PR review configuration In-Reply-To: References: Message-ID: On Wed, 6 Dec 2023 10:35:18 GMT, Erik Duveblad wrote: > Hi all, > > please review this patch that enables a bit more flexible configuration for checking merge pull requests. Today we can configure that a merge pull requests always should be checked and if that isn't configured then the `.jcheck/conf` from the repository is used. If we ever want to set `merge=check` in the `.jcheck/conf` file in repos then we will need a way to _disable_ running jcheck on merge pull requests (for example for projects using merge pull requests to sync in commits). > > This patch makes it possible to configure that merge pull requests should either always be checked, never be checked or checked according to `.jcheck/conf` in the repo. > > Thanks, > Erik bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBot.java line 370: > 368: } > 369: > 370: public MergePullRequestReviewConfiguration reviewMerge(){ Suggestion: public MergePullRequestReviewConfiguration reviewMerge() { bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java line 215: > 213: } else if (val.equals("never")) { > 214: result = MergePullRequestReviewConfiguration.NEVER; > 215: } We should throw on an invalid configuration. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1592#discussion_r1417863855 PR Review Comment: https://git.openjdk.org/skara/pull/1592#discussion_r1417865343 From ehelin at openjdk.org Thu Dec 14 13:05:52 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Thu, 14 Dec 2023 13:05:52 GMT Subject: RFR: 2115: More flexible merge PR review configuration [v2] In-Reply-To: References: Message-ID: > Hi all, > > please review this patch that enables a bit more flexible configuration for checking merge pull requests. Today we can configure that a merge pull requests always should be checked and if that isn't configured then the `.jcheck/conf` from the repository is used. If we ever want to set `merge=check` in the `.jcheck/conf` file in repos then we will need a way to _disable_ running jcheck on merge pull requests (for example for projects using merge pull requests to sync in commits). > > This patch makes it possible to configure that merge pull requests should either always be checked, never be checked or checked according to `.jcheck/conf` in the repo. > > Thanks, > Erik Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: Review feedback ------------- Changes: - all: https://git.openjdk.org/skara/pull/1592/files - new: https://git.openjdk.org/skara/pull/1592/files/9e653ecf..4303440b Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1592&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1592&range=00-01 Stats: 9 lines in 3 files changed: 6 ins; 0 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1592.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1592/head:pull/1592 PR: https://git.openjdk.org/skara/pull/1592 From ehelin at openjdk.org Thu Dec 14 13:05:52 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Thu, 14 Dec 2023 13:05:52 GMT Subject: RFR: 2115: More flexible merge PR review configuration [v2] In-Reply-To: References: Message-ID: On Wed, 6 Dec 2023 18:19:23 GMT, Zhao Song wrote: >> Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: >> >> Review feedback > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/MergePullRequestReviewConfiguration.java line 2: > >> 1: /* >> 2: * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. > > Remove 2019? Thanks, fixed in latest commit! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1592#discussion_r1426690487 From ehelin at openjdk.org Thu Dec 14 13:05:52 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Thu, 14 Dec 2023 13:05:52 GMT Subject: RFR: 2115: More flexible merge PR review configuration [v2] In-Reply-To: References: Message-ID: On Wed, 6 Dec 2023 19:09:28 GMT, Erik Joelsson wrote: >> Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: >> >> Review feedback > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBot.java line 370: > >> 368: } >> 369: >> 370: public MergePullRequestReviewConfiguration reviewMerge(){ > > Suggestion: > > public MergePullRequestReviewConfiguration reviewMerge() { Thanks, fixed in `HEAD` > bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java line 215: > >> 213: } else if (val.equals("never")) { >> 214: result = MergePullRequestReviewConfiguration.NEVER; >> 215: } > > We should throw on an invalid configuration. Agree, fixed in latest commit. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1592#discussion_r1426690947 PR Review Comment: https://git.openjdk.org/skara/pull/1592#discussion_r1426691178 From erikj at openjdk.org Thu Dec 14 14:28:54 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 14 Dec 2023 14:28:54 GMT Subject: RFR: 2115: More flexible merge PR review configuration [v2] In-Reply-To: References: Message-ID: On Thu, 14 Dec 2023 13:05:52 GMT, Erik Duveblad wrote: >> Hi all, >> >> please review this patch that enables a bit more flexible configuration for checking merge pull requests. Today we can configure that a merge pull requests always should be checked and if that isn't configured then the `.jcheck/conf` from the repository is used. If we ever want to set `merge=check` in the `.jcheck/conf` file in repos then we will need a way to _disable_ running jcheck on merge pull requests (for example for projects using merge pull requests to sync in commits). >> >> This patch makes it possible to configure that merge pull requests should either always be checked, never be checked or checked according to `.jcheck/conf` in the repo. >> >> Thanks, >> Erik > > Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: > > Review feedback Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1592#pullrequestreview-1781933740 From ehelin at openjdk.org Thu Dec 14 15:15:02 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Thu, 14 Dec 2023 15:15:02 GMT Subject: RFR: 2115: More flexible merge PR review configuration [v2] In-Reply-To: References: Message-ID: On Wed, 6 Dec 2023 18:41:55 GMT, Zhao Song wrote: >> Erik Duveblad has updated the pull request incrementally with one additional commit since the last revision: >> >> Review feedback > > It's a reasonable change for me and it looks quite good to me! Thanks @zhaosongzs and @erikj79 for reviewing! ------------- PR Comment: https://git.openjdk.org/skara/pull/1592#issuecomment-1856030952 From ehelin at openjdk.org Thu Dec 14 15:15:02 2023 From: ehelin at openjdk.org (Erik Duveblad) Date: Thu, 14 Dec 2023 15:15:02 GMT Subject: Integrated: 2115: More flexible merge PR review configuration In-Reply-To: References: Message-ID: On Wed, 6 Dec 2023 10:35:18 GMT, Erik Duveblad wrote: > Hi all, > > please review this patch that enables a bit more flexible configuration for checking merge pull requests. Today we can configure that a merge pull requests always should be checked and if that isn't configured then the `.jcheck/conf` from the repository is used. If we ever want to set `merge=check` in the `.jcheck/conf` file in repos then we will need a way to _disable_ running jcheck on merge pull requests (for example for projects using merge pull requests to sync in commits). > > This patch makes it possible to configure that merge pull requests should either always be checked, never be checked or checked according to `.jcheck/conf` in the repo. > > Thanks, > Erik This pull request has now been integrated. Changeset: 0cde90ea Author: Erik Duveblad URL: https://git.openjdk.org/skara/commit/0cde90eaacf3dc4152c8bd3a08fa31e5af9dedba Stats: 67 lines in 11 files changed: 47 ins; 0 del; 20 mod 2115: More flexible merge PR review configuration Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1592 From erikj at openjdk.org Fri Dec 15 22:13:45 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 15 Dec 2023 22:13:45 GMT Subject: RFR: 2122: Minor bot optimizations for GitHub API Message-ID: I've made some minor optimizations to some GitHub interactions that I would like to integrate. They don't make a big impact on their own, but are part of a bigger effort to reduce latency in certain bots. The idea is to reduce the number of individual calls when possible, as we are limiting calls for rate limits through global locks. We spend a lot of time waiting on those locks, so reducing the number of calls can be valuable. When listing ReviewComments on GitHub, we need to fetch commit data in order to correctly generate all the file and line data for the comment. However, in most cases we don't actually need this data. I propose implementing an alternate method on PullRequest to retrieve ReviewComments as a list of regular Comment objects, without the file and line data. When listing comments of various kinds, we are often hitting pagination. The default page size on GitHub is usually 30 with 100 being the max. Our methods for listing comments always fetch all of them, so it would make sense to use the max page size to reduce the number of individual calls. ------------- Commit messages: - Increase per_page to max 100 for pr lists - reviewComments optimization Changes: https://git.openjdk.org/skara/pull/1593/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1593&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2122 Stats: 65 lines in 3 files changed: 22 ins; 1 del; 42 mod Patch: https://git.openjdk.org/skara/pull/1593.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1593/head:pull/1593 PR: https://git.openjdk.org/skara/pull/1593 From zsong at openjdk.org Mon Dec 18 15:51:38 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 18 Dec 2023 15:51:38 GMT Subject: RFR: 2122: Minor bot optimizations for GitHub API In-Reply-To: References: Message-ID: On Fri, 15 Dec 2023 22:09:37 GMT, Erik Joelsson wrote: > I've made some minor optimizations to some GitHub interactions that I would like to integrate. They don't make a big impact on their own, but are part of a bigger effort to reduce latency in certain bots. The idea is to reduce the number of individual calls when possible, as we are limiting calls for rate limits through global locks. We spend a lot of time waiting on those locks, so reducing the number of calls can be valuable. > > When listing ReviewComments on GitHub, we need to fetch commit data in order to correctly generate all the file and line data for the comment. However, in most cases we don't actually need this data. I propose implementing an alternate method on PullRequest to retrieve ReviewComments as a list of regular Comment objects, without the file and line data. > > When listing comments of various kinds, we are often hitting pagination. The default page size on GitHub is usually 30 with 100 being the max. Our methods for listing comments always fetch all of them, so it would make sense to use the max page size to reduce the number of individual calls. Looks good! forge/src/main/java/org/openjdk/skara/forge/github/GitHubPullRequest.java line 263: > 261: } > 262: > 263: public List reviewComments(boolean includeLocationData) { Can we make this method private? ------------- Marked as reviewed by zsong (Reviewer). PR Review: https://git.openjdk.org/skara/pull/1593#pullrequestreview-1785551316 PR Review Comment: https://git.openjdk.org/skara/pull/1593#discussion_r1429308083 From erikj at openjdk.org Tue Dec 19 13:29:32 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 19 Dec 2023 13:29:32 GMT Subject: RFR: 2122: Minor bot optimizations for GitHub API In-Reply-To: References: Message-ID: On Sun, 17 Dec 2023 23:26:29 GMT, Zhao Song wrote: >> I've made some minor optimizations to some GitHub interactions that I would like to integrate. They don't make a big impact on their own, but are part of a bigger effort to reduce latency in certain bots. The idea is to reduce the number of individual calls when possible, as we are limiting calls for rate limits through global locks. We spend a lot of time waiting on those locks, so reducing the number of calls can be valuable. >> >> When listing ReviewComments on GitHub, we need to fetch commit data in order to correctly generate all the file and line data for the comment. However, in most cases we don't actually need this data. I propose implementing an alternate method on PullRequest to retrieve ReviewComments as a list of regular Comment objects, without the file and line data. >> >> When listing comments of various kinds, we are often hitting pagination. The default page size on GitHub is usually 30 with 100 being the max. Our methods for listing comments always fetch all of them, so it would make sense to use the max page size to reduce the number of individual calls. > > forge/src/main/java/org/openjdk/skara/forge/github/GitHubPullRequest.java line 263: > >> 261: } >> 262: >> 263: public List reviewComments(boolean includeLocationData) { > > Can we make this method private? Yes, we should. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1593#discussion_r1431403083 From erikj at openjdk.org Tue Dec 19 13:34:03 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 19 Dec 2023 13:34:03 GMT Subject: RFR: 2122: Minor bot optimizations for GitHub API [v2] In-Reply-To: References: Message-ID: <0xg46HB77XjfV9VRs33x0-PwtEP2XpLQsQiNfIsVbEM=.8eb6ab0a-8f7e-4fc8-8898-a105179cc509@github.com> > I've made some minor optimizations to some GitHub interactions that I would like to integrate. They don't make a big impact on their own, but are part of a bigger effort to reduce latency in certain bots. The idea is to reduce the number of individual calls when possible, as we are limiting calls for rate limits through global locks. We spend a lot of time waiting on those locks, so reducing the number of calls can be valuable. > > When listing ReviewComments on GitHub, we need to fetch commit data in order to correctly generate all the file and line data for the comment. However, in most cases we don't actually need this data. I propose implementing an alternate method on PullRequest to retrieve ReviewComments as a list of regular Comment objects, without the file and line data. > > When listing comments of various kinds, we are often hitting pagination. The default page size on GitHub is usually 30 with 100 being the max. Our methods for listing comments always fetch all of them, so it would make sense to use the max page size to reduce the number of individual calls. Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: Method private ------------- Changes: - all: https://git.openjdk.org/skara/pull/1593/files - new: https://git.openjdk.org/skara/pull/1593/files/d9bb8d6e..33130952 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1593&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1593&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1593.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1593/head:pull/1593 PR: https://git.openjdk.org/skara/pull/1593 From zsong at openjdk.org Tue Dec 19 16:21:19 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 19 Dec 2023 16:21:19 GMT Subject: RFR: 2122: Minor bot optimizations for GitHub API [v2] In-Reply-To: <0xg46HB77XjfV9VRs33x0-PwtEP2XpLQsQiNfIsVbEM=.8eb6ab0a-8f7e-4fc8-8898-a105179cc509@github.com> References: <0xg46HB77XjfV9VRs33x0-PwtEP2XpLQsQiNfIsVbEM=.8eb6ab0a-8f7e-4fc8-8898-a105179cc509@github.com> Message-ID: On Tue, 19 Dec 2023 13:34:03 GMT, Erik Joelsson wrote: >> I've made some minor optimizations to some GitHub interactions that I would like to integrate. They don't make a big impact on their own, but are part of a bigger effort to reduce latency in certain bots. The idea is to reduce the number of individual calls when possible, as we are limiting calls for rate limits through global locks. We spend a lot of time waiting on those locks, so reducing the number of calls can be valuable. >> >> When listing ReviewComments on GitHub, we need to fetch commit data in order to correctly generate all the file and line data for the comment. However, in most cases we don't actually need this data. I propose implementing an alternate method on PullRequest to retrieve ReviewComments as a list of regular Comment objects, without the file and line data. >> >> When listing comments of various kinds, we are often hitting pagination. The default page size on GitHub is usually 30 with 100 being the max. Our methods for listing comments always fetch all of them, so it would make sense to use the max page size to reduce the number of individual calls. > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Method private Marked as reviewed by zsong (Reviewer). ------------- PR Review: https://git.openjdk.org/skara/pull/1593#pullrequestreview-1789252774 From zsong at openjdk.org Wed Dec 20 17:39:37 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 20 Dec 2023 17:39:37 GMT Subject: RFR: 2124: SKARA Commands Intercepted By GitLab Message-ID: The SKARA bot supports some pull request and commit commands. However, some of these commands conflict with built-in commands in GitLab. To prevent the commands from be intercepted by GitLab, users need to add spaces before the command.Although we clearly documented this on our wiki page, users occasionally forget about it. I remember someone suggested that we could introduce an optional 'skara' prefix to the command. For instance, '/skara label add test' would be equal to '/label add test'. I believe implementing this enhancement would make SKARA bot more user-friendly. ------------- Commit messages: - SKARA-2124 Changes: https://git.openjdk.org/skara/pull/1594/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1594&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2124 Stats: 19 lines in 7 files changed: 8 ins; 0 del; 11 mod Patch: https://git.openjdk.org/skara/pull/1594.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1594/head:pull/1594 PR: https://git.openjdk.org/skara/pull/1594 From erikj at openjdk.org Fri Dec 22 13:55:19 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 22 Dec 2023 13:55:19 GMT Subject: RFR: 2124: SKARA Commands Intercepted By GitLab In-Reply-To: References: Message-ID: On Tue, 19 Dec 2023 23:30:51 GMT, Zhao Song wrote: > The SKARA bot supports some pull request and commit commands. > > However, some of these commands conflict with built-in commands in GitLab. To prevent the commands from be intercepted by GitLab, users need to add spaces before the command.Although we clearly documented this on our wiki page, users occasionally forget about it. > > I remember someone suggested that we could introduce an optional 'skara' prefix to the command. For instance, '/skara label add test' would be equal to '/label add test'. I believe implementing this enhancement would make SKARA bot more user-friendly. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1594#pullrequestreview-1794510842 From erikj at openjdk.org Fri Dec 22 14:36:05 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 22 Dec 2023 14:36:05 GMT Subject: Integrated: 2122: Minor bot optimizations for GitHub API In-Reply-To: References: Message-ID: On Fri, 15 Dec 2023 22:09:37 GMT, Erik Joelsson wrote: > I've made some minor optimizations to some GitHub interactions that I would like to integrate. They don't make a big impact on their own, but are part of a bigger effort to reduce latency in certain bots. The idea is to reduce the number of individual calls when possible, as we are limiting calls for rate limits through global locks. We spend a lot of time waiting on those locks, so reducing the number of calls can be valuable. > > When listing ReviewComments on GitHub, we need to fetch commit data in order to correctly generate all the file and line data for the comment. However, in most cases we don't actually need this data. I propose implementing an alternate method on PullRequest to retrieve ReviewComments as a list of regular Comment objects, without the file and line data. > > When listing comments of various kinds, we are often hitting pagination. The default page size on GitHub is usually 30 with 100 being the max. Our methods for listing comments always fetch all of them, so it would make sense to use the max page size to reduce the number of individual calls. This pull request has now been integrated. Changeset: ebe89497 Author: Erik Joelsson URL: https://git.openjdk.org/skara/commit/ebe89497e1bba92fd0603194b434f3820514c70b Stats: 65 lines in 3 files changed: 22 ins; 1 del; 42 mod 2122: Minor bot optimizations for GitHub API Reviewed-by: zsong ------------- PR: https://git.openjdk.org/skara/pull/1593 From zsong at openjdk.org Fri Dec 22 17:23:45 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 22 Dec 2023 17:23:45 GMT Subject: RFR: 2124: SKARA Commands Intercepted By GitLab [v2] In-Reply-To: References: Message-ID: > The SKARA bot supports some pull request and commit commands. > > However, some of these commands conflict with built-in commands in GitLab. To prevent the commands from be intercepted by GitLab, users need to add spaces before the command.Although we clearly documented this on our wiki page, users occasionally forget about it. > > I remember someone suggested that we could introduce an optional 'skara' prefix to the command. For instance, '/skara label add test' would be equal to '/label add test'. I believe implementing this enhancement would make SKARA bot more user-friendly. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: update regex ------------- Changes: - all: https://git.openjdk.org/skara/pull/1594/files - new: https://git.openjdk.org/skara/pull/1594/files/297bdf9b..be6d5f36 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1594&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1594&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1594.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1594/head:pull/1594 PR: https://git.openjdk.org/skara/pull/1594 From zsong at openjdk.org Fri Dec 22 18:18:26 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 22 Dec 2023 18:18:26 GMT Subject: RFR: 2124: SKARA Commands Intercepted By GitLab [v2] In-Reply-To: References: Message-ID: On Fri, 22 Dec 2023 17:23:45 GMT, Zhao Song wrote: >> The SKARA bot supports some pull request and commit commands. >> >> However, some of these commands conflict with built-in commands in GitLab. To prevent the commands from be intercepted by GitLab, users need to add spaces before the command.Although we clearly documented this on our wiki page, users occasionally forget about it. >> >> I remember someone suggested that we could introduce an optional 'skara' prefix to the command. For instance, '/skara label add test' would be equal to '/label add test'. I believe implementing this enhancement would make SKARA bot more user-friendly. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > update regex Thanks. ------------- PR Comment: https://git.openjdk.org/skara/pull/1594#issuecomment-1867956117 From zsong at openjdk.org Fri Dec 22 18:18:26 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 22 Dec 2023 18:18:26 GMT Subject: Integrated: 2124: SKARA Commands Intercepted By GitLab In-Reply-To: References: Message-ID: On Tue, 19 Dec 2023 23:30:51 GMT, Zhao Song wrote: > The SKARA bot supports some pull request and commit commands. > > However, some of these commands conflict with built-in commands in GitLab. To prevent the commands from be intercepted by GitLab, users need to add spaces before the command.Although we clearly documented this on our wiki page, users occasionally forget about it. > > I remember someone suggested that we could introduce an optional 'skara' prefix to the command. For instance, '/skara label add test' would be equal to '/label add test'. I believe implementing this enhancement would make SKARA bot more user-friendly. This pull request has now been integrated. Changeset: fe721f6d Author: Zhao Song URL: https://git.openjdk.org/skara/commit/fe721f6dd170afcfa97f79715fbe07735818e391 Stats: 19 lines in 7 files changed: 8 ins; 0 del; 11 mod 2124: SKARA Commands Intercepted By GitLab Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1594