From dholmes at openjdk.org Mon Jun 3 05:19:01 2024 From: dholmes at openjdk.org (David Holmes) Date: Mon, 3 Jun 2024 05:19:01 GMT Subject: RFR: 2272: Improve issuestitleCheck [v2] In-Reply-To: References: <1grzUYpQ_gvP2EpiYFNb7DnKMopa_0lQeyZPyO9NTek=.5e88a55f-6f9c-4dbf-87f5-35d52585299e@github.com> Message-ID: <9AfVlpX_FZPLurfFh1xJMXnnBygS1PPDwKkuma1CVOA=.649926e6-efd2-4f8f-ba22-c4c8f54a71a9@github.com> On Fri, 31 May 2024 23:38:41 GMT, Erik Joelsson wrote: >> I was thinking we should ask if David Holmes has any thoughts about this list... > > No I think it should just be removed. Otherwise we will end up having to list every executable in the JDK as well as basically every build tool used when building it, and even so, that would be a very JDK project specific list of executables. Several of those would also overlap with words that we would want to flag, e.g. "make", "java". Honestly, while I appreciate the attempt to improve this, I don't see what the rules are trying to achieve. This is not a grammatical context, and the no-period rule means this is not expected to be a sentence; and we are not trying to enforce title-case so ... what exactly does "Should start with a capital" achieve - especially with all the noted, if not programmed, exceptions? ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1653#discussion_r1623794185 From zsong at openjdk.org Mon Jun 3 17:07:51 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Jun 2024 17:07:51 GMT Subject: RFR: 2272: Improve issuestitleCheck [v2] In-Reply-To: <9AfVlpX_FZPLurfFh1xJMXnnBygS1PPDwKkuma1CVOA=.649926e6-efd2-4f8f-ba22-c4c8f54a71a9@github.com> References: <1grzUYpQ_gvP2EpiYFNb7DnKMopa_0lQeyZPyO9NTek=.5e88a55f-6f9c-4dbf-87f5-35d52585299e@github.com> <9AfVlpX_FZPLurfFh1xJMXnnBygS1PPDwKkuma1CVOA=.649926e6-efd2-4f8f-ba22-c4c8f54a71a9@github.com> Message-ID: On Mon, 3 Jun 2024 05:16:53 GMT, David Holmes wrote: >> No I think it should just be removed. Otherwise we will end up having to list every executable in the JDK as well as basically every build tool used when building it, and even so, that would be a very JDK project specific list of executables. Several of those would also overlap with words that we would want to flag, e.g. "make", "java". > > Honestly, while I appreciate the attempt to improve this, I don't see what the rules are trying to achieve. This is not a grammatical context, and the no-period rule means this is not expected to be a sentence; and we are not trying to enforce title-case so ... what exactly does "Should start with a capital" achieve - especially with all the noted, if not programmed, exceptions? @dholmes-ora There are more details in the issue description. https://bugs.openjdk.org/browse/SKARA-2248 ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1653#discussion_r1624789759 From zsong at openjdk.org Mon Jun 3 17:11:13 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Jun 2024 17:11:13 GMT Subject: RFR: 2272: Improve issuestitleCheck [v3] In-Reply-To: References: Message-ID: > IssuestitleCheck was enabled in jdk recently, but this seems triggers too many false positive warnings and makes people feel annoying. > > In this patch, I am trying to make the issuestitle check more tolerant. For some known cases, issuestitle check wouldn't generate issues. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: remove executable list ------------- Changes: - all: https://git.openjdk.org/skara/pull/1653/files - new: https://git.openjdk.org/skara/pull/1653/files/9b0dcc3b..3a41d05f Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1653&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1653&range=01-02 Stats: 11 lines in 1 file changed: 0 ins; 10 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1653.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1653/head:pull/1653 PR: https://git.openjdk.org/skara/pull/1653 From erikj at openjdk.org Mon Jun 3 18:02:59 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 3 Jun 2024 18:02:59 GMT Subject: RFR: 2272: Improve issuestitleCheck [v3] In-Reply-To: References: Message-ID: On Mon, 3 Jun 2024 17:11:13 GMT, Zhao Song wrote: >> IssuestitleCheck was enabled in jdk recently, but this seems triggers too many false positive warnings and makes people feel annoying. >> >> In this patch, I am trying to make the issuestitle check more tolerant. For some known cases, issuestitle check wouldn't generate issues. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > remove executable list Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1653#pullrequestreview-2094536621 From zsong at openjdk.org Mon Jun 3 18:12:29 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Jun 2024 18:12:29 GMT Subject: RFR: 2272: Improve issuestitleCheck [v3] In-Reply-To: References: Message-ID: On Mon, 3 Jun 2024 17:11:13 GMT, Zhao Song wrote: >> IssuestitleCheck was enabled in jdk recently, but this seems triggers too many false positive warnings and makes people feel annoying. >> >> In this patch, I am trying to make the issuestitle check more tolerant. For some known cases, issuestitle check wouldn't generate issues. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > remove executable list Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1653#issuecomment-2145827424 From zsong at openjdk.org Mon Jun 3 18:12:29 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Jun 2024 18:12:29 GMT Subject: Integrated: 2272: Improve issuestitleCheck In-Reply-To: References: Message-ID: On Fri, 31 May 2024 19:02:09 GMT, Zhao Song wrote: > IssuestitleCheck was enabled in jdk recently, but this seems triggers too many false positive warnings and makes people feel annoying. > > In this patch, I am trying to make the issuestitle check more tolerant. For some known cases, issuestitle check wouldn't generate issues. This pull request has now been integrated. Changeset: 53601bbe Author: Zhao Song URL: https://git.openjdk.org/skara/commit/53601bbe4b6e6272cc403337a6977f7941a06f79 Stats: 28 lines in 2 files changed: 24 ins; 0 del; 4 mod 2272: Improve issuestitleCheck Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1653 From zsong at openjdk.org Mon Jun 3 21:14:34 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 3 Jun 2024 21:14:34 GMT Subject: RFR: 2258: Skara won't allow "/csr unneeded" after CSR has been Withdrawn Message-ID: <_YkAn_bO0eDyCzdI55HTn4yUxTmXpxIR6W156UjFEk4=.bd885881-e93f-4f0c-b009-73645bc0f6d0@github.com> When processing "/csr unneeded" command, skara bot will use pr body to check if there are any open csrs associated with the pr. However, there is a race condition here, after the user withdraws the csr, the bot needs some time to update the pr body. Therefore, if the user issues "/csr unneeded" immediately after withdrawing the csr in JBS, it's very likely that the bot would use stale pr body and make the wrong judgement. I think the solution here is that when the bot finds existing csrs, the bot should fetch the csrs from JBS and double check if the csr issue is still open. Since the case is not very common, I believe this won't add many GET requests. ------------- Commit messages: - SKARA-2258 Changes: https://git.openjdk.org/skara/pull/1654/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1654&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2258 Stats: 11 lines in 2 files changed: 8 ins; 0 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1654.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1654/head:pull/1654 PR: https://git.openjdk.org/skara/pull/1654 From erikj at openjdk.org Tue Jun 4 12:53:10 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Jun 2024 12:53:10 GMT Subject: RFR: 2258: Skara won't allow "/csr unneeded" after CSR has been Withdrawn In-Reply-To: <_YkAn_bO0eDyCzdI55HTn4yUxTmXpxIR6W156UjFEk4=.bd885881-e93f-4f0c-b009-73645bc0f6d0@github.com> References: <_YkAn_bO0eDyCzdI55HTn4yUxTmXpxIR6W156UjFEk4=.bd885881-e93f-4f0c-b009-73645bc0f6d0@github.com> Message-ID: On Mon, 3 Jun 2024 20:45:42 GMT, Zhao Song wrote: > When processing "/csr unneeded" command, skara bot will use pr body to check if there are any open csrs associated with the pr. However, there is a race condition here, after the user withdraws the csr, the bot needs some time to update the pr body. Therefore, if the user issues "/csr unneeded" immediately after withdrawing the csr in JBS, it's very likely that the bot would use stale pr body and make the wrong judgement. > > I think the solution here is that when the bot finds existing csrs, the bot should fetch the csrs from JBS and double check if the csr issue is still open. Since the case is not very common, I believe this won't add many GET requests. I think this looks good. You aren't adding a new test so have you verified this in some other way or are the existing tests enough to cover it? ------------- Marked as reviewed by erikj (Lead). PR Review: https://git.openjdk.org/skara/pull/1654#pullrequestreview-2096300478 From zsong at openjdk.org Tue Jun 4 15:58:23 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 15:58:23 GMT Subject: Integrated: 2277: Integer Overflow when parsing GitHub comment id In-Reply-To: References: Message-ID: On Tue, 4 Jun 2024 15:27:44 GMT, Zhao Song wrote: > When parsing the comment id from Github, skara bot would convert the JSONValue to integer, then convert integer to string and now this is causing integer overflow. > > I thought we should just convert it from JSONValue to String. > But Erik pointed out this won't work. We should convert it to long and convert long to string Thank you for the quick review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1655#issuecomment-2147880796 From zsong at openjdk.org Tue Jun 4 15:58:23 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 15:58:23 GMT Subject: Integrated: 2277: Integer Overflow when parsing GitHub comment id In-Reply-To: References: Message-ID: On Tue, 4 Jun 2024 15:27:44 GMT, Zhao Song wrote: > When parsing the comment id from Github, skara bot would convert the JSONValue to integer, then convert integer to string and now this is causing integer overflow. > > I thought we should just convert it from JSONValue to String. > But Erik pointed out this won't work. We should convert it to long and convert long to string This pull request has now been integrated. Changeset: 963e380a Author: Zhao Song URL: https://git.openjdk.org/skara/commit/963e380a1297072aa94d7b09e0b58accf20a36e9 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 2277: Integer Overflow when parsing GitHub comment id Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1655 From erikj at openjdk.org Tue Jun 4 15:58:23 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Jun 2024 15:58:23 GMT Subject: Integrated: 2277: Integer Overflow when parsing GitHub comment id In-Reply-To: References: Message-ID: <1H1FByfMnvzQT9YXwERvO3K-12JGBQslyIO95ANSdEQ=.a59f9f81-b6c3-461f-9cb5-d90661203bfd@github.com> On Tue, 4 Jun 2024 15:27:44 GMT, Zhao Song wrote: > When parsing the comment id from Github, skara bot would convert the JSONValue to integer, then convert integer to string and now this is causing integer overflow. > > I thought we should just convert it from JSONValue to String. > But Erik pointed out this won't work. We should convert it to long and convert long to string Marked as reviewed by erikj (Lead). I don't think this will work. JSONNumber.asString() throws exception. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1655#pullrequestreview-2096773355 Changes requested by erikj (Lead). PR Review: https://git.openjdk.org/skara/pull/1655#pullrequestreview-2096782165 PR Review: https://git.openjdk.org/skara/pull/1655#pullrequestreview-2096817498 From zsong at openjdk.org Tue Jun 4 15:58:23 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 15:58:23 GMT Subject: Integrated: 2277: Integer Overflow when parsing GitHub comment id Message-ID: When parsing the comment id from Github, skara bot would convert the JSONValue to integer, then convert integer to string and now this is causing integer overflow. I thought we should just convert it from JSONValue to String. But Erik pointed out this won't work. We should convert it to long and convert long to string ------------- Commit messages: - Use Long - SKARA-2277 Changes: https://git.openjdk.org/skara/pull/1655/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1655&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2277 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1655.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1655/head:pull/1655 PR: https://git.openjdk.org/skara/pull/1655 From zsong at openjdk.org Tue Jun 4 17:13:42 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 17:13:42 GMT Subject: RFR: 2258: Skara won't allow "/csr unneeded" after CSR has been Withdrawn In-Reply-To: <_YkAn_bO0eDyCzdI55HTn4yUxTmXpxIR6W156UjFEk4=.bd885881-e93f-4f0c-b009-73645bc0f6d0@github.com> References: <_YkAn_bO0eDyCzdI55HTn4yUxTmXpxIR6W156UjFEk4=.bd885881-e93f-4f0c-b009-73645bc0f6d0@github.com> Message-ID: On Mon, 3 Jun 2024 20:45:42 GMT, Zhao Song wrote: > When processing "/csr unneeded" command, skara bot will use pr body to check if there are any open csrs associated with the pr. However, there is a race condition here, after the user withdraws the csr, the bot needs some time to update the pr body. Therefore, if the user issues "/csr unneeded" immediately after withdrawing the csr in JBS, it's very likely that the bot would use stale pr body and make the wrong judgement. > > I think the solution here is that when the bot finds existing csrs, the bot should fetch the csrs from JBS and double check if the csr issue is still open. Since the case is not very common, I believe this won't add many GET requests. Thank you for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1654#issuecomment-2148022711 From zsong at openjdk.org Tue Jun 4 17:13:42 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 17:13:42 GMT Subject: Integrated: 2258: Skara won't allow "/csr unneeded" after CSR has been Withdrawn In-Reply-To: <_YkAn_bO0eDyCzdI55HTn4yUxTmXpxIR6W156UjFEk4=.bd885881-e93f-4f0c-b009-73645bc0f6d0@github.com> References: <_YkAn_bO0eDyCzdI55HTn4yUxTmXpxIR6W156UjFEk4=.bd885881-e93f-4f0c-b009-73645bc0f6d0@github.com> Message-ID: On Mon, 3 Jun 2024 20:45:42 GMT, Zhao Song wrote: > When processing "/csr unneeded" command, skara bot will use pr body to check if there are any open csrs associated with the pr. However, there is a race condition here, after the user withdraws the csr, the bot needs some time to update the pr body. Therefore, if the user issues "/csr unneeded" immediately after withdrawing the csr in JBS, it's very likely that the bot would use stale pr body and make the wrong judgement. > > I think the solution here is that when the bot finds existing csrs, the bot should fetch the csrs from JBS and double check if the csr issue is still open. Since the case is not very common, I believe this won't add many GET requests. This pull request has now been integrated. Changeset: c6aeba84 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/c6aeba8415a157b9b98c0b90baee674f62e2aaa7 Stats: 11 lines in 2 files changed: 8 ins; 0 del; 3 mod 2258: Skara won't allow "/csr unneeded" after CSR has been Withdrawn Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1654 From zsong at openjdk.org Tue Jun 4 17:15:40 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 17:15:40 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter Message-ID: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. ------------- Commit messages: - SKARA-2278 Changes: https://git.openjdk.org/skara/pull/1656/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1656&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2278 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1656.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1656/head:pull/1656 PR: https://git.openjdk.org/skara/pull/1656 From kcr at openjdk.org Tue Jun 4 18:23:41 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 4 Jun 2024 18:23:41 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter In-Reply-To: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: On Tue, 4 Jun 2024 17:09:46 GMT, Zhao Song wrote: > Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. This change will fix this specific problem, but I wonder if it would be better to step back and rethink this check. The main thing this check is trying to catch is the case of an all lower-case initial word, so I would test for _that_ rather than checking that the initial word starts with a lower-case letter and doesn't contain certain other characters. Something like this: Pattern ALL_LOWER_CASE = Pattern.compile("[a-z]+"); ... boolean hasLeadingLowerCaseWord(String description) { var firstWord = description.split(" ")[0]; return ALL_LOWER_CASE.matcher(description).matches(); } Then you can get rid of the `FILE_OR_FUNCTION_PATTERN` regex. This has the benefit of not warning on any camel case word (e.g., "macOS") and also means you won't have to keep adding special characters to the `FILE_OR_FUNCTION_PATTERN` (which I predict you will otherwise have to do at some point) ------------- PR Comment: https://git.openjdk.org/skara/pull/1656#issuecomment-2148140420 From zsong at openjdk.org Tue Jun 4 18:33:11 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 18:33:11 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: On Tue, 4 Jun 2024 18:21:37 GMT, Kevin Rushforth wrote: > This change will fix this specific problem, but I wonder if it would be better to step back and rethink this check. The main thing this check is trying to catch is the case of an all lower-case initial word, so I would test for _that_ rather than checking that the initial word starts with a lower-case letter and doesn't contain certain other characters. > > Something like this: > > ``` > Pattern ALL_LOWER_CASE = Pattern.compile("[a-z]+"); > ... > > boolean hasLeadingLowerCaseWord(String description) { > var firstWord = description.split(" ")[0]; > return ALL_LOWER_CASE.matcher(description).matches(); > } > ``` > > Then you can get rid of the `FILE_OR_FUNCTION_PATTERN` regex. > > This has the benefit of not warning on any camel case word (e.g., "macOS") and also means you won't have to keep adding special characters to the `FILE_OR_FUNCTION_PATTERN` (which I predict you will otherwise have to do at some point) Seems like it's a good idea. I will think of it. Thank you! ------------- PR Comment: https://git.openjdk.org/skara/pull/1656#issuecomment-2148159023 From zsong at openjdk.org Tue Jun 4 18:47:48 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 18:47:48 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: > Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: update ------------- Changes: - all: https://git.openjdk.org/skara/pull/1656/files - new: https://git.openjdk.org/skara/pull/1656/files/f0c70f70..b172940c Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1656&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1656&range=00-01 Stats: 7 lines in 1 file changed: 0 ins; 5 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1656.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1656/head:pull/1656 PR: https://git.openjdk.org/skara/pull/1656 From kcr at openjdk.org Tue Jun 4 19:41:42 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 4 Jun 2024 19:41:42 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: On Tue, 4 Jun 2024 18:47:48 GMT, Zhao Song wrote: >> Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > update Looks good, but I would wait for Erik. I left one question. jcheck/src/main/java/org/openjdk/skara/jcheck/IssuesTitleCheck.java line 91: > 89: > 90: private boolean hasLeadingLowerCaseLetter(String description) { > 91: return ALL_LOWER_CASE_PATTERN.matcher(description.split(" ")[0]).matches(); I presume that `description` has been `trim`med? If so, then this should be fine without additional checks. ------------- PR Review: https://git.openjdk.org/skara/pull/1656#pullrequestreview-2097246737 PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626518215 From erikj at openjdk.org Tue Jun 4 19:48:15 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Jun 2024 19:48:15 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> On Tue, 4 Jun 2024 18:47:48 GMT, Zhao Song wrote: >> Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > update jcheck/src/main/java/org/openjdk/skara/jcheck/IssuesTitleCheck.java line 91: > 89: > 90: private boolean hasLeadingLowerCaseLetter(String description) { > 91: return ALL_LOWER_CASE_PATTERN.matcher(description.split(" ")[0]).matches(); This could all be captured in the regex instead of splitting the string first. Something like `"[a-z]+(:?\\h.*)?"` should do it I think. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626517594 From kcr at openjdk.org Tue Jun 4 20:12:15 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 4 Jun 2024 20:12:15 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> Message-ID: <795gTbYJg6M_PWFjvlLYBSsBJ_k8V2p5wMoK3lO7rJQ=.140b2133-973b-4e8b-9432-0edc911887f5@github.com> On Tue, 4 Jun 2024 19:38:12 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> update > > jcheck/src/main/java/org/openjdk/skara/jcheck/IssuesTitleCheck.java line 91: > >> 89: >> 90: private boolean hasLeadingLowerCaseLetter(String description) { >> 91: return ALL_LOWER_CASE_PATTERN.matcher(description.split(" ")[0]).matches(); > > This could all be captured in the regex instead of splitting the string first. Something like `"[a-z]+(:?\\h.*)?"` should do it I think. Is the `:?` needed? It seems redundant, but I'm not a regex expert. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626549953 From zsong at openjdk.org Tue Jun 4 20:14:58 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 20:14:58 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: On Tue, 4 Jun 2024 19:38:47 GMT, Kevin Rushforth wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> update > > jcheck/src/main/java/org/openjdk/skara/jcheck/IssuesTitleCheck.java line 91: > >> 89: >> 90: private boolean hasLeadingLowerCaseLetter(String description) { >> 91: return ALL_LOWER_CASE_PATTERN.matcher(description.split(" ")[0]).matches(); > > I presume that `description` has been `trim`med? If so, then this should be fine without additional checks. Yes, the description has been trimmed ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626552532 From zsong at openjdk.org Tue Jun 4 20:20:56 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 20:20:56 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: <795gTbYJg6M_PWFjvlLYBSsBJ_k8V2p5wMoK3lO7rJQ=.140b2133-973b-4e8b-9432-0edc911887f5@github.com> References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> <795gTbYJg6M_PWFjvlLYBSsBJ_k8V2p5wMoK3lO7rJQ=.140b2133-973b-4e8b-9432-0edc911887f5@github.com> Message-ID: On Tue, 4 Jun 2024 20:10:08 GMT, Kevin Rushforth wrote: >> jcheck/src/main/java/org/openjdk/skara/jcheck/IssuesTitleCheck.java line 91: >> >>> 89: >>> 90: private boolean hasLeadingLowerCaseLetter(String description) { >>> 91: return ALL_LOWER_CASE_PATTERN.matcher(description.split(" ")[0]).matches(); >> >> This could all be captured in the regex instead of splitting the string first. Something like `"[a-z]+(:?\\h.*)?"` should do it I think. > > Is the `:?` needed? It seems redundant, but I'm not a regex expert. I think Erik has a typo here, should be `"[a-z]+(?:\\h.*)?"`? ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626555807 From kcr at openjdk.org Tue Jun 4 20:20:56 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 4 Jun 2024 20:20:56 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> <795gTbYJg6M_PWFjvlLYBSsBJ_k8V2p5wMoK3lO7rJQ=.140b2133-973b-4e8b-9432-0edc911887f5@github.com> Message-ID: On Tue, 4 Jun 2024 20:16:19 GMT, Zhao Song wrote: >> Is the `:?` needed? It seems redundant, but I'm not a regex expert. > > I think Erik has a typo here, should be `"[a-z]+(?:\\h.*)?"`? On closer look, the "`:?`" won't do what we want. It will match one of the patterns we explicitly do not want to match: `"abc: def"`. So I think that should just be: `"[a-z]+(\\h.*)?"` ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626557165 From zsong at openjdk.org Tue Jun 4 20:20:56 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 20:20:56 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> <795gTbYJg6M_PWFjvlLYBSsBJ_k8V2p5wMoK3lO7rJQ=.140b2133-973b-4e8b-9432-0edc911887f5@github.com> Message-ID: On Tue, 4 Jun 2024 20:17:45 GMT, Kevin Rushforth wrote: >> I think Erik has a typo here, should be `"[a-z]+(?:\\h.*)?"`? > > On closer look, the "`:?`" won't do what we want. It will match one of the patterns we explicitly do not want to match: `"abc: def"`. So I think that should just be: `"[a-z]+(\\h.*)?"` I think Erik was trying to use the non-capturing pattern `?:...` ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626558261 From kcr at openjdk.org Tue Jun 4 20:56:55 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 4 Jun 2024 20:56:55 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> <795gTbYJg6M_PWFjvlLYBSsBJ_k8V2p5wMoK3lO7rJQ=.140b2133-973b-4e8b-9432-0edc911887f5@github.com> Message-ID: <5s0HZPBXotwkH340XwsVM1al2kG1Waq4BFxIvobVfNM=.e6d58a17-0566-4e2a-a11d-7b06c65b36ae@github.com> On Tue, 4 Jun 2024 20:18:52 GMT, Zhao Song wrote: >> On closer look, the "`:?`" won't do what we want. It will match one of the patterns we explicitly do not want to match: `"abc: def"`. So I think that should just be: `"[a-z]+(\\h.*)?"` > > I think Erik was trying to use the non-capturing pattern `?:...` Ah, you may be right (in which case _that_ would be fine). ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626592802 From zsong at openjdk.org Tue Jun 4 21:08:10 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 4 Jun 2024 21:08:10 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v3] In-Reply-To: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: > Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: review comment ------------- Changes: - all: https://git.openjdk.org/skara/pull/1656/files - new: https://git.openjdk.org/skara/pull/1656/files/b172940c..25ad6e9c Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1656&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1656&range=01-02 Stats: 10 lines in 2 files changed: 0 ins; 4 del; 6 mod Patch: https://git.openjdk.org/skara/pull/1656.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1656/head:pull/1656 PR: https://git.openjdk.org/skara/pull/1656 From kcr at openjdk.org Tue Jun 4 22:19:47 2024 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 4 Jun 2024 22:19:47 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v3] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: <7qU4M-g3U5LpSOLOfjMKf-1rKcpzIAaaHV_V_pj0WdU=.2e841eef-b0d7-4871-bacf-0769ec7e2187@github.com> On Tue, 4 Jun 2024 21:08:10 GMT, Zhao Song wrote: >> Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Marked as reviewed by kcr (Reviewer). ------------- PR Review: https://git.openjdk.org/skara/pull/1656#pullrequestreview-2097480365 From erikj at openjdk.org Tue Jun 4 23:54:07 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Jun 2024 23:54:07 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v3] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: On Tue, 4 Jun 2024 21:08:10 GMT, Zhao Song wrote: >> Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1656#pullrequestreview-2097595587 From erikj at openjdk.org Tue Jun 4 23:54:07 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 4 Jun 2024 23:54:07 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v2] In-Reply-To: <5s0HZPBXotwkH340XwsVM1al2kG1Waq4BFxIvobVfNM=.e6d58a17-0566-4e2a-a11d-7b06c65b36ae@github.com> References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> <6SJHxQ4zzS0jirnt84IZp5e2nOrrnHEU11nZWjdub9g=.e150a4f2-4386-4bb7-ab28-22494d9f592d@github.com> <795gTbYJg6M_PWFjvlLYBSsBJ_k8V2p5wMoK3lO7rJQ=.140b2133-973b-4e8b-9432-0edc911887f5@github.com> <5s0HZPBXotwkH340XwsVM1al2kG1Waq4BFxIvobVfNM=.e6d58a17-0566-4e2a-a11d-7b06c65b36ae@github.com> Message-ID: On Tue, 4 Jun 2024 20:54:50 GMT, Kevin Rushforth wrote: >> I think Erik was trying to use the non-capturing pattern `?:...` > > Ah, you may be right (in which case _that_ would be fine). That was indeed what I was going for. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1656#discussion_r1626756617 From zsong at openjdk.org Wed Jun 5 17:23:36 2024 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Jun 2024 17:23:36 GMT Subject: RFR: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter [v3] In-Reply-To: References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: <_CUthKfH1joSmddxv8xJ-DMpKZFUI9diob9RH6dDohc=.38358018-4309-42b3-ad48-5e97ec022898@github.com> On Tue, 4 Jun 2024 21:08:10 GMT, Zhao Song wrote: >> Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Thank you both for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1656#issuecomment-2150577120 From zsong at openjdk.org Wed Jun 5 17:23:36 2024 From: zsong at openjdk.org (Zhao Song) Date: Wed, 5 Jun 2024 17:23:36 GMT Subject: Integrated: 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter In-Reply-To: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> References: <4w2vFqYkZ_TmbNOTuPha6E54bqEQMiBMwejT-BGOzRM=.e5c43359-d421-4165-b210-4aa8ba42b997@github.com> Message-ID: <1UL3fY4jRTYjHrcnM65icha9oGVhGzzh2uD70GgYRjY=.52015560-682b-4539-8ea6-a4942733f515@github.com> On Tue, 4 Jun 2024 17:09:46 GMT, Zhao Song wrote: > Currently, in IssuesTitleCheck::hasLeadingLowercaseLetter, the method checks if the leading character is uppercase, if so, it returns false. Otherwise, it will treat the character as lowercase. This is wrong because it treats special characters as lowercase letters. The solution is to make the method to check if the leading character is a lowercase letter. This pull request has now been integrated. Changeset: 9d884b9e Author: Zhao Song URL: https://git.openjdk.org/skara/commit/9d884b9e0c12e94341b7368314c77b289be4c0cf Stats: 15 lines in 2 files changed: 0 ins; 9 del; 6 mod 2278: Issuestitle Check shouldn't treat special character as leading lowercase letter Co-authored-by: Kevin Rushforth Reviewed-by: kcr, erikj ------------- PR: https://git.openjdk.org/skara/pull/1656 From zsong at openjdk.org Thu Jun 6 21:33:56 2024 From: zsong at openjdk.org (Zhao Song) Date: Thu, 6 Jun 2024 21:33:56 GMT Subject: RFR: 2279: Improve JSONNumber::asInt usage to prevent future break Message-ID: [SKARA-2277](https://bugs.openjdk.org/browse/SKARA-2277) is an instance of a breakage caused by improper usage of JSONNumber::asInt. In our project, there are other usages of JSONNumber::asInt, we should clean them up to prevent future break. As Erik said, he thinks it's fine to treat user ids and repository ids as int. Here are the other 2 places that might break. GitLabRepository::toCommitComment treats note ids as int. GitHubPullRequest::reviews treats review ids as int. Besides, I changed the type of id from int to String in Review.java ------------- Commit messages: - update - SKARA-2279 Changes: https://git.openjdk.org/skara/pull/1657/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1657&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2279 Stats: 25 lines in 6 files changed: 0 ins; 0 del; 25 mod Patch: https://git.openjdk.org/skara/pull/1657.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1657/head:pull/1657 PR: https://git.openjdk.org/skara/pull/1657 From erikj at openjdk.org Thu Jun 6 21:45:43 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 6 Jun 2024 21:45:43 GMT Subject: RFR: 2279: Improve JSONNumber::asInt usage to prevent future break In-Reply-To: References: Message-ID: <_4Zbib1q6R4_cHA-T5GtmqCeJJdGh1I-U-oL_GRAibY=.bc7a3807-fb70-439e-a5ad-5fca58183d26@github.com> On Thu, 6 Jun 2024 21:24:09 GMT, Zhao Song wrote: > [SKARA-2277](https://bugs.openjdk.org/browse/SKARA-2277) is an instance of a breakage caused by improper usage of JSONNumber::asInt. In our project, there are other usages of JSONNumber::asInt, we should clean them up to prevent future break. > > As Erik said, he thinks it's fine to treat user ids and repository ids as int. > > Here are the other 2 places that might break. > > GitLabRepository::toCommitComment treats note ids as int. > GitHubPullRequest::reviews treats review ids as int. > > Besides, I changed the type of id from int to String in Review.java Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1657#pullrequestreview-2103266465 From zsong at openjdk.org Fri Jun 7 16:36:53 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 16:36:53 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks Message-ID: In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make jcheck cli able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. ------------- Commit messages: - update - update - SKARA-2286 Changes: https://git.openjdk.org/skara/pull/1658/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1658&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2286 Stats: 16 lines in 3 files changed: 13 ins; 0 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1658.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1658/head:pull/1658 PR: https://git.openjdk.org/skara/pull/1658 From zsong at openjdk.org Fri Jun 7 17:32:01 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 17:32:01 GMT Subject: RFR: 2279: Improve JSONNumber::asInt usage to prevent future break In-Reply-To: References: Message-ID: On Thu, 6 Jun 2024 21:24:09 GMT, Zhao Song wrote: > [SKARA-2277](https://bugs.openjdk.org/browse/SKARA-2277) is an instance of a breakage caused by improper usage of JSONNumber::asInt. In our project, there are other usages of JSONNumber::asInt, we should clean them up to prevent future break. > > As Erik said, he thinks it's fine to treat user ids and repository ids as int. > > Here are the other 2 places that might break. > > GitLabRepository::toCommitComment treats note ids as int. > GitHubPullRequest::reviews treats review ids as int. > > Besides, I changed the type of id from int to String in Review.java Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1657#issuecomment-2155246464 From zsong at openjdk.org Fri Jun 7 17:32:01 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 17:32:01 GMT Subject: Integrated: 2279: Improve JSONNumber::asInt usage to prevent future break In-Reply-To: References: Message-ID: On Thu, 6 Jun 2024 21:24:09 GMT, Zhao Song wrote: > [SKARA-2277](https://bugs.openjdk.org/browse/SKARA-2277) is an instance of a breakage caused by improper usage of JSONNumber::asInt. In our project, there are other usages of JSONNumber::asInt, we should clean them up to prevent future break. > > As Erik said, he thinks it's fine to treat user ids and repository ids as int. > > Here are the other 2 places that might break. > > GitLabRepository::toCommitComment treats note ids as int. > GitHubPullRequest::reviews treats review ids as int. > > Besides, I changed the type of id from int to String in Review.java This pull request has now been integrated. Changeset: 3f7de91f Author: Zhao Song URL: https://git.openjdk.org/skara/commit/3f7de91f35ee79c32d79f2d57ac550152f710fc1 Stats: 25 lines in 6 files changed: 0 ins; 0 del; 25 mod 2279: Improve JSONNumber::asInt usage to prevent future break Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1657 From erikj at openjdk.org Fri Jun 7 17:34:49 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 7 Jun 2024 17:34:49 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks In-Reply-To: References: Message-ID: <-JT-9nohK3-E1ga29KpLtkRUQ1zzt_d3bC2Qr0fWQTs=.c9d80bd5-12e6-4402-ae4f-caf9da68f1ed@github.com> On Fri, 7 Jun 2024 16:23:19 GMT, Zhao Song wrote: > In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. > > When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 333: > 331: ranges.clear(); > 332: ranges.add(WORKING_TREE_REV); > 333: System.out.println("When jcheck is running on working-tree, the following checks are not available: DuplicateIssuesCheck, IssuesCheck, IssuesTitleCheck, MergeMessageCheck, MessageCheck, ProblemListsCheck, ReviewersCheck."); Instead of listing the checks that aren't available, I think we should list the checks that are and base that list on the actual list in JCheck.java. A manually created message like this will likely get outdated in the future. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1658#discussion_r1631508831 From zsong at openjdk.org Fri Jun 7 17:49:30 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 17:49:30 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks In-Reply-To: <-JT-9nohK3-E1ga29KpLtkRUQ1zzt_d3bC2Qr0fWQTs=.c9d80bd5-12e6-4402-ae4f-caf9da68f1ed@github.com> References: <-JT-9nohK3-E1ga29KpLtkRUQ1zzt_d3bC2Qr0fWQTs=.c9d80bd5-12e6-4402-ae4f-caf9da68f1ed@github.com> Message-ID: On Fri, 7 Jun 2024 17:32:39 GMT, Erik Joelsson wrote: >> In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. >> >> When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. > > cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 333: > >> 331: ranges.clear(); >> 332: ranges.add(WORKING_TREE_REV); >> 333: System.out.println("When jcheck is running on working-tree, the following checks are not available: DuplicateIssuesCheck, IssuesCheck, IssuesTitleCheck, MergeMessageCheck, MessageCheck, ProblemListsCheck, ReviewersCheck."); > > Instead of listing the checks that aren't available, I think we should list the checks that are and base that list on the actual list in JCheck.java. A manually created message like this will likely get outdated in the future. Right, will fix it. Thanks! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1658#discussion_r1631522208 From zsong at openjdk.org Fri Jun 7 18:08:55 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 18:08:55 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks [v2] In-Reply-To: References: Message-ID: > In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. > > When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: review comment ------------- Changes: - all: https://git.openjdk.org/skara/pull/1658/files - new: https://git.openjdk.org/skara/pull/1658/files/229e5a5d..da514368 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1658&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1658&range=00-01 Stats: 26 lines in 2 files changed: 13 ins; 9 del; 4 mod Patch: https://git.openjdk.org/skara/pull/1658.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1658/head:pull/1658 PR: https://git.openjdk.org/skara/pull/1658 From zsong at openjdk.org Fri Jun 7 18:22:03 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 18:22:03 GMT Subject: RFR: 2290: Update PullRequest::updateReview Message-ID: In [SKARA-2279](https://bugs.openjdk.org/browse/SKARA-2279), I changed the type of id from int to String in Review.java, but I didn't update the type of id in the interface of PullRequest::updateReview. ------------- Commit messages: - SKARA-2290 Changes: https://git.openjdk.org/skara/pull/1659/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1659&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2290 Stats: 5 lines in 5 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/skara/pull/1659.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1659/head:pull/1659 PR: https://git.openjdk.org/skara/pull/1659 From erikj at openjdk.org Fri Jun 7 19:31:41 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 7 Jun 2024 19:31:41 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks [v2] In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 18:08:55 GMT, Zhao Song wrote: >> In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. >> >> When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 328: > 326: ranges.clear(); > 327: ranges.add(STAGED_REV); > 328: System.out.println("When jcheck is running on staged, the following commit checks are available: " + JCheck.commitCheckNamesForStagedOrWorkingTree()); Suggestion: System.out.println("When jcheck is running on staged, only the following commit checks are available: " + JCheck.commitCheckNamesForStagedOrWorkingTree()); cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 333: > 331: ranges.clear(); > 332: ranges.add(WORKING_TREE_REV); > 333: System.out.println("When jcheck is running on working-tree, the following commit checks are available: " + JCheck.commitCheckNamesForStagedOrWorkingTree()); Suggestion: System.out.println("When jcheck is running on working-tree, only the following commit checks are available: " + JCheck.commitCheckNamesForStagedOrWorkingTree()); ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1658#discussion_r1631611335 PR Review Comment: https://git.openjdk.org/skara/pull/1658#discussion_r1631611676 From erikj at openjdk.org Fri Jun 7 19:32:39 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 7 Jun 2024 19:32:39 GMT Subject: RFR: 2290: Update PullRequest::updateReview In-Reply-To: References: Message-ID: <-MCOnobeNjk8FrMpLVlI6kSsv7m4vK_waqewHCpKNsY=.87a7bddc-4094-4d53-bc9a-d84b6cd73969@github.com> On Fri, 7 Jun 2024 18:17:22 GMT, Zhao Song wrote: > In [SKARA-2279](https://bugs.openjdk.org/browse/SKARA-2279), I changed the type of id from int to String in Review.java, but I didn't update the type of id in the interface of PullRequest::updateReview. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1659#pullrequestreview-2105239928 From zsong at openjdk.org Fri Jun 7 20:29:59 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 20:29:59 GMT Subject: RFR: 2290: Update PullRequest::updateReview In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 18:17:22 GMT, Zhao Song wrote: > In [SKARA-2279](https://bugs.openjdk.org/browse/SKARA-2279), I changed the type of id from int to String in Review.java, but I didn't update the type of id in the interface of PullRequest::updateReview. Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1659#issuecomment-2155500682 From zsong at openjdk.org Fri Jun 7 20:29:59 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 20:29:59 GMT Subject: Integrated: 2290: Update PullRequest::updateReview In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 18:17:22 GMT, Zhao Song wrote: > In [SKARA-2279](https://bugs.openjdk.org/browse/SKARA-2279), I changed the type of id from int to String in Review.java, but I didn't update the type of id in the interface of PullRequest::updateReview. This pull request has now been integrated. Changeset: c40e621f Author: Zhao Song URL: https://git.openjdk.org/skara/commit/c40e621f27de28844fed9fa89c3cf909885a1922 Stats: 5 lines in 5 files changed: 0 ins; 0 del; 5 mod 2290: Update PullRequest::updateReview Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1659 From zsong at openjdk.org Fri Jun 7 20:31:33 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 20:31:33 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks [v3] In-Reply-To: References: Message-ID: > In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. > > When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. Zhao Song has updated the pull request incrementally with two additional commits since the last revision: - Update cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> - Update cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1658/files - new: https://git.openjdk.org/skara/pull/1658/files/da514368..169e2157 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1658&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1658&range=01-02 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1658.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1658/head:pull/1658 PR: https://git.openjdk.org/skara/pull/1658 From erikj at openjdk.org Fri Jun 7 21:09:51 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 7 Jun 2024 21:09:51 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks [v3] In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 20:31:33 GMT, Zhao Song wrote: >> In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. >> >> When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. > > Zhao Song has updated the pull request incrementally with two additional commits since the last revision: > > - Update cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> > - Update cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1658#pullrequestreview-2105372400 From zsong at openjdk.org Fri Jun 7 21:29:38 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 21:29:38 GMT Subject: RFR: 2286: Git jcheck --working-tree/--staged not compatible with some checks [v3] In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 20:31:33 GMT, Zhao Song wrote: >> In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. >> >> When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. > > Zhao Song has updated the pull request incrementally with two additional commits since the last revision: > > - Update cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> > - Update cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> Thank you for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1658#issuecomment-2155583174 From zsong at openjdk.org Fri Jun 7 21:29:38 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 7 Jun 2024 21:29:38 GMT Subject: Integrated: 2286: Git jcheck --working-tree/--staged not compatible with some checks In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 16:23:19 GMT, Zhao Song wrote: > In [SKARA-1690](https://bugs.openjdk.org/browse/SKARA-1690), I tried to make SKARA CLI able to run jcheck on the diff in current working tree. But seems like this feature is not compatible with some jchecks like problemLists check. > > When jcheck is checking staged or working-tree, I think there is no point to run some checks that require real commit message. Therefore I disabled the checks and Skara CLI will print a prompt to user. This pull request has now been integrated. Changeset: c93a0d00 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/c93a0d00578b36cb0239202855499913c28d257d Stats: 23 lines in 3 files changed: 19 ins; 0 del; 4 mod 2286: Git jcheck --working-tree/--staged not compatible with some checks Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1658 From volker.simonis at gmail.com Mon Jun 10 15:24:36 2024 From: volker.simonis at gmail.com (Volker Simonis) Date: Mon, 10 Jun 2024 17:24:36 +0200 Subject: Review and Commit links for backport branches Message-ID: Hi, After the JDK stabilization process has moved from using dedicated repositories to using branches in the https://git.openjdk.org/jdk repository, I noticed that Commit, Review and PullRequest links for the master repository are now indistinguishable from the corresponding downport links. E.g. from https://bugs.openjdk.org/browse/JDK-8333722: Commit openjdk/jdk/5f9d3e3a Commit openjdk/jdk/fdbc2b24 Review openjdk/jdk/19578 Review openjdk/jdk/19622 Previously, such links were easily distinguishable because they were for different repositories. I wonder if it would be possible to somehow add the branch name to the link description, if it is not master, in order to make it more clear what they refer to. E.g. Commit openjdk/jdk/5f9d3e3a Commit openjdk/jdk:23/fdbc2b24 Review openjdk/jdk/19578 Review openjdk/jdk:23/19622 Thank you and best regards, Volker From kevin.rushforth at oracle.com Mon Jun 10 15:30:28 2024 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 10 Jun 2024 08:30:28 -0700 Subject: Review and Commit links for backport branches In-Reply-To: References: Message-ID: <1e052d9e-38ff-4cbb-b09b-df3a90de124d@oracle.com> This would just affect the link text in the issue links section, right? If we do this, I would just use the branch name, so "jdk23" not "23", but this seems like a reasonable Enhancement request to me, but Erik will need to weigh in on this. -- Kevin On 6/10/2024 8:24 AM, Volker Simonis wrote: > Hi, > > After the JDK stabilization process has moved from using dedicated > repositories to using branches in the https://git.openjdk.org/jdk > repository, I noticed that Commit, Review and PullRequest links for > the master repository are now indistinguishable from the corresponding > downport links. E.g. from https://bugs.openjdk.org/browse/JDK-8333722: > > Commit openjdk/jdk/5f9d3e3a > Commit openjdk/jdk/fdbc2b24 > > Review openjdk/jdk/19578 > Review openjdk/jdk/19622 > > Previously, such links were easily distinguishable because they were > for different repositories. > > I wonder if it would be possible to somehow add the branch name to the > link description, if it is not master, in order to make it more clear > what they refer to. E.g. > > Commit openjdk/jdk/5f9d3e3a > Commit openjdk/jdk:23/fdbc2b24 > > Review openjdk/jdk/19578 > Review openjdk/jdk:23/19622 > > Thank you and best regards, > Volker From volker.simonis at gmail.com Mon Jun 10 15:43:57 2024 From: volker.simonis at gmail.com (Volker Simonis) Date: Mon, 10 Jun 2024 17:43:57 +0200 Subject: Review and Commit links for backport branches In-Reply-To: <1e052d9e-38ff-4cbb-b09b-df3a90de124d@oracle.com> References: <1e052d9e-38ff-4cbb-b09b-df3a90de124d@oracle.com> Message-ID: On Mon, Jun 10, 2024 at 5:31?PM Kevin Rushforth wrote: > > This would just affect the link text in the issue links section, right? > If we do this, I would just use the branch name, so "jdk23" not "23", Yes, just the text. We can't change the link, because that's for the "jdk" repository in both cases. Any syntax would be fine for me (jdk:23, jdk:jdk23 or jdk23) as long as the version could easily be identified. > but this seems like a reasonable Enhancement request to me, but Erik > will need to weigh in on this. > > -- Kevin > > > On 6/10/2024 8:24 AM, Volker Simonis wrote: > > Hi, > > > > After the JDK stabilization process has moved from using dedicated > > repositories to using branches in the https://git.openjdk.org/jdk > > repository, I noticed that Commit, Review and PullRequest links for > > the master repository are now indistinguishable from the corresponding > > downport links. E.g. from https://bugs.openjdk.org/browse/JDK-8333722: > > > > Commit openjdk/jdk/5f9d3e3a > > Commit openjdk/jdk/fdbc2b24 > > > > Review openjdk/jdk/19578 > > Review openjdk/jdk/19622 > > > > Previously, such links were easily distinguishable because they were > > for different repositories. > > > > I wonder if it would be possible to somehow add the branch name to the > > link description, if it is not master, in order to make it more clear > > what they refer to. E.g. > > > > Commit openjdk/jdk/5f9d3e3a > > Commit openjdk/jdk:23/fdbc2b24 > > > > Review openjdk/jdk/19578 > > Review openjdk/jdk:23/19622 > > > > Thank you and best regards, > > Volker > From kevin.rushforth at oracle.com Mon Jun 10 15:56:21 2024 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 10 Jun 2024 08:56:21 -0700 Subject: [External] : Re: Review and Commit links for backport branches In-Reply-To: References: <1e052d9e-38ff-4cbb-b09b-df3a90de124d@oracle.com> Message-ID: <6c11a7a7-8932-4d2c-9715-1213a539026b@oracle.com> That sounds good then. Can you file a JBS Enhancement request in the SKARA project, "bot" component? Erik can then decide whether / how to proceed. -- Kevin On 6/10/2024 8:43 AM, Volker Simonis wrote: > On Mon, Jun 10, 2024 at 5:31?PM Kevin Rushforth > wrote: >> This would just affect the link text in the issue links section, right? >> If we do this, I would just use the branch name, so "jdk23" not "23", > Yes, just the text. We can't change the link, because that's for the > "jdk" repository in both cases. > > Any syntax would be fine for me (jdk:23, jdk:jdk23 or jdk23) as long > as the version could easily be identified. > >> but this seems like a reasonable Enhancement request to me, but Erik >> will need to weigh in on this. >> >> -- Kevin >> >> >> On 6/10/2024 8:24 AM, Volker Simonis wrote: >>> Hi, >>> >>> After the JDK stabilization process has moved from using dedicated >>> repositories to using branches in the https://git.openjdk.org/jdk >>> repository, I noticed that Commit, Review and PullRequest links for >>> the master repository are now indistinguishable from the corresponding >>> downport links. E.g. from https://bugs.openjdk.org/browse/JDK-8333722: >>> >>> Commit openjdk/jdk/5f9d3e3a >>> Commit openjdk/jdk/fdbc2b24 >>> >>> Review openjdk/jdk/19578 >>> Review openjdk/jdk/19622 >>> >>> Previously, such links were easily distinguishable because they were >>> for different repositories. >>> >>> I wonder if it would be possible to somehow add the branch name to the >>> link description, if it is not master, in order to make it more clear >>> what they refer to. E.g. >>> >>> Commit openjdk/jdk/5f9d3e3a >>> Commit openjdk/jdk:23/fdbc2b24 >>> >>> Review openjdk/jdk/19578 >>> Review openjdk/jdk:23/19622 >>> >>> Thank you and best regards, >>> Volker From volker.simonis at gmail.com Mon Jun 10 16:32:19 2024 From: volker.simonis at gmail.com (Volker Simonis) Date: Mon, 10 Jun 2024 18:32:19 +0200 Subject: [External] : Re: Review and Commit links for backport branches In-Reply-To: <6c11a7a7-8932-4d2c-9715-1213a539026b@oracle.com> References: <1e052d9e-38ff-4cbb-b09b-df3a90de124d@oracle.com> <6c11a7a7-8932-4d2c-9715-1213a539026b@oracle.com> Message-ID: Done: https://bugs.openjdk.org/browse/SKARA-2292 On Mon, Jun 10, 2024 at 5:57?PM Kevin Rushforth wrote: > > That sounds good then. Can you file a JBS Enhancement request in the > SKARA project, "bot" component? Erik can then decide whether / how to > proceed. > > -- Kevin > > > On 6/10/2024 8:43 AM, Volker Simonis wrote: > > On Mon, Jun 10, 2024 at 5:31?PM Kevin Rushforth > > wrote: > >> This would just affect the link text in the issue links section, right? > >> If we do this, I would just use the branch name, so "jdk23" not "23", > > Yes, just the text. We can't change the link, because that's for the > > "jdk" repository in both cases. > > > > Any syntax would be fine for me (jdk:23, jdk:jdk23 or jdk23) as long > > as the version could easily be identified. > > > >> but this seems like a reasonable Enhancement request to me, but Erik > >> will need to weigh in on this. > >> > >> -- Kevin > >> > >> > >> On 6/10/2024 8:24 AM, Volker Simonis wrote: > >>> Hi, > >>> > >>> After the JDK stabilization process has moved from using dedicated > >>> repositories to using branches in the https://git.openjdk.org/jdk > >>> repository, I noticed that Commit, Review and PullRequest links for > >>> the master repository are now indistinguishable from the corresponding > >>> downport links. E.g. from https://bugs.openjdk.org/browse/JDK-8333722: > >>> > >>> Commit openjdk/jdk/5f9d3e3a > >>> Commit openjdk/jdk/fdbc2b24 > >>> > >>> Review openjdk/jdk/19578 > >>> Review openjdk/jdk/19622 > >>> > >>> Previously, such links were easily distinguishable because they were > >>> for different repositories. > >>> > >>> I wonder if it would be possible to somehow add the branch name to the > >>> link description, if it is not master, in order to make it more clear > >>> what they refer to. E.g. > >>> > >>> Commit openjdk/jdk/5f9d3e3a > >>> Commit openjdk/jdk:23/fdbc2b24 > >>> > >>> Review openjdk/jdk/19578 > >>> Review openjdk/jdk:23/19622 > >>> > >>> Thank you and best regards, > >>> Volker > From zsong at openjdk.org Fri Jun 14 18:01:54 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 14 Jun 2024 18:01:54 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor Message-ID: PullRequestCheckIssueVisitor is responsible for generating error messages when jcheck fails. Currently, jcheck could be configured as different severity(error or warning). However, when generating error messages for some jchecks like binary check, the error message would be like "Binary files are not allowed", so if the binary check was configured as warning, this message seems too hard. Therefore, I would like to rephrase some error messages. Erik suggested that we should generate different messages depending on the severity, but I think maybe it's unnecessary. The user does not need to judge the severity depending on the error message. The user only needs to check which section is the message under(Integration Blocker or Warning). ------------- Commit messages: - fix test - update - SKARA-2295 Changes: https://git.openjdk.org/skara/pull/1660/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1660&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2295 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/skara/pull/1660.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1660/head:pull/1660 PR: https://git.openjdk.org/skara/pull/1660 From erikj at openjdk.org Fri Jun 14 18:34:35 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 14 Jun 2024 18:34:35 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor In-Reply-To: References: Message-ID: On Thu, 13 Jun 2024 23:15:15 GMT, Zhao Song wrote: > PullRequestCheckIssueVisitor is responsible for generating error messages when jcheck fails. Currently, jcheck could be configured as different severity(error or warning). However, when generating error messages for some jchecks like binary check, the error message would be like "Binary files are not allowed", so if the binary check was configured as warning, this message seems too hard. Therefore, I would like to rephrase some error messages. > > Erik suggested that we should generate different messages depending on the severity, but I think maybe it's unnecessary. The user does not need to judge the severity depending on the error message. The user only needs to check which section is the message under(Integration Blocker or Warning). I meant that each visit method needs to check the severity and print the appropriate error message for the severity. ------------- PR Review: https://git.openjdk.org/skara/pull/1660#pullrequestreview-2119021669 From zsong at openjdk.org Fri Jun 14 18:38:01 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 14 Jun 2024 18:38:01 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor In-Reply-To: References: Message-ID: On Fri, 14 Jun 2024 18:32:24 GMT, Erik Joelsson wrote: > I meant that each visit method needs to check the severity and print the appropriate error message for the severity. Yes, but as I said in the PR body, maybe it's too complicated? Or you think it's necessary... ------------- PR Comment: https://git.openjdk.org/skara/pull/1660#issuecomment-2168563157 From erikj at openjdk.org Fri Jun 14 19:52:46 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 14 Jun 2024 19:52:46 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor In-Reply-To: References: Message-ID: On Fri, 14 Jun 2024 18:35:51 GMT, Zhao Song wrote: > Yes, but as I said in the PR body, maybe it's too complicated? Or you think it's necessary... Sorry, I didn't read that part fully until now. You have a point, but after having thought about this for a bit I still think it would be better to write separate messages. If it's an error it needs to be clear that it's an error. ------------- PR Comment: https://git.openjdk.org/skara/pull/1660#issuecomment-2168663088 From erikj at openjdk.org Fri Jun 14 19:52:46 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 14 Jun 2024 19:52:46 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor In-Reply-To: References: Message-ID: On Thu, 13 Jun 2024 23:15:15 GMT, Zhao Song wrote: > PullRequestCheckIssueVisitor is responsible for generating error messages when jcheck fails. Currently, jcheck could be configured as different severity(error or warning). However, when generating error messages for some jchecks like binary check, the error message would be like "Binary files are not allowed", so if the binary check was configured as warning, this message seems too hard. Therefore, I would like to rephrase some error messages. > > Erik suggested that we should generate different messages depending on the severity, but I think maybe it's unnecessary. The user does not need to judge the severity depending on the error message. The user only needs to check which section is the message under(Integration Blocker or Warning). bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestCheckIssueVisitor.java line 283: > 281: @Override > 282: public void visit(ExecutableIssue issue) { > 283: addMessage(issue.check(), String.format("Patch contains an executable file (file: %s)", issue.path()), issue.severity()); I think for the warning variant, leave out the "file:" part since the sentence is already ending with "file". It looks a bit weird repeating the word. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1660#discussion_r1640276692 From zsong at openjdk.org Fri Jun 14 21:25:55 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 14 Jun 2024 21:25:55 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor [v2] In-Reply-To: References: Message-ID: > PullRequestCheckIssueVisitor is responsible for generating error messages when jcheck fails. Currently, jcheck could be configured as different severity(error or warning). However, when generating error messages for some jchecks like binary check, the error message would be like "Binary files are not allowed", so if the binary check was configured as warning, this message seems too hard. Therefore, I would like to rephrase some error messages. > > Erik suggested that we should generate different messages depending on the severity, but I think maybe it's unnecessary. The user does not need to judge the severity depending on the error message. The user only needs to check which section is the message under(Integration Blocker or Warning). Zhao Song has updated the pull request incrementally with one additional commit since the last revision: review comment ------------- Changes: - all: https://git.openjdk.org/skara/pull/1660/files - new: https://git.openjdk.org/skara/pull/1660/files/0458d2b3..7218b75a Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1660&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1660&range=00-01 Stats: 23 lines in 2 files changed: 11 ins; 0 del; 12 mod Patch: https://git.openjdk.org/skara/pull/1660.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1660/head:pull/1660 PR: https://git.openjdk.org/skara/pull/1660 From erikj at openjdk.org Fri Jun 14 21:43:20 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 14 Jun 2024 21:43:20 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor [v2] In-Reply-To: References: Message-ID: On Fri, 14 Jun 2024 21:25:55 GMT, Zhao Song wrote: >> PullRequestCheckIssueVisitor is responsible for generating error messages when jcheck fails. Currently, jcheck could be configured as different severity(error or warning). However, when generating error messages for some jchecks like binary check, the error message would be like "Binary files are not allowed", so if the binary check was configured as warning, this message seems too hard. Therefore, I would like to rephrase some error messages. >> >> Erik suggested that we should generate different messages depending on the severity, but I think maybe it's unnecessary. The user does not need to judge the severity depending on the error message. The user only needs to check which section is the message under(Integration Blocker or Warning). > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Nice, I like these more nuanced messages. ------------- Marked as reviewed by erikj (Lead). PR Review: https://git.openjdk.org/skara/pull/1660#pullrequestreview-2119369767 From zsong at openjdk.org Fri Jun 14 21:54:00 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 14 Jun 2024 21:54:00 GMT Subject: RFR: 2295: Rephrase error messages in PullRequestCheckIssueVisitor [v2] In-Reply-To: References: Message-ID: On Fri, 14 Jun 2024 21:25:55 GMT, Zhao Song wrote: >> PullRequestCheckIssueVisitor is responsible for generating error messages when jcheck fails. Currently, jcheck could be configured as different severity(error or warning). However, when generating error messages for some jchecks like binary check, the error message would be like "Binary files are not allowed", so if the binary check was configured as warning, this message seems too hard. Therefore, I would like to rephrase some error messages. >> >> Erik suggested that we should generate different messages depending on the severity, but I think maybe it's unnecessary. The user does not need to judge the severity depending on the error message. The user only needs to check which section is the message under(Integration Blocker or Warning). > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1660#issuecomment-2168808416 From zsong at openjdk.org Fri Jun 14 21:54:01 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 14 Jun 2024 21:54:01 GMT Subject: Integrated: 2295: Rephrase error messages in PullRequestCheckIssueVisitor In-Reply-To: References: Message-ID: <-SAeBrSlN8VfcJLC1S_xY_xVANCMYKyW-bz3JeJgqEE=.8bd84a7a-48c4-4d8d-98b3-521e4afdbc9b@github.com> On Thu, 13 Jun 2024 23:15:15 GMT, Zhao Song wrote: > PullRequestCheckIssueVisitor is responsible for generating error messages when jcheck fails. Currently, jcheck could be configured as different severity(error or warning). However, when generating error messages for some jchecks like binary check, the error message would be like "Binary files are not allowed", so if the binary check was configured as warning, this message seems too hard. Therefore, I would like to rephrase some error messages. > > Erik suggested that we should generate different messages depending on the severity, but I think maybe it's unnecessary. The user does not need to judge the severity depending on the error message. The user only needs to check which section is the message under(Integration Blocker or Warning). This pull request has now been integrated. Changeset: 19a83f28 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/19a83f283f7434cf000d13ad419e89fc55f2a9fa Stats: 21 lines in 1 file changed: 11 ins; 0 del; 10 mod 2295: Rephrase error messages in PullRequestCheckIssueVisitor Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1660 From zsong at openjdk.org Thu Jun 20 18:34:13 2024 From: zsong at openjdk.org (Zhao Song) Date: Thu, 20 Jun 2024 18:34:13 GMT Subject: RFR: 2297: CSRs for OpenJDK 8u backports not being picked up Message-ID: Currently, the version matching logic in `Backports::findClosetIssue` and `Backports::findIssue` differs, causing the skara bot fail to find CSRs for some issues. In this patch, I'm trying to unify the version matching logic between the two methods. I couldn't find a good way to reuse the previous methods(`Backports::matchVersion`, `Backports::matchOptPoolVersion`, `Backports::matchPoolVersion`, `Backports::matchScratchVersion`), so I changed the interface of the methods. ------------- Commit messages: - update comment - SKARA-2297 Changes: https://git.openjdk.org/skara/pull/1661/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1661&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2297 Stats: 59 lines in 2 files changed: 5 ins; 23 del; 31 mod Patch: https://git.openjdk.org/skara/pull/1661.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1661/head:pull/1661 PR: https://git.openjdk.org/skara/pull/1661 From erikj at openjdk.org Mon Jun 24 09:25:26 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 24 Jun 2024 09:25:26 GMT Subject: RFR: 2297: CSRs for OpenJDK 8u backports not being picked up In-Reply-To: References: Message-ID: On Thu, 20 Jun 2024 18:00:02 GMT, Zhao Song wrote: > Currently, the version matching logic in `Backports::findClosetIssue` and `Backports::findIssue` differs, causing the skara bot fail to find CSRs for some issues. > > In this patch, I'm trying to unify the version matching logic between the two methods. I couldn't find a good way to reuse the previous methods(`Backports::matchVersion`, `Backports::matchOptPoolVersion`, `Backports::matchPoolVersion`, `Backports::matchScratchVersion`), so I changed the interface of the methods. Marked as reviewed by erikj (Lead). jbs/src/main/java/org/openjdk/skara/jbs/Backports.java line 172: > 170: .filter(Backports::isNonScratchVersion) > 171: .toList(); > 172: return nonScratch.size() == 0; Maybe use `noneMatch`? ------------- PR Review: https://git.openjdk.org/skara/pull/1661#pullrequestreview-2135157685 PR Review Comment: https://git.openjdk.org/skara/pull/1661#discussion_r1650655125 From zsong at openjdk.org Mon Jun 24 17:07:29 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 24 Jun 2024 17:07:29 GMT Subject: RFR: 2297: CSRs for OpenJDK 8u backports not being picked up [v2] In-Reply-To: References: Message-ID: > Currently, the version matching logic in `Backports::findClosetIssue` and `Backports::findIssue` differs, causing the skara bot fail to find CSRs for some issues. > > In this patch, I'm trying to unify the version matching logic between the two methods. I couldn't find a good way to reuse the previous methods(`Backports::matchVersion`, `Backports::matchOptPoolVersion`, `Backports::matchPoolVersion`, `Backports::matchScratchVersion`), so I changed the interface of the methods. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: review comment ------------- Changes: - all: https://git.openjdk.org/skara/pull/1661/files - new: https://git.openjdk.org/skara/pull/1661/files/8f323b68..2e4ef8cf Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1661&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1661&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1661.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1661/head:pull/1661 PR: https://git.openjdk.org/skara/pull/1661 From zsong at openjdk.org Mon Jun 24 19:46:33 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 24 Jun 2024 19:46:33 GMT Subject: RFR: 2297: CSRs for OpenJDK 8u backports not being picked up [v2] In-Reply-To: References: Message-ID: On Mon, 24 Jun 2024 17:07:29 GMT, Zhao Song wrote: >> Currently, the version matching logic in `Backports::findClosetIssue` and `Backports::findIssue` differs, causing the skara bot fail to find CSRs for some issues. >> >> In this patch, I'm trying to unify the version matching logic between the two methods. I couldn't find a good way to reuse the previous methods(`Backports::matchVersion`, `Backports::matchOptPoolVersion`, `Backports::matchPoolVersion`, `Backports::matchScratchVersion`), so I changed the interface of the methods. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > review comment Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1661#issuecomment-2187282500 From zsong at openjdk.org Mon Jun 24 19:46:33 2024 From: zsong at openjdk.org (Zhao Song) Date: Mon, 24 Jun 2024 19:46:33 GMT Subject: Integrated: 2297: CSRs for OpenJDK 8u backports not being picked up In-Reply-To: References: Message-ID: On Thu, 20 Jun 2024 18:00:02 GMT, Zhao Song wrote: > Currently, the version matching logic in `Backports::findClosetIssue` and `Backports::findIssue` differs, causing the skara bot fail to find CSRs for some issues. > > In this patch, I'm trying to unify the version matching logic between the two methods. I couldn't find a good way to reuse the previous methods(`Backports::matchVersion`, `Backports::matchOptPoolVersion`, `Backports::matchPoolVersion`, `Backports::matchScratchVersion`), so I changed the interface of the methods. This pull request has now been integrated. Changeset: 2e662961 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/2e6629612be49741d34d4287be7fccbb0058885b Stats: 60 lines in 2 files changed: 5 ins; 25 del; 30 mod 2297: CSRs for OpenJDK 8u backports not being picked up Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1661 From zsong at openjdk.org Tue Jun 25 00:27:52 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Jun 2024 00:27:52 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type Message-ID: When testing [SKARA-2303](https://bugs.openjdk.org/browse/SKARA-2303), I found that even when there are few binary files in a diff, the pr body only warns about one binary file. Then I found that in PullRequestCheckIssueVisitor, we are using HashMap to store the error messages, so if there are few issues with the same type, the HashMap is only able to save the last error message. ------------- Commit messages: - SKARA-2307 Changes: https://git.openjdk.org/skara/pull/1662/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1662&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2307 Stats: 26 lines in 2 files changed: 8 ins; 0 del; 18 mod Patch: https://git.openjdk.org/skara/pull/1662.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1662/head:pull/1662 PR: https://git.openjdk.org/skara/pull/1662 From erikj at openjdk.org Tue Jun 25 07:05:20 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Jun 2024 07:05:20 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type In-Reply-To: References: Message-ID: On Mon, 24 Jun 2024 22:31:58 GMT, Zhao Song wrote: > When testing [SKARA-2303](https://bugs.openjdk.org/browse/SKARA-2303), I found that even when there are few binary files in a diff, the pr body only warns about one binary file. Then I found that in PullRequestCheckIssueVisitor, we are using HashMap to store the error messages, so if there are few issues with the same type, the HashMap is only able to save the last error message. I wonder if this was done on purpose to limit the number of issues listed. Is there a limitation on the number of errors shown in the presentation layer? Do all checks produce unique messages (like which file has the problem) for each instance? If not, then having multiple instances with the same message isn't going to be very helpful. ------------- PR Review: https://git.openjdk.org/skara/pull/1662#pullrequestreview-2137550610 From zsong at openjdk.org Tue Jun 25 16:47:37 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Jun 2024 16:47:37 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type In-Reply-To: References: Message-ID: On Tue, 25 Jun 2024 07:03:13 GMT, Erik Joelsson wrote: > I wonder if this was done on purpose to limit the number of issues listed. Maybe not intended since this behavior is only in PullRequestCheckIssueVisitor. In JCheckCLIVisitor, it will print all the messages. > Is there a limitation on the number of errors shown in the presentation layer? No. > Do all checks produce unique messages (like which file has the problem) for each instance? If not, then having multiple instances with the same message isn't going to be very helpful. Yes, all checks will generate unique messages otherwise it will only generate one issue. ------------- PR Comment: https://git.openjdk.org/skara/pull/1662#issuecomment-2189443593 From erikj at openjdk.org Tue Jun 25 17:37:46 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Jun 2024 17:37:46 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type In-Reply-To: References: Message-ID: <0kOfWe6KGiOlorq5wNZbjweJTeSwgt1Ha2QQ529iEYg=.bb5ff843-0299-4a88-b4c7-e3020d1e8ba5@github.com> On Tue, 25 Jun 2024 16:45:19 GMT, Zhao Song wrote: >> Is there a limitation on the number of errors shown in the presentation layer? > No. The previous implementation did provide an implicit limitation to the number of errors/warnings printed. I think we should add a new explicit limit if we fix this. Something like max 50 or so to avoid flooding the PR body with it. ------------- PR Comment: https://git.openjdk.org/skara/pull/1662#issuecomment-2189565050 From zsong at openjdk.org Tue Jun 25 19:47:03 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Jun 2024 19:47:03 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type In-Reply-To: <0kOfWe6KGiOlorq5wNZbjweJTeSwgt1Ha2QQ529iEYg=.bb5ff843-0299-4a88-b4c7-e3020d1e8ba5@github.com> References: <0kOfWe6KGiOlorq5wNZbjweJTeSwgt1Ha2QQ529iEYg=.bb5ff843-0299-4a88-b4c7-e3020d1e8ba5@github.com> Message-ID: On Tue, 25 Jun 2024 17:35:13 GMT, Erik Joelsson wrote: > > > Is there a limitation on the number of errors shown in the presentation layer? > > > No. > > The previous implementation did provide an implicit limitation to the number of errors/warnings printed. I think we should add a new explicit limit if we fix this. Something like max 50 or so to avoid flooding the PR body with it. Okay, 50 for all checks or 50 for each check? ------------- PR Comment: https://git.openjdk.org/skara/pull/1662#issuecomment-2189841830 From erikj at openjdk.org Tue Jun 25 20:28:41 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 25 Jun 2024 20:28:41 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type In-Reply-To: References: Message-ID: On Mon, 24 Jun 2024 22:31:58 GMT, Zhao Song wrote: > When testing [SKARA-2303](https://bugs.openjdk.org/browse/SKARA-2303), I found that even when there are few binary files in a diff, the pr body only warns about one binary file. Then I found that in PullRequestCheckIssueVisitor, we are using HashMap to store the error messages, so if there are few issues with the same type, the HashMap is only able to save the last error message. I meant 50 total. ------------- PR Comment: https://git.openjdk.org/skara/pull/1662#issuecomment-2189908557 From zsong at openjdk.org Tue Jun 25 22:16:35 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Jun 2024 22:16:35 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type [v2] In-Reply-To: References: Message-ID: > When testing [SKARA-2303](https://bugs.openjdk.org/browse/SKARA-2303), I found that even when there are few binary files in a diff, the pr body only warns about one binary file. Then I found that in PullRequestCheckIssueVisitor, we are using HashMap to store the error messages, so if there are few issues with the same type, the HashMap is only able to save the last error message. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: set limit for error messages ------------- Changes: - all: https://git.openjdk.org/skara/pull/1662/files - new: https://git.openjdk.org/skara/pull/1662/files/c50dc783..53fd8a14 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1662&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1662&range=00-01 Stats: 10 lines in 1 file changed: 6 ins; 0 del; 4 mod Patch: https://git.openjdk.org/skara/pull/1662.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1662/head:pull/1662 PR: https://git.openjdk.org/skara/pull/1662 From zsong at openjdk.org Tue Jun 25 23:43:58 2024 From: zsong at openjdk.org (Zhao Song) Date: Tue, 25 Jun 2024 23:43:58 GMT Subject: RFR: 2302: Notify when PR is ready for sponsor Message-ID: This patch is trying to make skara bot be able to send an email notification about the "pr is ready for sponsor" comment. ------------- Commit messages: - SKARA-2302 Changes: https://git.openjdk.org/skara/pull/1663/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1663&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2302 Stats: 28 lines in 4 files changed: 16 ins; 2 del; 10 mod Patch: https://git.openjdk.org/skara/pull/1663.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1663/head:pull/1663 PR: https://git.openjdk.org/skara/pull/1663 From erikj at openjdk.org Wed Jun 26 07:13:43 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 26 Jun 2024 07:13:43 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type [v2] In-Reply-To: References: Message-ID: On Tue, 25 Jun 2024 22:16:35 GMT, Zhao Song wrote: >> When testing [SKARA-2303](https://bugs.openjdk.org/browse/SKARA-2303), I found that even when there are few binary files in a diff, the pr body only warns about one binary file. Then I found that in PullRequestCheckIssueVisitor, we are using HashMap to store the error messages, so if there are few issues with the same type, the HashMap is only able to save the last error message. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > set limit for error messages Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1662#pullrequestreview-2140917324 From erikj at openjdk.org Wed Jun 26 08:42:31 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 26 Jun 2024 08:42:31 GMT Subject: RFR: 2302: Notify when PR is ready for sponsor In-Reply-To: References: Message-ID: <7oXNjIyQXuGQJ-emRomq1T2InoRDVlrxhewA3li-gIk=.f132cb60-5c87-4475-b51f-3a303f444a03@github.com> On Tue, 25 Jun 2024 23:39:42 GMT, Zhao Song wrote: > This patch is trying to make skara bot be able to send an email notification about the "pr is ready for sponsor" comment. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1663#pullrequestreview-2141133297 From zsong at openjdk.org Wed Jun 26 18:44:13 2024 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Jun 2024 18:44:13 GMT Subject: RFR: 2302: Notify when PR is ready for sponsor In-Reply-To: References: Message-ID: <-toF5SrRnTFlrTfZ7BxemL3TWCa5reSZlmwmbjswSTM=.d72a54b3-a013-4767-8ee1-4d3e9c221485@github.com> On Tue, 25 Jun 2024 23:39:42 GMT, Zhao Song wrote: > This patch is trying to make skara bot be able to send an email notification about the "pr is ready for sponsor" comment. Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1663#issuecomment-2192404910 From zsong at openjdk.org Wed Jun 26 18:44:13 2024 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Jun 2024 18:44:13 GMT Subject: Integrated: 2302: Notify when PR is ready for sponsor In-Reply-To: References: Message-ID: On Tue, 25 Jun 2024 23:39:42 GMT, Zhao Song wrote: > This patch is trying to make skara bot be able to send an email notification about the "pr is ready for sponsor" comment. This pull request has now been integrated. Changeset: 54a48dfd Author: Zhao Song URL: https://git.openjdk.org/skara/commit/54a48dfdd952747b9e17349f0ce6cbd8493e81f3 Stats: 28 lines in 4 files changed: 16 ins; 2 del; 10 mod 2302: Notify when PR is ready for sponsor Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1663 From zsong at openjdk.org Wed Jun 26 18:45:00 2024 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Jun 2024 18:45:00 GMT Subject: RFR: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type [v2] In-Reply-To: References: Message-ID: On Tue, 25 Jun 2024 22:16:35 GMT, Zhao Song wrote: >> When testing [SKARA-2303](https://bugs.openjdk.org/browse/SKARA-2303), I found that even when there are few binary files in a diff, the pr body only warns about one binary file. Then I found that in PullRequestCheckIssueVisitor, we are using HashMap to store the error messages, so if there are few issues with the same type, the HashMap is only able to save the last error message. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > set limit for error messages Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1662#issuecomment-2192406202 From zsong at openjdk.org Wed Jun 26 18:45:00 2024 From: zsong at openjdk.org (Zhao Song) Date: Wed, 26 Jun 2024 18:45:00 GMT Subject: Integrated: 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type In-Reply-To: References: Message-ID: On Mon, 24 Jun 2024 22:31:58 GMT, Zhao Song wrote: > When testing [SKARA-2303](https://bugs.openjdk.org/browse/SKARA-2303), I found that even when there are few binary files in a diff, the pr body only warns about one binary file. Then I found that in PullRequestCheckIssueVisitor, we are using HashMap to store the error messages, so if there are few issues with the same type, the HashMap is only able to save the last error message. This pull request has now been integrated. Changeset: 0a81cd1b Author: Zhao Song URL: https://git.openjdk.org/skara/commit/0a81cd1b3214c691dba47c2079e9f33556cca2d5 Stats: 36 lines in 3 files changed: 14 ins; 0 del; 22 mod 2307: PullRequestCheckIssueVisitor generates only one error message per Issue type Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1662 From prappo at openjdk.org Fri Jun 28 09:23:50 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 28 Jun 2024 09:23:50 GMT Subject: RFR: 2310: Add missing commas in copyright years Message-ID: Please review this utmost trivial change. ------------- Commit messages: - Initial commit Changes: https://git.openjdk.org/skara/pull/1664/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1664&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2310 Stats: 39 lines in 39 files changed: 0 ins; 0 del; 39 mod Patch: https://git.openjdk.org/skara/pull/1664.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1664/head:pull/1664 PR: https://git.openjdk.org/skara/pull/1664 From erikj at openjdk.org Fri Jun 28 15:19:02 2024 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 28 Jun 2024 15:19:02 GMT Subject: RFR: 2310: Add missing commas in copyright years In-Reply-To: References: Message-ID: On Fri, 28 Jun 2024 09:19:45 GMT, Pavel Rappo wrote: > Please review this utmost trivial change. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1664#pullrequestreview-2148294186 From zsong at openjdk.org Fri Jun 28 16:37:12 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 28 Jun 2024 16:37:12 GMT Subject: RFR: 2310: Add missing commas in copyright years In-Reply-To: References: Message-ID: On Fri, 28 Jun 2024 09:19:45 GMT, Pavel Rappo wrote: > Please review this utmost trivial change. Marked as reviewed by zsong (Reviewer). ------------- PR Review: https://git.openjdk.org/skara/pull/1664#pullrequestreview-2148458866 From prappo at openjdk.org Fri Jun 28 17:31:53 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 28 Jun 2024 17:31:53 GMT Subject: RFR: 2311: Use getLast and removeLast methods for lists Message-ID: Please review this simple refactoring to change most if not all occurrences of `list.get(x.size() - 1)` to `list.getLast()`. `getLast` was introduced in JDK 21, as part of JEP 431: Sequenced Collections, which also introduced a counterpart method, `getFirst()`. While there are also a lot of occurrences of `list.get(0)` in Skara codebase, changing them to `list.getFirst()` might be of insufficient benefit and, hence, is not proposed in this PR. I don't think that coinciding `get(0)` and `getLast()` would look inconsistent. The copyright years will be updated after this PR has been reviewed. ------------- Commit messages: - Initial commit Changes: https://git.openjdk.org/skara/pull/1665/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1665&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-2311 Stats: 51 lines in 22 files changed: 0 ins; 0 del; 51 mod Patch: https://git.openjdk.org/skara/pull/1665.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1665/head:pull/1665 PR: https://git.openjdk.org/skara/pull/1665 From prappo at openjdk.org Fri Jun 28 21:15:10 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 28 Jun 2024 21:15:10 GMT Subject: RFR: 2310: Add missing commas in copyright years [v2] In-Reply-To: References: Message-ID: > Please review this utmost trivial change. Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: Add an empty commit start GHA ------------- Changes: - all: https://git.openjdk.org/skara/pull/1664/files - new: https://git.openjdk.org/skara/pull/1664/files/9589fd9b..a4fa656e Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1664&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1664&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1664.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1664/head:pull/1664 PR: https://git.openjdk.org/skara/pull/1664 From prappo at openjdk.org Fri Jun 28 21:39:16 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 28 Jun 2024 21:39:16 GMT Subject: RFR: 2310: Add missing commas in copyright years [v3] In-Reply-To: References: Message-ID: > Please review this utmost trivial change. Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - Merge branch 'master' into 2310 - Add an empty commit start GHA - Initial commit ------------- Changes: - all: https://git.openjdk.org/skara/pull/1664/files - new: https://git.openjdk.org/skara/pull/1664/files/a4fa656e..2568dff4 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1664&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1664&range=01-02 Stats: 124 lines in 9 files changed: 35 ins; 27 del; 62 mod Patch: https://git.openjdk.org/skara/pull/1664.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1664/head:pull/1664 PR: https://git.openjdk.org/skara/pull/1664 From zsong at openjdk.org Fri Jun 28 21:39:31 2024 From: zsong at openjdk.org (Zhao Song) Date: Fri, 28 Jun 2024 21:39:31 GMT Subject: RFR: 2311: Use getLast and removeLast methods for lists In-Reply-To: References: Message-ID: <_kWT-Sp9casFQgyzeo35C0aTcW8fTpLFJKqQWNMF3_w=.57e908e0-301f-4d4a-b5a8-c178590b1b1d@github.com> On Fri, 28 Jun 2024 17:28:13 GMT, Pavel Rappo wrote: > Please review this simple refactoring to change most if not all occurrences of `list.get(x.size() - 1)` to `list.getLast()`. > > `getLast` was introduced in JDK 21, as part of JEP 431: Sequenced Collections, which also introduced a counterpart method, `getFirst()`. While there are also a lot of occurrences of `list.get(0)` in Skara codebase, changing them to `list.getFirst()` might be of insufficient benefit and, hence, is not proposed in this PR. I don't think that coinciding `get(0)` and `getLast()` would look inconsistent. > > The copyright years will be updated after this PR has been reviewed. LGTM! It's a very nice clean up. ------------- Marked as reviewed by zsong (Reviewer). PR Review: https://git.openjdk.org/skara/pull/1665#pullrequestreview-2149032585 From duke at openjdk.org Fri Jun 28 22:30:51 2024 From: duke at openjdk.org (duke) Date: Fri, 28 Jun 2024 22:30:51 GMT Subject: RFR: 2310: Add missing commas in copyright years [v3] In-Reply-To: References: Message-ID: On Fri, 28 Jun 2024 21:39:16 GMT, Pavel Rappo wrote: >> Please review this utmost trivial change. > > Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - Merge branch 'master' into 2310 > - Add an empty commit start GHA > - Initial commit @pavelrappo Your change (at version 2568dff4e9cbce7e27ceb6450e1c4fefc1530e10) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/skara/pull/1664#issuecomment-2197732525 From prappo at openjdk.org Fri Jun 28 22:43:18 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 28 Jun 2024 22:43:18 GMT Subject: Integrated: 2310: Add missing commas in copyright years In-Reply-To: References: Message-ID: <-Hjw-NqXfd4rEEJHlpJbMM_Qio0kirgBDED1lQ83DAs=.f6274e80-6fd7-4d10-aaa9-057dec9d6586@github.com> On Fri, 28 Jun 2024 09:19:45 GMT, Pavel Rappo wrote: > Please review this utmost trivial change. This pull request has now been integrated. Changeset: 44d92768 Author: Pavel Rappo Committer: Zhao Song URL: https://git.openjdk.org/skara/commit/44d927687865c52ee3fcd7733943db7cd1db7067 Stats: 39 lines in 39 files changed: 0 ins; 0 del; 39 mod 2310: Add missing commas in copyright years Reviewed-by: erikj, zsong ------------- PR: https://git.openjdk.org/skara/pull/1664 From prappo at openjdk.org Fri Jun 28 22:48:07 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 28 Jun 2024 22:48:07 GMT Subject: RFR: 2311: Use getLast and removeLast methods for lists [v2] In-Reply-To: References: Message-ID: > Please review this simple refactoring to change most if not all occurrences of `list.get(x.size() - 1)` to `list.getLast()`. > > `getLast` was introduced in JDK 21, as part of JEP 431: Sequenced Collections, which also introduced a counterpart method, `getFirst()`. While there are also a lot of occurrences of `list.get(0)` in Skara codebase, changing them to `list.getFirst()` might be of insufficient benefit and, hence, is not proposed in this PR. I don't think that coinciding `get(0)` and `getLast()` would look inconsistent. > > The copyright years will be updated after this PR has been reviewed. Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: - Merge branch 'openjdk:master' into 2311 - Initial commit ------------- Changes: - all: https://git.openjdk.org/skara/pull/1665/files - new: https://git.openjdk.org/skara/pull/1665/files/ceace51a..9680af96 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1665&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1665&range=00-01 Stats: 163 lines in 48 files changed: 35 ins; 27 del; 101 mod Patch: https://git.openjdk.org/skara/pull/1665.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1665/head:pull/1665 PR: https://git.openjdk.org/skara/pull/1665 From prappo at openjdk.org Fri Jun 28 23:05:30 2024 From: prappo at openjdk.org (Pavel Rappo) Date: Fri, 28 Jun 2024 23:05:30 GMT Subject: RFR: 2311: Use getLast and removeLast methods for lists [v3] In-Reply-To: References: Message-ID: > Please review this simple refactoring to change most if not all occurrences of `list.get(x.size() - 1)` to `list.getLast()`. > > `getLast` was introduced in JDK 21, as part of JEP 431: Sequenced Collections, which also introduced a counterpart method, `getFirst()`. While there are also a lot of occurrences of `list.get(0)` in Skara codebase, changing them to `list.getFirst()` might be of insufficient benefit and, hence, is not proposed in this PR. I don't think that coinciding `get(0)` and `getLast()` would look inconsistent. > > The copyright years will be updated after this PR has been reviewed. Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: Update copyright years Note: any commit hashes below might be outdated due to subsequent history rewriting (e.g. git rebase). + update args/src/main/java/org/openjdk/skara/args/ArgumentParser.java due to ceace51a + update bots/bridgekeeper/src/main/java/org/openjdk/skara/bots/bridgekeeper/PullRequestPrunerBot.java due to ceace51a + update bots/bridgekeeper/src/test/java/org/openjdk/skara/bots/bridgekeeper/PullRequestPrunerBotTests.java due to ceace51a + update bots/cli/src/test/java/org/openjdk/skara/bots/cli/BotSlackHandlerTests.java due to ceace51a + update bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/ArchiveItem.java due to ceace51a + update bots/notify/src/main/java/org/openjdk/skara/bots/notify/mailinglist/MailingListNotifier.java due to ceace51a + update bots/notify/src/test/java/org/openjdk/skara/bots/notify/issue/IssueNotifierTests.java due to ceace51a + update bots/notify/src/test/java/org/openjdk/skara/bots/notify/prbranch/PullRequestBranchNotifierTests.java due to ceace51a + update bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersTracker.java due to ceace51a + update bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRBotTests.java due to ceace51a + update bots/pr/src/test/java/org/openjdk/skara/bots/pr/CommitCommandAsserts.java due to ceace51a + update bots/pr/src/test/java/org/openjdk/skara/bots/pr/IntegrateTests.java due to ceace51a + update bots/pr/src/test/java/org/openjdk/skara/bots/pr/SponsorTests.java due to ceace51a + update forge/src/main/java/org/openjdk/skara/forge/PullRequest.java due to ceace51a + update test/src/main/java/org/openjdk/skara/test/HostCredentials.java due to ceace51a + update vcs/src/test/java/org/openjdk/skara/vcs/openjdk/converter/GitToHgConverterTests.java due to ceace51a + update webrev/src/main/java/org/openjdk/skara/webrev/HunkCoalescer.java due to ceace51a ------------- Changes: - all: https://git.openjdk.org/skara/pull/1665/files - new: https://git.openjdk.org/skara/pull/1665/files/9680af96..6e17f33c Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1665&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1665&range=01-02 Stats: 17 lines in 17 files changed: 0 ins; 0 del; 17 mod Patch: https://git.openjdk.org/skara/pull/1665.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1665/head:pull/1665 PR: https://git.openjdk.org/skara/pull/1665