From duke at openjdk.org Wed Mar 1 00:13:27 2023 From: duke at openjdk.org (Vijay Kulkarni) Date: Wed, 1 Mar 2023 00:13:27 GMT Subject: RFR: 755: Anything starting with a "/" is treated as a command [v3] In-Reply-To: References: Message-ID: > 755: Anything starting with a "/" is treated as a command Vijay Kulkarni has updated the pull request incrementally with one additional commit since the last revision: Fixed how modules are included, restored the original error message for invalid skara command ------------- Changes: - all: https://git.openjdk.org/skara/pull/1479/files - new: https://git.openjdk.org/skara/pull/1479/files/4b125592..526fc584 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1479&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1479&range=01-02 Stats: 23 lines in 5 files changed: 6 ins; 7 del; 10 mod Patch: https://git.openjdk.org/skara/pull/1479.diff Fetch: git fetch https://git.openjdk.org/skara pull/1479/head:pull/1479 PR: https://git.openjdk.org/skara/pull/1479 From duke at openjdk.org Wed Mar 1 00:17:53 2023 From: duke at openjdk.org (Vijay Kulkarni) Date: Wed, 1 Mar 2023 00:17:53 GMT Subject: RFR: 755: Anything starting with a "/" is treated as a command [v2] In-Reply-To: References: Message-ID: On Tue, 28 Feb 2023 21:28:18 GMT, Erik Joelsson wrote: >> Vijay Kulkarni has updated the pull request incrementally with one additional commit since the last revision: >> >> 755:unified the regex for archive and execution command. Bot should react to invalid sakra commands > > bots/mlbridge/build.gradle line 50: > >> 48: implementation project(':metrics') >> 49: implementation project(':bots:common') >> 50: implementation project(path: ':jbs') > > What does the `path:` prefix mean here? If it's not significant, better stay with the same pattern as the other dependencies. Yes sure, I removed it to be consistent. > bots/mlbridge/src/main/java/module-info.java line 35: > >> 33: requires org.openjdk.skara.network; >> 34: requires org.openjdk.skara.version; >> 35: requires org.openjdk.skara.jbs; > > Do we really require jbs now? I tried to remove it but got an error while running the test cases. I tried to add jbs as a test gradle dependency but it still complained during compiling code before running the tests. So I guess, it is needed along with the common module. Hence I did not make any changes. Here is the error message if removed. `> Task :bots:mlbridge:compileJava FAILED error: module not found: org.openjdk.skara.jbs 1 error` > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CommitCommandWorkItem.java line 118: > >> 116: `/{0}` is not a recognized Skara PR command, so it was ignored and treated like an ordinary comment. >> 117: If you intended to issue a Skara command, use `/help` in a comment to see a complete list of Skara commands. >> 118: """, command.name())); > > Since we are keeping the mail filtering rules the same as command execution, I don't think we should change this message. Sure, I reverted this change. > bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestCommandWorkItem.java line 172: > >> 170: `/{0}` is not a recognized Skara PR command, so it was ignored and treated like an ordinary comment >> 171: If you intended to issue a Skara command, use `/help` in a comment to see a complete list of Skara commands. >> 172: """, command.name())); > > Same here, keep the message as is. Sure, I reverted this change. ------------- PR: https://git.openjdk.org/skara/pull/1479 From erikj at openjdk.org Wed Mar 1 14:33:53 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 1 Mar 2023 14:33:53 GMT Subject: RFR: 755: Anything starting with a "/" is treated as a command [v3] In-Reply-To: References: Message-ID: On Wed, 1 Mar 2023 00:13:27 GMT, Vijay Kulkarni wrote: >> 755: Anything starting with a "/" is treated as a command > > Vijay Kulkarni has updated the pull request incrementally with one additional commit since the last revision: > > Fixed how modules are included, restored the original error message for invalid skara command Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.org/skara/pull/1479 From duke at openjdk.org Wed Mar 1 22:47:08 2023 From: duke at openjdk.org (Vijay Kulkarni) Date: Wed, 1 Mar 2023 22:47:08 GMT Subject: Integrated: 755: Anything starting with a "/" is treated as a command In-Reply-To: References: Message-ID: <6B3mBaJQS3v6J6nhYZxJCS1GOS9u-CbRDt5YWNVc_To=.1d4f9903-b85f-4823-9dd6-a566e77c335e@github.com> On Fri, 24 Feb 2023 14:38:34 GMT, Vijay Kulkarni wrote: > 755: Anything starting with a "/" is treated as a command This pull request has now been integrated. Changeset: 9a940008 Author: Vijay Kulkarni Committer: Erik Joelsson URL: https://git.openjdk.org/skara/commit/9a9400082adabf4856623e9943fa37870ca7cb90 Stats: 121 lines in 8 files changed: 93 ins; 5 del; 23 mod 755: Anything starting with a "/" is treated as a command Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1479 From zsong at openjdk.org Mon Mar 13 16:47:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 13 Mar 2023 16:47:18 GMT Subject: RFR: 1837: Skara bot continuously keeps updating the PR title Message-ID: A user reported that he found the bot is continuously updating the [pr](https://github.com/openjdk/jdk/pull/12797) body. After investigating, I found that this bug is a side effect of [SKARA-1807](https://bugs.openjdk.org/browse/SKARA-1807). In SKARA-1807, we escaped the issue title in PR body and the title of JDK-8303474 includes ?>?. So the csr issue title in the pr body is `(fc) FileChannel::transferFrom should support position > size()`. In some logic, the csr bot is looking for the title of the csr issue(not escaped), so the bot is looking for `(fc) FileChannel::transferFrom should support position > size()` and if the bot couldn?t find the csr issue title, the bot would assume this pr body is outdated and will update it. Therefore, the bot is stuck in an infinite loop. ------------- Commit messages: - dummy - SKARA-1837 Changes: https://git.openjdk.org/skara/pull/1480/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1480&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1837 Stats: 7 lines in 2 files changed: 1 ins; 0 del; 6 mod Patch: https://git.openjdk.org/skara/pull/1480.diff Fetch: git fetch https://git.openjdk.org/skara pull/1480/head:pull/1480 PR: https://git.openjdk.org/skara/pull/1480 From erikj at openjdk.org Mon Mar 13 16:56:29 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 13 Mar 2023 16:56:29 GMT Subject: RFR: 1837: Skara bot continuously keeps updating the PR title In-Reply-To: References: Message-ID: On Mon, 13 Mar 2023 16:36:11 GMT, Zhao Song wrote: > A user reported that he found the bot is continuously updating the [pr](https://github.com/openjdk/jdk/pull/12797) body. After investigating, I found that this bug is a side effect of [SKARA-1807](https://bugs.openjdk.org/browse/SKARA-1807). In SKARA-1807, we escaped the issue title in PR body and the title of JDK-8303474 includes ?>?. So the csr issue title in the pr body is `(fc) FileChannel::transferFrom should support position > size()`. In some logic, the csr bot is looking for the title of the csr issue(not escaped), so the bot is looking for `(fc) FileChannel::transferFrom should support position > size()` and if the bot couldn?t find the csr issue title, the bot would assume this pr body is outdated and will update it. Therefore, the bot is stuck in an infinite loop. Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.org/skara/pull/1480 From zsong at openjdk.org Mon Mar 13 17:00:15 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 13 Mar 2023 17:00:15 GMT Subject: Integrated: 1837: Skara bot continuously keeps updating the PR title In-Reply-To: References: Message-ID: On Mon, 13 Mar 2023 16:36:11 GMT, Zhao Song wrote: > A user reported that he found the bot is continuously updating the [pr](https://github.com/openjdk/jdk/pull/12797) body. After investigating, I found that this bug is a side effect of [SKARA-1807](https://bugs.openjdk.org/browse/SKARA-1807). In SKARA-1807, we escaped the issue title in PR body and the title of JDK-8303474 includes ?>?. So the csr issue title in the pr body is `(fc) FileChannel::transferFrom should support position > size()`. In some logic, the csr bot is looking for the title of the csr issue(not escaped), so the bot is looking for `(fc) FileChannel::transferFrom should support position > size()` and if the bot couldn?t find the csr issue title, the bot would assume this pr body is outdated and will update it. Therefore, the bot is stuck in an infinite loop. This pull request has now been integrated. Changeset: e2f9ebae Author: Zhao Song URL: https://git.openjdk.org/skara/commit/e2f9ebae6e22ca79ac7723ecfe6176e4f806fed7 Stats: 7 lines in 2 files changed: 1 ins; 0 del; 6 mod 1837: Skara bot continuously keeps updating the PR title Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1480 From erikj at openjdk.org Mon Mar 13 20:37:39 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 13 Mar 2023 20:37:39 GMT Subject: RFR: 1839: SKARA-1480 broke BridgeBotTests Message-ID: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> When changing all 'openjdk.java.net' references to 'openjdk.org', the BridgeBotTests broke, because we now have a different user mapping in those tests, which results in different Git hashes. These tests have an assumeTrue condition in the @BeforeClass setup, which will skip if the HG server isn't available. The URL to hg.openjdk.org uses 'http', which hasn't worked since the migration to the new URL, but some time during the last few days, it started responding to 'http', which caused the tests to start running again, and subsequently fail. This patch updates the Git hash to the new one being produced with the new user mapping, and changes the protocol to https for hg.openjdk.org, since that is the preferred one. ------------- Commit messages: - SKARA-1839 Changes: https://git.openjdk.org/skara/pull/1481/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1481&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1839 Stats: 14 lines in 1 file changed: 3 ins; 0 del; 11 mod Patch: https://git.openjdk.org/skara/pull/1481.diff Fetch: git fetch https://git.openjdk.org/skara pull/1481/head:pull/1481 PR: https://git.openjdk.org/skara/pull/1481 From zsong at openjdk.org Mon Mar 13 20:57:32 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 13 Mar 2023 20:57:32 GMT Subject: RFR: 1839: SKARA-1480 broke BridgeBotTests In-Reply-To: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> References: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> Message-ID: On Mon, 13 Mar 2023 20:33:24 GMT, Erik Joelsson wrote: > When changing all 'openjdk.java.net' references to 'openjdk.org', the BridgeBotTests broke, because we now have a different user mapping in those tests, which results in different Git hashes. > > These tests have an assumeTrue condition in the @BeforeClass setup, which will skip if the HG server isn't available. The URL to hg.openjdk.org uses 'http', which hasn't worked since the migration to the new URL, but some time during the last few days, it started responding to 'http', which caused the tests to start running again, and subsequently fail. > > This patch updates the Git hash to the new one being produced with the new user mapping, and changes the protocol to https for hg.openjdk.org, since that is the preferred one. This change looks good to me. But I don't know the meaning of 'user mapping' in the tests. Could you please explain it to me? ------------- PR: https://git.openjdk.org/skara/pull/1481 From erikj at openjdk.org Mon Mar 13 21:33:52 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 13 Mar 2023 21:33:52 GMT Subject: RFR: 1839: SKARA-1480 broke BridgeBotTests In-Reply-To: References: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> Message-ID: On Mon, 13 Mar 2023 20:55:17 GMT, Zhao Song wrote: > This change looks good to me. But I don't know the meaning of 'user mapping' in the tests. Could you please explain it to me? When converting from Mercurial to Git, we are also converting the format of users. In Mercurial, the user field in a changeset is generally on the form of a userId (erikj in my case). In Git the tradition is to use full name and email in every commit. The user mappings are used to help the conversion process translate from Mercurial users to Git users. In the test, there is a hardcoded mapping of two users (jjg and duke) which are the only ones represented in the changes being converted. Before SKARA-1480, the email addresses in these mappings where `*openjdk.java.net`, but in SKARA-1480 I changed them to `*openjdk.org`. This is causing the resulting Git hash to be different after the conversion. ------------- PR: https://git.openjdk.org/skara/pull/1481 From zsong at openjdk.org Mon Mar 13 21:46:41 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 13 Mar 2023 21:46:41 GMT Subject: RFR: 1839: SKARA-1480 broke BridgeBotTests In-Reply-To: References: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> Message-ID: On Mon, 13 Mar 2023 21:31:42 GMT, Erik Joelsson wrote: > > This change looks good to me. But I don't know the meaning of 'user mapping' in the tests. Could you please explain it to me? > > When converting from Mercurial to Git, we are also converting the format of users. In Mercurial, the user field in a changeset is generally on the form of a userId (erikj in my case). In Git the tradition is to use full name and email in every commit. The user mappings are used to help the conversion process translate from Mercurial users to Git users. In the test, there is a hardcoded mapping of two users (jjg and duke) which are the only ones represented in the changes being converted. Before SKARA-1480, the email addresses in these mappings where `*openjdk.java.net`, but in SKARA-1480 I changed them to `*openjdk.org`. This is causing the resulting Git hash to be different after the conversion. Thank you so much for this detailed explanation! ------------- PR: https://git.openjdk.org/skara/pull/1481 From kcr at openjdk.org Mon Mar 13 21:51:30 2023 From: kcr at openjdk.org (Kevin Rushforth) Date: Mon, 13 Mar 2023 21:51:30 GMT Subject: RFR: 1839: SKARA-1480 broke BridgeBotTests In-Reply-To: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> References: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> Message-ID: <9HWOKGey_N90AKq-xgyRnSIdWtCQI9IsXerhBg_02PU=.5d215484-310e-4aa6-b8a3-3155cf55e5c5@github.com> On Mon, 13 Mar 2023 20:33:24 GMT, Erik Joelsson wrote: > When changing all 'openjdk.java.net' references to 'openjdk.org', the BridgeBotTests broke, because we now have a different user mapping in those tests, which results in different Git hashes. > > These tests have an assumeTrue condition in the @BeforeClass setup, which will skip if the HG server isn't available. The URL to hg.openjdk.org uses 'http', which hasn't worked since the migration to the new URL, but some time during the last few days, it started responding to 'http', which caused the tests to start running again, and subsequently fail. > > This patch updates the Git hash to the new one being produced with the new user mapping, and changes the protocol to https for hg.openjdk.org, since that is the preferred one. Marked as reviewed by kcr (Reviewer). ------------- PR: https://git.openjdk.org/skara/pull/1481 From erikj at openjdk.org Mon Mar 13 22:00:33 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 13 Mar 2023 22:00:33 GMT Subject: Integrated: 1839: SKARA-1480 broke BridgeBotTests In-Reply-To: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> References: <73KIOmuI-NaXyorC7XfXrVg-GwaKoV6cb4Nf3t50tQ0=.5121df93-37c7-4d84-a516-ed0b281b3051@github.com> Message-ID: <5Td-bQw9SzPvKfvQ0ZfT0SGYw46N3LywA1F-FBacUb8=.afc67036-3d8c-402b-8e3a-56ce36a69dfa@github.com> On Mon, 13 Mar 2023 20:33:24 GMT, Erik Joelsson wrote: > When changing all 'openjdk.java.net' references to 'openjdk.org', the BridgeBotTests broke, because we now have a different user mapping in those tests, which results in different Git hashes. > > These tests have an assumeTrue condition in the @BeforeClass setup, which will skip if the HG server isn't available. The URL to hg.openjdk.org uses 'http', which hasn't worked since the migration to the new URL, but some time during the last few days, it started responding to 'http', which caused the tests to start running again, and subsequently fail. > > This patch updates the Git hash to the new one being produced with the new user mapping, and changes the protocol to https for hg.openjdk.org, since that is the preferred one. This pull request has now been integrated. Changeset: 68ef9dd1 Author: Erik Joelsson URL: https://git.openjdk.org/skara/commit/68ef9dd10ad1c06c0f45349e5ed89878614cf38b Stats: 14 lines in 1 file changed: 3 ins; 0 del; 11 mod 1839: SKARA-1480 broke BridgeBotTests Reviewed-by: kcr ------------- PR: https://git.openjdk.org/skara/pull/1481 From zsong at openjdk.org Tue Mar 14 15:07:16 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 15:07:16 GMT Subject: RFR: 1823: Mailing list bot should include link to comment on the Git forge [v6] In-Reply-To: <0dta6H36iX1j3v5g1-_05ZxdC5rP28x1sjB2b1XHzKo=.38aa2b4e-77bf-49f1-b827-1869e243cd2a@github.com> References: <0dta6H36iX1j3v5g1-_05ZxdC5rP28x1sjB2b1XHzKo=.38aa2b4e-77bf-49f1-b827-1869e243cd2a@github.com> Message-ID: On Tue, 21 Feb 2023 20:58:46 GMT, Zhao Song wrote: >> This patch will add the ability to attach comment/reviewComment/review link to the email generated by mlbridge bot >> >> The implementation for GitHub is straightforward, we can extract the URL for a specific comment or review from the JSON response using the `html_url` field and include it in the email. >> >> For GitLab, we will need to generate the URL using the `id` field in `note,` since GitLab does not provide an field like `html_url` in its JSON responses. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem This pr is still waiting for review. ------------- PR: https://git.openjdk.org/skara/pull/1478 From zsong at openjdk.org Tue Mar 14 15:07:34 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 15:07:34 GMT Subject: RFR: 1813: URLs printed by Skara should have ".git" at the end of the repo name [v7] In-Reply-To: References: Message-ID: On Fri, 10 Feb 2023 17:58:47 GMT, Zhao Song wrote: >> In this patch, `.git` is added to the URLs printed by Skara. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > rename remoteUrl and url This pr is still waiting for review. ------------- PR: https://git.openjdk.org/skara/pull/1467 From zsong at openjdk.org Tue Mar 14 15:33:22 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 15:33:22 GMT Subject: RFR: 1824: /reviewers N should remove ready status for clean backports Message-ID: Currently, If a user issues /reviewers command in a clean backport, the reviewers requirement will not be displayed in the pr body and it won't be an integration blocker. In this patch, after user issued /reviewers command, the reviewrs check for clean backport will be enabled. And if the Reviewers check requirements in the jcheck conf are stricter than the user's requirements, the bot will enforce the stricter requirements ------------- Commit messages: - fix a problem - SKARA-1824 Changes: https://git.openjdk.org/skara/pull/1482/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1482&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1824 Stats: 108 lines in 3 files changed: 107 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1482.diff Fetch: git fetch https://git.openjdk.org/skara pull/1482/head:pull/1482 PR: https://git.openjdk.org/skara/pull/1482 From erikj at openjdk.org Tue Mar 14 15:41:32 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 14 Mar 2023 15:41:32 GMT Subject: RFR: 1823: Mailing list bot should include link to comment on the Git forge [v6] In-Reply-To: <0dta6H36iX1j3v5g1-_05ZxdC5rP28x1sjB2b1XHzKo=.38aa2b4e-77bf-49f1-b827-1869e243cd2a@github.com> References: <0dta6H36iX1j3v5g1-_05ZxdC5rP28x1sjB2b1XHzKo=.38aa2b4e-77bf-49f1-b827-1869e243cd2a@github.com> Message-ID: On Tue, 21 Feb 2023 20:58:46 GMT, Zhao Song wrote: >> This patch will add the ability to attach comment/reviewComment/review link to the email generated by mlbridge bot >> >> The implementation for GitHub is straightforward, we can extract the URL for a specific comment or review from the JSON response using the `html_url` field and include it in the email. >> >> For GitLab, we will need to generate the URL using the `id` field in `note,` since GitLab does not provide an field like `html_url` in its JSON responses. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.org/skara/pull/1478 From zsong at openjdk.org Tue Mar 14 15:49:00 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 15:49:00 GMT Subject: RFR: 1823: Mailing list bot should include link to comment on the Git forge [v6] In-Reply-To: <0dta6H36iX1j3v5g1-_05ZxdC5rP28x1sjB2b1XHzKo=.38aa2b4e-77bf-49f1-b827-1869e243cd2a@github.com> References: <0dta6H36iX1j3v5g1-_05ZxdC5rP28x1sjB2b1XHzKo=.38aa2b4e-77bf-49f1-b827-1869e243cd2a@github.com> Message-ID: On Tue, 21 Feb 2023 20:58:46 GMT, Zhao Song wrote: >> This patch will add the ability to attach comment/reviewComment/review link to the email generated by mlbridge bot >> >> The implementation for GitHub is straightforward, we can extract the URL for a specific comment or review from the JSON response using the `html_url` field and include it in the email. >> >> For GitLab, we will need to generate the URL using the `id` field in `note,` since GitLab does not provide an field like `html_url` in its JSON responses. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Thanks for the review! ------------- PR: https://git.openjdk.org/skara/pull/1478 From zsong at openjdk.org Tue Mar 14 15:49:00 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 15:49:00 GMT Subject: Integrated: 1823: Mailing list bot should include link to comment on the Git forge In-Reply-To: References: Message-ID: On Fri, 17 Feb 2023 18:56:58 GMT, Zhao Song wrote: > This patch will add the ability to attach comment/reviewComment/review link to the email generated by mlbridge bot > > The implementation for GitHub is straightforward, we can extract the URL for a specific comment or review from the JSON response using the `html_url` field and include it in the email. > > For GitLab, we will need to generate the URL using the `id` field in `note,` since GitLab does not provide an field like `html_url` in its JSON responses. This pull request has now been integrated. Changeset: 83ea1715 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/83ea1715576ed4924829a427eb4a053a981c7add Stats: 155 lines in 11 files changed: 151 ins; 0 del; 4 mod 1823: Mailing list bot should include link to comment on the Git forge Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1478 From erikj at openjdk.org Tue Mar 14 16:40:46 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 14 Mar 2023 16:40:46 GMT Subject: RFR: 1813: URLs printed by Skara should have ".git" at the end of the repo name [v7] In-Reply-To: References: Message-ID: On Fri, 10 Feb 2023 17:58:47 GMT, Zhao Song wrote: >> In this patch, `.git` is added to the URLs printed by Skara. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > rename remoteUrl and url This turned into a big patch. I looked through all the `url()` -> `authenticatedUrl()` changes and found some that should be reverted or changed in some way. bots/checkout/src/main/java/org/openjdk/skara/bots/checkout/CheckoutBot.java line 69: > 67: if (!uri.endsWith(".git")) { > 68: uri += ".git"; > 69: } This whole method is also redundant and should just be eliminated. bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/CensusInstance.java line 85: > 83: > 84: static CensusInstance create(HostedRepository censusRepo, String censusRef, Path folder, PullRequest pr) { > 85: var repoName = censusRepo.authenticatedUrl().getHost() + "/" + censusRepo.name(); Here we should probably just call `.url()`. bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/MailingListArchiveReaderBot.java line 117: > 115: resolvedPullRequests.put(first.id(), pr); > 116: } > 117: var bridgeIdPattern = Pattern.compile("^[^.]+\\.[^.]+@" + pr.repository().authenticatedUrl().getHost() + "$"); I think this should be `.url()`. bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/ReviewArchive.java line 299: > 297: var encodedCommon = Base64.getUrlEncoder().encodeToString(digest.digest()); > 298: > 299: return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().authenticatedUrl().getHost()); Another `.url()`. bots/notify/src/test/java/org/openjdk/skara/bots/notify/issue/IssueNotifierTests.java line 1887: > 1885: // Verify that the 'original' repo URL is used in the comment and not the main one > 1886: assertTrue(comment.body().contains(originalRepo.authenticatedUrl().toString())); > 1887: assertFalse(comment.body().contains(repo.authenticatedUrl().toString())); I think we should be checking for `.url()` here. bots/notify/src/test/java/org/openjdk/skara/bots/notify/issue/IssueNotifierTests.java line 1989: > 1987: var comment = comments.get(0); > 1988: assertTrue(comment.body().contains(editHash.toString())); > 1989: assertTrue(comment.body().contains(repo.authenticatedUrl().toString())); Same here. bots/notify/src/test/java/org/openjdk/skara/bots/notify/issue/IssueNotifierTests.java line 2037: > 2035: var comment = comments.get(0); > 2036: assertTrue(comment.body().contains(editHash.toString())); > 2037: assertTrue(comment.body().contains(repo.authenticatedUrl().toString())); And again. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1216: > 1214: if (pr.sourceRepository().isPresent()) { > 1215: var branchNames = pr.repository().branches().stream().map(HostedBranch::name).collect(Collectors.toSet()); > 1216: if (!pr.repository().authenticatedUrl().equals(pr.sourceRepository().get().authenticatedUrl()) && branchNames.contains(pr.sourceRef())) { I think we should be comparing `.url()` here. If we compare `authenticatedUrl()` there is a risk that different user authentications would trigger a false negative. bots/pr/src/main/java/org/openjdk/skara/bots/pr/LimitedCensusInstance.java line 117: > 115: > 116: private static Path getRepoFolder(HostedRepositoryPool hostedRepositoryPool, HostedRepository censusRepo, String censusRef, Path folder) { > 117: var repoName = censusRepo.authenticatedUrl().getHost() + "/" + censusRepo.name(); Only need `.url()` to extract host. bots/tester/src/test/java/org/openjdk/skara/bots/tester/InMemoryHostedRepository.java line 239: > 237: @Override > 238: public URI url() { > 239: return null; It probably doesn't matter much, but seems like this should return `url` just like `authenticatedUrl()` does. cli/src/main/java/org/openjdk/skara/cli/pr/GitPrCreate.java line 308: > 306: > 307: var mailingLists = new ArrayList(); > 308: var parentProject = ForgeUtils.projectName(parentRepo.authenticatedUrl()); Should probably be `.url()`. forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabMergeRequest.java line 533: > 531: > 532: private String linkToDiff(String path, Hash hash, int line) { > 533: return "[" + path + " line " + line + "](" + URIBuilder.base(repository.authenticatedUrl()) This looks like another case of `.url()`. The authentication is even removed below. This string is built to be presented as text somewhere. test/src/main/java/org/openjdk/skara/test/TestHostedRepository.java line 59: > 57: this.projectName = projectName; > 58: this.localRepository = localRepository; > 59: pullRequestPattern = Pattern.compile(authenticatedUrl().toString() + "/pr/" + "(\\d+)"); Doesn't matter much as they resolve to the same value, but logically I think `.webUrl()` fits better here. test/src/main/java/org/openjdk/skara/test/TestPullRequest.java line 217: > 215: public URI webUrl() { > 216: try { > 217: return new URI(targetRepository.authenticatedUrl().toString() + "/pr/" + id()); Logically this should be `.webUrl()`. ------------- PR: https://git.openjdk.org/skara/pull/1467 From erikj at openjdk.org Tue Mar 14 17:18:02 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 14 Mar 2023 17:18:02 GMT Subject: RFR: 1824: /reviewers N should remove ready status for clean backports In-Reply-To: References: Message-ID: On Mon, 13 Mar 2023 23:08:53 GMT, Zhao Song wrote: > Currently, If a user issues /reviewers command in a clean backport, the reviewers requirement will not be displayed in the pr body and it won't be an integration blocker. > > In this patch, after user issued /reviewers command, the reviewrs check for clean backport will be enabled. And if the Reviewers check requirements in the jcheck conf are stricter than the user's requirements, the bot will enforce the stricter requirements We will likely get a followup request to be able to revert `/reviewers X` in a clean backport. Implementing that seems less straight forward, so I'm happy to leave that for later. bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java line 146: > 144: if (pr.labelNames().contains("clean") && pr.labelNames().contains("backport")) { > 145: reply.println("Warning: The /reviewers command is used in a clean backport, it will enable reviewers check for this pr. " + > 146: "If the reviewers check requirements in the jcheck conf are stricter than your requirements, the bot will enforce the stricter requirements."); Suggestion: reply.println("Warning: By issuing the /reviewers command in this clean backport pull request, the reviewers check has now been enabled."); I don't think we need to point out the application of stricter requirements in the reply. It's enough to document this on the wiki. I see I asked for it in the bug, but thinking on this more, the /reviewers command has never been able to reduce reviewer requirements from the minimum specified in .jcheck/conf. ------------- PR: https://git.openjdk.org/skara/pull/1482 From zsong at openjdk.org Tue Mar 14 17:27:33 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 17:27:33 GMT Subject: RFR: 1813: URLs printed by Skara should have ".git" at the end of the repo name [v7] In-Reply-To: References: Message-ID: On Fri, 10 Feb 2023 17:58:47 GMT, Zhao Song wrote: >> In this patch, `.git` is added to the URLs printed by Skara. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > rename remoteUrl and url bots/hgbridge/src/main/java/org/openjdk/skara/bots/hgbridge/JBridgeBot.java line 123: > 121: IOException lastException = null; > 122: for (var destination : exporterConfig.destinations()) { > 123: var markerBase = destination.authenticatedUrl().getHost() + "/" + destination.name(); I think here should be `.url()` too. ------------- PR: https://git.openjdk.org/skara/pull/1467 From zsong at openjdk.org Tue Mar 14 17:31:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 17:31:18 GMT Subject: RFR: 1824: /reviewers N should remove ready status for clean backports [v2] In-Reply-To: References: Message-ID: On Tue, 14 Mar 2023 17:11:44 GMT, Erik Joelsson wrote: > I don't think we need to point out the application of stricter requirements in the reply. It's enough to document this on the wiki. I see I asked for it in the bug, but thinking on this more, the /reviewers command has never been able to reduce reviewer requirements from the minimum specified in .jcheck/conf. Yes, it's better. Thx! ------------- PR: https://git.openjdk.org/skara/pull/1482 From zsong at openjdk.org Tue Mar 14 17:31:17 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 17:31:17 GMT Subject: RFR: 1824: /reviewers N should remove ready status for clean backports [v2] In-Reply-To: References: Message-ID: > Currently, If a user issues /reviewers command in a clean backport, the reviewers requirement will not be displayed in the pr body and it won't be an integration blocker. > > In this patch, after user issued /reviewers command, the reviewrs check for clean backport will be enabled. And if the Reviewers check requirements in the jcheck conf are stricter than the user's requirements, the bot will enforce the stricter requirements Zhao Song has updated the pull request incrementally with one additional commit since the last revision: Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1482/files - new: https://git.openjdk.org/skara/pull/1482/files/41b6e94a..aac73813 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1482&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1482&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1482.diff Fetch: git fetch https://git.openjdk.org/skara pull/1482/head:pull/1482 PR: https://git.openjdk.org/skara/pull/1482 From zsong at openjdk.org Tue Mar 14 17:31:38 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 17:31:38 GMT Subject: RFR: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 Message-ID: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> This patch fixes MailingListBridgeBotTests::simpleArchive. ------------- Commit messages: - SKARA-1840 Changes: https://git.openjdk.org/skara/pull/1483/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1483&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1840 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1483.diff Fetch: git fetch https://git.openjdk.org/skara pull/1483/head:pull/1483 PR: https://git.openjdk.org/skara/pull/1483 From zsong at openjdk.org Tue Mar 14 17:43:14 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 17:43:14 GMT Subject: RFR: 1813: URLs printed by Skara should have ".git" at the end of the repo name [v8] In-Reply-To: References: Message-ID: > In this patch, `.git` is added to the URLs printed by Skara. Zhao Song has updated the pull request incrementally with two additional commits since the last revision: - fix a problem - fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1467/files - new: https://git.openjdk.org/skara/pull/1467/files/cfbcec60..95d2c6e2 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1467&range=07 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1467&range=06-07 Stats: 25 lines in 13 files changed: 0 ins; 9 del; 16 mod Patch: https://git.openjdk.org/skara/pull/1467.diff Fetch: git fetch https://git.openjdk.org/skara pull/1467/head:pull/1467 PR: https://git.openjdk.org/skara/pull/1467 From zsong at openjdk.org Tue Mar 14 17:45:24 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 14 Mar 2023 17:45:24 GMT Subject: RFR: 1813: URLs printed by Skara should have ".git" at the end of the repo name [v6] In-Reply-To: References: Message-ID: On Fri, 10 Feb 2023 14:06:37 GMT, Erik Joelsson wrote: >> Looks good. The name `remoteUrl` doesn't seem very good, but with the comment, it is OK. > >> Looks good. The name `remoteUrl` doesn't seem very good, but with the comment, it is OK. > > I agree, it's hard to come up with a good name for this. Ideally I think this one should be just `url` and the existing `url` should be renamed something like `authenticatedUrl`. @erikj79 Thank you very much for reviewing this big patch and identifying some issues! ------------- PR: https://git.openjdk.org/skara/pull/1467 From gli at openjdk.org Wed Mar 15 09:28:44 2023 From: gli at openjdk.org (Guoxiong Li) Date: Wed, 15 Mar 2023 09:28:44 GMT Subject: RFR: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 In-Reply-To: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> References: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> Message-ID: On Tue, 14 Mar 2023 16:28:03 GMT, Zhao Song wrote: > This patch fixes MailingListBridgeBotTests::simpleArchive. This patch looks good. But when reading the code of this test case `MailingListBridgeBotTests::simpleArchive`, I notice the following code is wrong. ` pr.addLabel("rfr");` should be adjusted to ` pr.removeLabel("rfr");`. It is good to fix this little bug in this patch. What do you think? // the line 279: // Remove the rfr flag and post another comment pr.addLabel("rfr"); pr.addComment("@" + pr.author().username() +" This is another comment"); ------------- Marked as reviewed by gli (Committer). PR: https://git.openjdk.org/skara/pull/1483 From zsong at openjdk.org Wed Mar 15 12:50:10 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 12:50:10 GMT Subject: RFR: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 [v2] In-Reply-To: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> References: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> Message-ID: > This patch fixes MailingListBridgeBotTests::simpleArchive. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1483/files - new: https://git.openjdk.org/skara/pull/1483/files/1b79db88..d6319d58 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1483&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1483&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1483.diff Fetch: git fetch https://git.openjdk.org/skara pull/1483/head:pull/1483 PR: https://git.openjdk.org/skara/pull/1483 From zsong at openjdk.org Wed Mar 15 12:50:10 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 12:50:10 GMT Subject: RFR: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 [v2] In-Reply-To: References: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> Message-ID: On Wed, 15 Mar 2023 09:26:27 GMT, Guoxiong Li wrote: > This patch looks good. > > But when reading the code of this test case `MailingListBridgeBotTests::simpleArchive`, I notice the following code is wrong. ` pr.addLabel("rfr");` should be adjusted to ` pr.removeLabel("rfr");`. It is good to fix this little bug in this patch. What do you think? > > ``` > // the line 279: > // Remove the rfr flag and post another comment > pr.addLabel("rfr"); > pr.addComment("@" + pr.author().username() +" This is another comment"); > ``` Good catch! I think fix it in this patch is good. ------------- PR: https://git.openjdk.org/skara/pull/1483 From gli at openjdk.org Wed Mar 15 13:34:59 2023 From: gli at openjdk.org (Guoxiong Li) Date: Wed, 15 Mar 2023 13:34:59 GMT Subject: RFR: 1824: /reviewers N should remove ready status for clean backports [v2] In-Reply-To: References: Message-ID: On Tue, 14 Mar 2023 17:31:17 GMT, Zhao Song wrote: >> Currently, If a user issues /reviewers command in a clean backport, the reviewers requirement will not be displayed in the pr body and it won't be an integration blocker. >> >> In this patch, after user issued /reviewers command, the reviewrs check for clean backport will be enabled. And if the Reviewers check requirements in the jcheck conf are stricter than the user's requirements, the bot will enforce the stricter requirements > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> Looks good. ------------- Marked as reviewed by gli (Committer). PR: https://git.openjdk.org/skara/pull/1482 From gli at openjdk.org Wed Mar 15 13:35:52 2023 From: gli at openjdk.org (Guoxiong Li) Date: Wed, 15 Mar 2023 13:35:52 GMT Subject: RFR: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 [v2] In-Reply-To: References: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> Message-ID: On Wed, 15 Mar 2023 12:50:10 GMT, Zhao Song wrote: >> This patch fixes MailingListBridgeBotTests::simpleArchive. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Looks good. ------------- Marked as reviewed by gli (Committer). PR: https://git.openjdk.org/skara/pull/1483 From gli at openjdk.org Wed Mar 15 13:54:08 2023 From: gli at openjdk.org (Guoxiong Li) Date: Wed, 15 Mar 2023 13:54:08 GMT Subject: RFR: 1828: RFR emails still be sent when PR is in draft state Message-ID: Hi all, This patch blocks the RFR email when new commits are pushed to a draft PR. And the test case is added. too. But it doesn't solve the synchronization problem that Erik mentioned in [PR-1469](https://github.com/openjdk/skara/pull/1469#issuecomment-1425916242). Because the bot only generates one email one time regradless of the number of the commits. Thanks for the review. Best Regards, -- Guoxiong ------------- Commit messages: - SKARA-1828 Changes: https://git.openjdk.org/skara/pull/1484/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1484&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1828 Stats: 31 lines in 2 files changed: 30 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1484.diff Fetch: git fetch https://git.openjdk.org/skara pull/1484/head:pull/1484 PR: https://git.openjdk.org/skara/pull/1484 From erikj at openjdk.org Wed Mar 15 14:10:46 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 15 Mar 2023 14:10:46 GMT Subject: RFR: 1813: URLs printed by Skara should have ".git" at the end of the repo name [v8] In-Reply-To: References: Message-ID: On Tue, 14 Mar 2023 17:43:14 GMT, Zhao Song wrote: >> In this patch, `.git` is added to the URLs printed by Skara. > > Zhao Song has updated the pull request incrementally with two additional commits since the last revision: > > - fix a problem > - fix a problem Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.org/skara/pull/1467 From erikj at openjdk.org Wed Mar 15 14:11:40 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 15 Mar 2023 14:11:40 GMT Subject: RFR: 1824: /reviewers N should remove ready status for clean backports [v2] In-Reply-To: References: Message-ID: On Tue, 14 Mar 2023 17:31:17 GMT, Zhao Song wrote: >> Currently, If a user issues /reviewers command in a clean backport, the reviewers requirement will not be displayed in the pr body and it won't be an integration blocker. >> >> In this patch, after user issued /reviewers command, the reviewrs check for clean backport will be enabled. And if the Reviewers check requirements in the jcheck conf are stricter than the user's requirements, the bot will enforce the stricter requirements > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java > > Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.org/skara/pull/1482 From erikj at openjdk.org Wed Mar 15 14:18:05 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 15 Mar 2023 14:18:05 GMT Subject: RFR: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 [v2] In-Reply-To: References: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> Message-ID: On Wed, 15 Mar 2023 12:50:10 GMT, Zhao Song wrote: >> This patch fixes MailingListBridgeBotTests::simpleArchive. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Marked as reviewed by erikj (Lead). ------------- PR: https://git.openjdk.org/skara/pull/1483 From zsong at openjdk.org Wed Mar 15 14:18:05 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 14:18:05 GMT Subject: RFR: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 [v2] In-Reply-To: References: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> Message-ID: On Wed, 15 Mar 2023 12:50:10 GMT, Zhao Song wrote: >> This patch fixes MailingListBridgeBotTests::simpleArchive. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Thanks for the review! ------------- PR: https://git.openjdk.org/skara/pull/1483 From zsong at openjdk.org Wed Mar 15 14:18:05 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 14:18:05 GMT Subject: Integrated: 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 In-Reply-To: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> References: <4hiiR_jkMylP4Ii0LzKey-vRApEGHMuppJrZXox49ic=.d6fc4064-1493-4c14-922b-de9ed868de77@github.com> Message-ID: On Tue, 14 Mar 2023 16:28:03 GMT, Zhao Song wrote: > This patch fixes MailingListBridgeBotTests::simpleArchive. This pull request has now been integrated. Changeset: 3d179043 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/3d17904356979bbaa6d9514e504e670df15fff3a Stats: 5 lines in 1 file changed: 1 ins; 0 del; 4 mod 1840: A test failed due to the combination of SKARA-1823 and SKARA-755 Reviewed-by: gli, erikj ------------- PR: https://git.openjdk.org/skara/pull/1483 From erikj at openjdk.org Wed Mar 15 14:18:24 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 15 Mar 2023 14:18:24 GMT Subject: RFR: 1828: RFR emails still be sent when PR is in draft state In-Reply-To: References: Message-ID: On Wed, 15 Mar 2023 13:50:16 GMT, Guoxiong Li wrote: > Hi all, > > This patch blocks the RFR email when new commits are pushed to a draft PR. And the test case is added. too. > > But it doesn't solve the synchronization problem that Erik mentioned in [PR-1469](https://github.com/openjdk/skara/pull/1469#issuecomment-1425916242). Because the bot only generates one email one time regradless of the number of the commits. > > Thanks for the review. > > Best Regards, > -- Guoxiong I think this is fine. Perfect synchronization on commit emails isn't as important as for comments. ------------- Marked as reviewed by erikj (Lead). PR: https://git.openjdk.org/skara/pull/1484 From zsong at openjdk.org Wed Mar 15 14:34:40 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 14:34:40 GMT Subject: RFR: 1824: /reviewers N should remove ready status for clean backports [v3] In-Reply-To: References: Message-ID: > Currently, If a user issues /reviewers command in a clean backport, the reviewers requirement will not be displayed in the pr body and it won't be an integration blocker. > > In this patch, after user issued /reviewers command, the reviewrs check for clean backport will be enabled. And if the Reviewers check requirements in the jcheck conf are stricter than the user's requirements, the bot will enforce the stricter requirements Zhao Song 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 four additional commits since the last revision: - Merge branch 'master' into SKARA-1824 - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewersCommand.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> - fix a problem - SKARA-1824 ------------- Changes: - all: https://git.openjdk.org/skara/pull/1482/files - new: https://git.openjdk.org/skara/pull/1482/files/aac73813..b1723243 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1482&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1482&range=01-02 Stats: 158 lines in 11 files changed: 152 ins; 0 del; 6 mod Patch: https://git.openjdk.org/skara/pull/1482.diff Fetch: git fetch https://git.openjdk.org/skara pull/1482/head:pull/1482 PR: https://git.openjdk.org/skara/pull/1482 From gli at openjdk.org Wed Mar 15 14:36:19 2023 From: gli at openjdk.org (Guoxiong Li) Date: Wed, 15 Mar 2023 14:36:19 GMT Subject: RFR: 1828: RFR emails still be sent when PR is in draft state [v2] In-Reply-To: References: Message-ID: <_l8uDhYB3qAhL7_tP28sYkhedR8Q0bBuYznOu-JlbJo=.c763fc33-8b50-4571-bb17-8c1ce1284e24@github.com> > Hi all, > > This patch blocks the RFR email when new commits are pushed to a draft PR. And the test case is added. too. > > But it doesn't solve the synchronization problem that Erik mentioned in [PR-1469](https://github.com/openjdk/skara/pull/1469#issuecomment-1425916242). Because the bot only generates one email one time regradless of the number of the commits. > > Thanks for the review. > > Best Regards, > -- Guoxiong Guoxiong Li 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 'master' into SKARA-1828 - SKARA-1828 ------------- Changes: - all: https://git.openjdk.org/skara/pull/1484/files - new: https://git.openjdk.org/skara/pull/1484/files/d223a7d2..c8ae07c6 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1484&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1484&range=00-01 Stats: 5 lines in 1 file changed: 1 ins; 0 del; 4 mod Patch: https://git.openjdk.org/skara/pull/1484.diff Fetch: git fetch https://git.openjdk.org/skara pull/1484/head:pull/1484 PR: https://git.openjdk.org/skara/pull/1484 From zsong at openjdk.org Wed Mar 15 14:36:33 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 14:36:33 GMT Subject: RFR: 1813: URLs printed by Skara should have ".git" at the end of the repo name [v9] In-Reply-To: References: Message-ID: > In this patch, `.git` is added to the URLs printed by Skara. Zhao Song 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 10 additional commits since the last revision: - Merge branch 'master' into SKARA-1813 - fix a problem - fix a problem - rename remoteUrl and url - remove redundant method - fix a problem - use remoteUrl() in more places - Update forge/src/main/java/org/openjdk/skara/forge/HostedRepository.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> - add method HostedRepository#remoteUrl - SKARA-1813 ------------- Changes: - all: https://git.openjdk.org/skara/pull/1467/files - new: https://git.openjdk.org/skara/pull/1467/files/95d2c6e2..74c7a2ea Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1467&range=08 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1467&range=07-08 Stats: 922 lines in 33 files changed: 794 ins; 28 del; 100 mod Patch: https://git.openjdk.org/skara/pull/1467.diff Fetch: git fetch https://git.openjdk.org/skara pull/1467/head:pull/1467 PR: https://git.openjdk.org/skara/pull/1467 From zsong at openjdk.org Wed Mar 15 15:04:09 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 15:04:09 GMT Subject: Integrated: 1824: /reviewers N should remove ready status for clean backports In-Reply-To: References: Message-ID: On Mon, 13 Mar 2023 23:08:53 GMT, Zhao Song wrote: > Currently, If a user issues /reviewers command in a clean backport, the reviewers requirement will not be displayed in the pr body and it won't be an integration blocker. > > In this patch, after user issued /reviewers command, the reviewrs check for clean backport will be enabled. And if the Reviewers check requirements in the jcheck conf are stricter than the user's requirements, the bot will enforce the stricter requirements This pull request has now been integrated. Changeset: aa6a5a87 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/aa6a5a87d6fd5972b98c94cd65e060426034ba70 Stats: 107 lines in 3 files changed: 106 ins; 0 del; 1 mod 1824: /reviewers N should remove ready status for clean backports Reviewed-by: erikj, gli ------------- PR: https://git.openjdk.org/skara/pull/1482 From zsong at openjdk.org Wed Mar 15 15:06:03 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 15:06:03 GMT Subject: Integrated: 1813: URLs printed by Skara should have ".git" at the end of the repo name In-Reply-To: References: Message-ID: On Wed, 8 Feb 2023 19:51:52 GMT, Zhao Song wrote: > In this patch, `.git` is added to the URLs printed by Skara. This pull request has now been integrated. Changeset: 0c82310e Author: Zhao Song URL: https://git.openjdk.org/skara/commit/0c82310ee17685663e963d7cb085e67494f8975d Stats: 1410 lines in 85 files changed: 27 ins; 37 del; 1346 mod 1813: URLs printed by Skara should have ".git" at the end of the repo name Reviewed-by: erikj, gli ------------- PR: https://git.openjdk.org/skara/pull/1467 From zsong at openjdk.org Wed Mar 15 18:11:39 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 15 Mar 2023 18:11:39 GMT Subject: RFR: 1828: RFR emails still be sent when PR is in draft state [v2] In-Reply-To: <_l8uDhYB3qAhL7_tP28sYkhedR8Q0bBuYznOu-JlbJo=.c763fc33-8b50-4571-bb17-8c1ce1284e24@github.com> References: <_l8uDhYB3qAhL7_tP28sYkhedR8Q0bBuYznOu-JlbJo=.c763fc33-8b50-4571-bb17-8c1ce1284e24@github.com> Message-ID: On Wed, 15 Mar 2023 14:36:19 GMT, Guoxiong Li wrote: >> Hi all, >> >> This patch blocks the RFR email when new commits are pushed to a draft PR. And the test case is added. too. >> >> But it doesn't solve the synchronization problem that Erik mentioned in [PR-1469](https://github.com/openjdk/skara/pull/1469#issuecomment-1425916242). Because the bot only generates one email one time regradless of the number of the commits. >> >> Thanks for the review. >> >> Best Regards, >> -- Guoxiong > > Guoxiong Li 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 'master' into SKARA-1828 > - SKARA-1828 It's strange that mlbridge bot bridged emails that generated by itself. Filed [SKARA-1843](https://bugs.openjdk.org/browse/SKARA-1843) ------------- PR Comment: https://git.openjdk.org/skara/pull/1484#issuecomment-1470513955 From lgxbslgx at gmail.com Wed Mar 15 19:07:48 2023 From: lgxbslgx at gmail.com (Guoxiong Li) Date: Thu, 16 Mar 2023 03:07:48 +0800 Subject: RFR: 1828: RFR emails still be sent when PR is in draft state [v2] In-Reply-To: References: <_l8uDhYB3qAhL7_tP28sYkhedR8Q0bBuYznOu-JlbJo=.c763fc33-8b50-4571-bb17-8c1ce1284e24@github.com> Message-ID: Test normal bridged message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gli at openjdk.org Thu Mar 16 04:16:48 2023 From: gli at openjdk.org (Guoxiong Li) Date: Thu, 16 Mar 2023 04:16:48 GMT Subject: Integrated: 1828: RFR emails still be sent when PR is in draft state In-Reply-To: References: Message-ID: On Wed, 15 Mar 2023 13:50:16 GMT, Guoxiong Li wrote: > Hi all, > > This patch blocks the RFR email when new commits are pushed to a draft PR. And the test case is added. too. > > But it doesn't solve the synchronization problem that Erik mentioned in [PR-1469](https://github.com/openjdk/skara/pull/1469#issuecomment-1425916242). Because the bot only generates one email one time regradless of the number of the commits. > > Thanks for the review. > > Best Regards, > -- Guoxiong This pull request has now been integrated. Changeset: add1d7fc Author: Guoxiong Li URL: https://git.openjdk.org/skara/commit/add1d7fc686a5dd61c77711fd13b313b74e0f3b1 Stats: 31 lines in 2 files changed: 30 ins; 0 del; 1 mod 1828: RFR emails still be sent when PR is in draft state Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1484 From gli at openjdk.org Thu Mar 16 05:24:17 2023 From: gli at openjdk.org (Guoxiong Li) Date: Thu, 16 Mar 2023 05:24:17 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. Message-ID: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Hi all, This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. Thanks for the review. Best Regards, -- Guoxiong [1] https://bugs.openjdk.org/browse/SKARA-1843 ------------- Commit messages: - SKARA-1843 Changes: https://git.openjdk.org/skara/pull/1485/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1485&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1843 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1485.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1485/head:pull/1485 PR: https://git.openjdk.org/skara/pull/1485 From lgxbslgx at gmail.com Thu Mar 16 06:04:58 2023 From: lgxbslgx at gmail.com (Guoxiong Li) Date: Thu, 16 Mar 2023 14:04:58 +0800 Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: test mlbridge again -------------- next part -------------- An HTML attachment was scrubbed... URL: From gli at openjdk.org Thu Mar 16 10:35:35 2023 From: gli at openjdk.org (Guoxiong Li) Date: Thu, 16 Mar 2023 10:35:35 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 05:20:54 GMT, Guoxiong Li wrote: > Hi all, > > This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. > > But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. > > Thanks for the review. > > Best Regards, > -- Guoxiong > > [1] https://bugs.openjdk.org/browse/SKARA-1843 In order to test this bug, I sent two emails [1][2] , but the bot didn't post them as comment. I think it may be another issue which is not related to this one. The current patch is still feasible. [1] https://mail.openjdk.org/pipermail/skara-dev/2023-March/007597.html [2] https://mail.openjdk.org/pipermail/skara-dev/2023-March/007600.html ------------- PR Comment: https://git.openjdk.org/skara/pull/1485#issuecomment-1471696100 From gli at openjdk.org Thu Mar 16 13:48:39 2023 From: gli at openjdk.org (Guoxiong Li) Date: Thu, 16 Mar 2023 13:48:39 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 05:20:54 GMT, Guoxiong Li wrote: > Hi all, > > This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. > > But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. > > Thanks for the review. > > Best Regards, > -- Guoxiong > > [1] https://bugs.openjdk.org/browse/SKARA-1843 > _Mailing list message from [Guoxiong Li](mailto:lgxbslgx at gmail.com) on [skara-dev](mailto:skara-dev at mail.openjdk.org):_ > > test mlbridge again -------------- next part -------------- An HTML attachment was scrubbed... URL: This comment is posted successfully now. Is it done automatically? Or the bot is restarted, then this comment is posted? ------------- PR Comment: https://git.openjdk.org/skara/pull/1485#issuecomment-1471990106 From erikj at openjdk.org Thu Mar 16 15:29:39 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 16 Mar 2023 15:29:39 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 05:20:54 GMT, Guoxiong Li wrote: > Hi all, > > This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. > > But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. > > Thanks for the review. > > Best Regards, > -- Guoxiong > > [1] https://bugs.openjdk.org/browse/SKARA-1843 bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/MailingListArchiveReaderBot.java line 118: > 116: } > 117: var bridgeIdStr = "^[^.]+\\.[^.]+@(?:" + pr.repository().url().getHost() + "|" + pr.repository().authenticatedUrl().getHost() + ")$"; > 118: var bridgeIdPattern = Pattern.compile(bridgeIdStr); I think the correct fix is to just get the host from `authenticatedUrl`. Perhaps there should be a different method for this kind of usecase that better describes what we need here (the raw actual host, without the pattern rewrite), but at least for now, I think changing this to `authenticatedUrl` is a good enough fix. Thanks for figuring this out. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1138882630 From zsong at openjdk.org Thu Mar 16 15:38:31 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 15:38:31 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 13:46:33 GMT, Guoxiong Li wrote: > > _Mailing list message from [Guoxiong Li](mailto:lgxbslgx at gmail.com) on [skara-dev](mailto:skara-dev at mail.openjdk.org):_ > > test mlbridge again -------------- next part -------------- An HTML attachment was scrubbed... URL: https://mail.openjdk.org/pipermail/skara-dev/attachments/20230316/5aae3b54/attachment.htm > > This comment is posted successfully now. Is it done automatically? Or the bot is restarted, then this comment is posted? It is done automatically. It's a known issue. See [SKARA-1644](https://bugs.openjdk.org/projects/SKARA/issues/SKARA-1644) ------------- PR Comment: https://git.openjdk.org/skara/pull/1485#issuecomment-1472212637 From zsong at openjdk.org Thu Mar 16 15:43:50 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 15:43:50 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 05:20:54 GMT, Guoxiong Li wrote: > Hi all, > > This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. > > But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. > > Thanks for the review. > > Best Regards, > -- Guoxiong > > [1] https://bugs.openjdk.org/browse/SKARA-1843 I will check other places where we changed `authenticatedUrl().getHost()` to `url().getHost()` in SKARA-1813. ------------- PR Comment: https://git.openjdk.org/skara/pull/1485#issuecomment-1472222138 From zsong at openjdk.org Thu Mar 16 15:50:46 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 15:50:46 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 15:27:31 GMT, Erik Joelsson wrote: >> Hi all, >> >> This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. >> >> But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. >> >> Thanks for the review. >> >> Best Regards, >> -- Guoxiong >> >> [1] https://bugs.openjdk.org/browse/SKARA-1843 > > bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/MailingListArchiveReaderBot.java line 118: > >> 116: } >> 117: var bridgeIdStr = "^[^.]+\\.[^.]+@(?:" + pr.repository().url().getHost() + "|" + pr.repository().authenticatedUrl().getHost() + ")$"; >> 118: var bridgeIdPattern = Pattern.compile(bridgeIdStr); > > I think the correct fix is to just get the host from `authenticatedUrl`. Perhaps there should be a different method for this kind of usecase that better describes what we need here (the raw actual host, without the pattern rewrite), but at least for now, I think changing this to `authenticatedUrl` is a good enough fix. Thanks for figuring this out. Just a reminder, If so, we should also change `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().url().getHost())` in `ReviewArchive::getUniqueMessageId ` to `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().authenticatedUrl().getHost())` ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1138918907 From zsong at openjdk.org Thu Mar 16 17:19:10 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 17:19:10 GMT Subject: RFR: 1838: better error message when download fails Message-ID: Sometimes, users may want to run jcheck locally before creating PRs. However, Oracle employees who are connected to the Oracle VPN and have not set the https_proxy environment variable may encounter a "connect exception" error. In this patch, we will provide users with more information in the case of a "connect exception" error while running jcheck. ------------- Commit messages: - SKARA-1838 Changes: https://git.openjdk.org/skara/pull/1486/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1486&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1838 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1486.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1486/head:pull/1486 PR: https://git.openjdk.org/skara/pull/1486 From erikj at openjdk.org Thu Mar 16 18:37:29 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 16 Mar 2023 18:37:29 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 15:48:33 GMT, Zhao Song wrote: >> bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/MailingListArchiveReaderBot.java line 118: >> >>> 116: } >>> 117: var bridgeIdStr = "^[^.]+\\.[^.]+@(?:" + pr.repository().url().getHost() + "|" + pr.repository().authenticatedUrl().getHost() + ")$"; >>> 118: var bridgeIdPattern = Pattern.compile(bridgeIdStr); >> >> I think the correct fix is to just get the host from `authenticatedUrl`. Perhaps there should be a different method for this kind of usecase that better describes what we need here (the raw actual host, without the pattern rewrite), but at least for now, I think changing this to `authenticatedUrl` is a good enough fix. Thanks for figuring this out. > > Just a reminder, If so, we should also change `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().url().getHost())` in `ReviewArchive::getUniqueMessageId ` to `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().authenticatedUrl().getHost())` Yes, right, we are currently generating `Message-ID`s with the rewritten url. That's bad. We should make sure they are all reverted to github.com. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1139213720 From erikj at openjdk.org Thu Mar 16 18:40:33 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 16 Mar 2023 18:40:33 GMT Subject: RFR: 1838: better error message when download fails In-Reply-To: References: Message-ID: On Thu, 16 Mar 2023 17:11:57 GMT, Zhao Song wrote: > Sometimes, users may want to run jcheck locally before creating PRs. However, Oracle employees who are connected to the Oracle VPN and have not set the https_proxy environment variable may encounter a "connect exception" error. > In this patch, we will provide users with more information in the case of a "connect exception" error while running jcheck. cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 353: > 351: System.err.println(String.format("error: exception thrown during jcheck: %s", e.getMessage())); > 352: if (e.getMessage().equals("java.net.ConnectException")) { > 353: System.err.println("If you are connected to Oracle's VPN, please set the https_proxy environment variable and try again"); Suggestion: System.err.println("If you are behind a firewall without direct access to the internet, make sure to configure any required proxy server through the https_proxy environment variable and try again"); ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1486#discussion_r1139217687 From zsong at openjdk.org Thu Mar 16 19:10:50 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 19:10:50 GMT Subject: RFR: 1838: better error message when download fails [v2] In-Reply-To: References: Message-ID: > Sometimes, users may want to run jcheck locally before creating PRs. However, Oracle employees who are connected to the Oracle VPN and have not set the https_proxy environment variable may encounter a "connect exception" error. > In this patch, we will provide users with more information in the case of a "connect exception" error while running jcheck. Zhao Song has updated the pull request incrementally with one additional commit 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> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1486/files - new: https://git.openjdk.org/skara/pull/1486/files/48c29617..8a41dc23 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1486&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1486&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1486.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1486/head:pull/1486 PR: https://git.openjdk.org/skara/pull/1486 From erikj at openjdk.org Thu Mar 16 19:54:16 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 16 Mar 2023 19:54:16 GMT Subject: RFR: 1838: better error message when download fails [v2] In-Reply-To: References: Message-ID: On Thu, 16 Mar 2023 19:10:50 GMT, Zhao Song wrote: >> Sometimes, users may want to run jcheck locally before creating PRs. However, Oracle employees who are connected to the Oracle VPN and have not set the https_proxy environment variable may encounter a "connect exception" error. >> In this patch, we will provide users with more information in the case of a "connect exception" error while running jcheck. > > Zhao Song has updated the pull request incrementally with one additional commit 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> cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 352: > 350: } catch (Exception e) { > 351: System.err.println(String.format("error: exception thrown during jcheck: %s", e.getMessage())); > 352: if (e.getMessage().equals("java.net.ConnectException")) { I forgot to look at the rest of the code. I think this should be an `instanceof` check instead of comparing strings. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1486#discussion_r1139287193 From zsong at openjdk.org Thu Mar 16 20:49:52 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 20:49:52 GMT Subject: RFR: 1838: better error message when download fails [v3] In-Reply-To: References: Message-ID: > Sometimes, users may want to run jcheck locally before creating PRs. However, Oracle employees who are connected to the Oracle VPN and have not set the https_proxy environment variable may encounter a "connect exception" error. > In this patch, we will provide users with more information in the case of a "connect exception" error while running jcheck. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1486/files - new: https://git.openjdk.org/skara/pull/1486/files/8a41dc23..e43519ec Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1486&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1486&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1486.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1486/head:pull/1486 PR: https://git.openjdk.org/skara/pull/1486 From zsong at openjdk.org Thu Mar 16 20:49:52 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 20:49:52 GMT Subject: RFR: 1838: better error message when download fails [v2] In-Reply-To: References: Message-ID: <0wYX8o1sWdmOnnAafND6N0sI243lr27JvMA2PHKphJA=.44c58f0e-0469-4c82-a126-8aca87e508ca@git.openjdk.org> On Thu, 16 Mar 2023 19:51:55 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit 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> > > cli/src/main/java/org/openjdk/skara/cli/GitJCheck.java line 352: > >> 350: } catch (Exception e) { >> 351: System.err.println(String.format("error: exception thrown during jcheck: %s", e.getMessage())); >> 352: if (e.getMessage().equals("java.net.ConnectException")) { > > I forgot to look at the rest of the code. I think this should be an `instanceof` check instead of comparing strings. Sure ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1486#discussion_r1139340414 From erikj at openjdk.org Thu Mar 16 20:56:43 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 16 Mar 2023 20:56:43 GMT Subject: RFR: 1838: better error message when download fails [v3] In-Reply-To: References: Message-ID: On Thu, 16 Mar 2023 20:49:52 GMT, Zhao Song wrote: >> Sometimes, users may want to run jcheck locally before creating PRs. However, Oracle employees who are connected to the Oracle VPN and have not set the https_proxy environment variable may encounter a "connect exception" error. >> In this patch, we will provide users with more information in the case of a "connect exception" error while running jcheck. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1486#pullrequestreview-1344698126 From zsong at openjdk.org Thu Mar 16 21:44:06 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 16 Mar 2023 21:44:06 GMT Subject: Integrated: 1838: better error message when download fails In-Reply-To: References: Message-ID: On Thu, 16 Mar 2023 17:11:57 GMT, Zhao Song wrote: > Sometimes, users may want to run jcheck locally before creating PRs. However, Oracle employees who are connected to the Oracle VPN and have not set the https_proxy environment variable may encounter a "connect exception" error. > In this patch, we will provide users with more information in the case of a "connect exception" error while running jcheck. This pull request has now been integrated. Changeset: bead1076 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/bead1076477f2e2486a3a1b548dd48bc4b951453 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 1838: better error message when download fails Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1486 From gli at openjdk.org Thu Mar 16 22:18:59 2023 From: gli at openjdk.org (Guoxiong Li) Date: Thu, 16 Mar 2023 22:18:59 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 18:34:15 GMT, Erik Joelsson wrote: >> Just a reminder, If so, we should also change `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().url().getHost())` in `ReviewArchive::getUniqueMessageId ` to `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().authenticatedUrl().getHost())` > > Yes, right, we are currently generating `Message-ID`s with the rewritten url. That's bad. We should make sure they are all reverted to github.com. If we only filter the `authenticatedUrl`, what about the polluted data? The SKARA project now has many emails which have the message id with `git.openjdk.org`. If we don?t filter them, they would be posted as comments. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1139411065 From gli at openjdk.org Thu Mar 16 22:26:04 2023 From: gli at openjdk.org (Guoxiong Li) Date: Thu, 16 Mar 2023 22:26:04 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 15:36:09 GMT, Zhao Song wrote: > It is done automatically. It's a known issue. See [SKARA-1644](https://bugs.openjdk.org/projects/SKARA/issues/SKARA-1644) Thanks. But the time is too long and unacceptable. Hope SKARA-1644 can be fixed. ------------- PR Comment: https://git.openjdk.org/skara/pull/1485#issuecomment-1472836645 From gli at openjdk.org Thu Mar 16 23:12:56 2023 From: gli at openjdk.org (Guoxiong Li) Date: Thu, 16 Mar 2023 23:12:56 GMT Subject: RFR: 1843: mlbridge bot bridge emails generated by itself. [v2] In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: <-wt_NW4DsvyQOepQ2Mu49Gb_oveIobOvexnLavQ4NkY=.18f7ffde-4d33-4263-97f4-04a4c893d936@git.openjdk.org> > Hi all, > > This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. > > But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. > > Thanks for the review. > > Best Regards, > -- Guoxiong > > [1] https://bugs.openjdk.org/browse/SKARA-1843 Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: Change 'url' to 'authenticatedUrl' ------------- Changes: - all: https://git.openjdk.org/skara/pull/1485/files - new: https://git.openjdk.org/skara/pull/1485/files/b9fa0ec7..01cba348 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1485&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1485&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1485.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1485/head:pull/1485 PR: https://git.openjdk.org/skara/pull/1485 From erikj at openjdk.org Fri Mar 17 12:55:21 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 17 Mar 2023 12:55:21 GMT Subject: RFR: 1843: mlbridge bot bridges emails generated by itself [v2] In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 22:16:44 GMT, Guoxiong Li wrote: >> Yes, right, we are currently generating `Message-ID`s with the rewritten url. That's bad. We should make sure they are all reverted to github.com. > > If we only filter the `authenticatedUrl`, what about the polluted data? The SKARA project now has many emails which have the message id with `git.openjdk.org`. If we don?t filter them, they would be posted as comments. Yes, but it's only the Skara project, so I was ok with living with it. But sure, we can keep the double filter if we add the following comment. Suggestion: // Filter on both original, and any pattern replaced, host for now as we have polluted // data in the Skara project mail archives. We should revert this to just authenticatedUrl // eventually. var bridgeIdStr = "^[^.]+\.[^.]+@(?:" + pr.repository().url().getHost() + "|" + pr.repository().authenticatedUrl().getHost() + ")$"; var bridgeIdPattern = Pattern.compile(bridgeIdStr); ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1140199035 From gli at openjdk.org Fri Mar 17 13:25:36 2023 From: gli at openjdk.org (Guoxiong Li) Date: Fri, 17 Mar 2023 13:25:36 GMT Subject: RFR: 1843: mlbridge bot bridges emails generated by itself [v3] In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: > Hi all, > > This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. > > But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. > > Thanks for the review. > > Best Regards, > -- Guoxiong > > [1] https://bugs.openjdk.org/browse/SKARA-1843 Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: Use the simple pattern. ------------- Changes: - all: https://git.openjdk.org/skara/pull/1485/files - new: https://git.openjdk.org/skara/pull/1485/files/01cba348..8ff1e0f8 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1485&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1485&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1485.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1485/head:pull/1485 PR: https://git.openjdk.org/skara/pull/1485 From gli at openjdk.org Fri Mar 17 13:25:36 2023 From: gli at openjdk.org (Guoxiong Li) Date: Fri, 17 Mar 2023 13:25:36 GMT Subject: RFR: 1843: mlbridge bot bridges emails generated by itself [v3] In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: <_jZ9Br69BdaKuMohbREvakb1Fk9agHm-LTaXgDgEAkg=.0b3d3291-a631-41c3-b378-462467207f31@git.openjdk.org> On Fri, 17 Mar 2023 12:53:12 GMT, Erik Joelsson wrote: > Yes, but it's only the Skara project, so I was ok with living with it. After thinking more, I am OK with it too. It can also verify and confirm my thought about the hosts in this patch. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1140228349 From erikj at openjdk.org Fri Mar 17 13:44:41 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 17 Mar 2023 13:44:41 GMT Subject: RFR: 1843: mlbridge bot bridges emails generated by itself [v3] In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Fri, 17 Mar 2023 13:25:36 GMT, Guoxiong Li wrote: >> Hi all, >> >> This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. >> >> But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. >> >> Thanks for the review. >> >> Best Regards, >> -- Guoxiong >> >> [1] https://bugs.openjdk.org/browse/SKARA-1843 > > Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: > > Use the simple pattern. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1485#pullrequestreview-1345974226 From zsong at openjdk.org Fri Mar 17 13:44:41 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 17 Mar 2023 13:44:41 GMT Subject: RFR: 1843: mlbridge bot bridges emails generated by itself [v3] In-Reply-To: <_jZ9Br69BdaKuMohbREvakb1Fk9agHm-LTaXgDgEAkg=.0b3d3291-a631-41c3-b378-462467207f31@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> <_jZ9Br69BdaKuMohbREvakb1Fk9agHm-LTaXgDgEAkg=.0b3d3291-a631-41c3-b378-462467207f31@git.openjdk.org> Message-ID: On Fri, 17 Mar 2023 13:19:47 GMT, Guoxiong Li wrote: >> Yes, but it's only the Skara project, so I was ok with living with it. But sure, we can keep the double filter if we add the following comment. >> Suggestion: >> >> // Filter on both original, and any pattern replaced, host for now as we have polluted >> // data in the Skara project mail archives. We should revert this to just authenticatedUrl >> // eventually. >> var bridgeIdStr = "^[^.]+\.[^.]+@(?:" + pr.repository().url().getHost() + "|" + pr.repository().authenticatedUrl().getHost() + ")$"; >> var bridgeIdPattern = Pattern.compile(bridgeIdStr); > >> Yes, but it's only the Skara project, so I was ok with living with it. > > After thinking more, I am OK with it too. It can also verify and confirm my thought about the hosts in this patch. Another option for us is that we use double filter right now and after 14 days, we revert it back to only filter `authenticatedUrl()`. In this way, the polluted Skara emails wouldn't be bridged. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1140254977 From gli at openjdk.org Fri Mar 17 14:00:01 2023 From: gli at openjdk.org (Guoxiong Li) Date: Fri, 17 Mar 2023 14:00:01 GMT Subject: RFR: 1843: mlbridge bot bridges emails generated by itself [v3] In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> <_jZ9Br69BdaKuMohbREvakb1Fk9agHm-LTaXgDgEAkg=.0b3d3291-a631-41c3-b378-462467207f31@git.openjdk.org> Message-ID: On Fri, 17 Mar 2023 13:42:27 GMT, Zhao Song wrote: >>> Yes, but it's only the Skara project, so I was ok with living with it. >> >> After thinking more, I am OK with it too. It can also verify and confirm my thought about the hosts in this patch. > > Another option for us is that we use double filter right now and after 14 days, we revert it back to only filter `authenticatedUrl()`. In this way, the polluted Skara emails wouldn't be bridged. Seems to only influence several PRs, so I don't want to complicate the flow. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1140271614 From zsong at openjdk.org Fri Mar 17 14:00:01 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 17 Mar 2023 14:00:01 GMT Subject: RFR: 1843: mlbridge bot bridges emails generated by itself [v3] In-Reply-To: References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> <_jZ9Br69BdaKuMohbREvakb1Fk9agHm-LTaXgDgEAkg=.0b3d3291-a631-41c3-b378-462467207f31@git.openjdk.org> Message-ID: <7LC9I2eZ6LXb6RRgKtbEBXUpklzvvVJG2BeQsVOdeug=.df2d53c3-6cbe-4eed-9a41-96256c627f44@git.openjdk.org> On Fri, 17 Mar 2023 13:56:44 GMT, Guoxiong Li wrote: > Seems to only influence several PRs, so I don't want to complicate the flow. Sure! I am also ok with it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1140272665 From gli at openjdk.org Fri Mar 17 14:25:36 2023 From: gli at openjdk.org (Guoxiong Li) Date: Fri, 17 Mar 2023 14:25:36 GMT Subject: Integrated: 1843: mlbridge bot bridges emails generated by itself In-Reply-To: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> References: <4dbQdPR4p4GW3D7i1DEnS6qRIdq-jl4Pd5DujcmTSdY=.8f17e1bf-1125-4d3b-8a09-4fc65027c19d@git.openjdk.org> Message-ID: On Thu, 16 Mar 2023 05:20:54 GMT, Guoxiong Li wrote: > Hi all, > > This patch filters both `github.com` (by `authenticatedUrl()`) and `git.openjdk.com` (by `url()`) in `MailingListArchiveReaderBot::inspect` to avoid the bot posting the unnecessary comments to the PRs. Please see SKARA-1843 [1] for more information. > > But I can't write a test case for it now, because the current URLs of the repositories in test code are fake and their host are empty, which means both `pr.repository().url().getHost()` and `pr.repository().authenticatedUrl().getHost()` always return `null`. > > Thanks for the review. > > Best Regards, > -- Guoxiong > > [1] https://bugs.openjdk.org/browse/SKARA-1843 This pull request has now been integrated. Changeset: 0853677a Author: Guoxiong Li URL: https://git.openjdk.org/skara/commit/0853677abeb6d22580b3f4d0b0bfe03b4736630e Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod 1843: mlbridge bot bridges emails generated by itself Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1485 From gli at openjdk.org Sun Mar 19 14:02:25 2023 From: gli at openjdk.org (Guoxiong Li) Date: Sun, 19 Mar 2023 14:02:25 GMT Subject: RFR: 1846: Optimize the method MailmanListReader::conversations Message-ID: Hi all, This patch caches the finally unchanged emails instead of the http response at the previous months to improve the performance. And it add the emails to the end of the list to avoid memory copy. Thanks for the review. Best Regards, -- Guoxiong ------------- Commit messages: - SKARA-1846 Changes: https://git.openjdk.org/skara/pull/1487/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1487&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1846 Stats: 43 lines in 1 file changed: 29 ins; 2 del; 12 mod Patch: https://git.openjdk.org/skara/pull/1487.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1487/head:pull/1487 PR: https://git.openjdk.org/skara/pull/1487 From zsong at openjdk.org Mon Mar 20 18:32:59 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 18:32:59 GMT Subject: RFR: 1849: Exception when creating a new PR from CLI Message-ID: Since `git-for-each-ref` is updated in git 2.40.0, the output of this command is changed and would invoke some errors when using `git pr create`. In this patch, we would filter out invalid output when trying to find candidate target refs. ------------- Commit messages: - SKARA-1849 Changes: https://git.openjdk.org/skara/pull/1488/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1488&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1849 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1488.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1488/head:pull/1488 PR: https://git.openjdk.org/skara/pull/1488 From erikj at openjdk.org Mon Mar 20 19:20:12 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 20 Mar 2023 19:20:12 GMT Subject: RFR: 1849: Exception when creating a new PR from CLI In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 18:25:32 GMT, Zhao Song wrote: > Since `git-for-each-ref` is updated in git 2.40.0, the output of this command is changed and would invoke some errors when using `git pr create`. > > In this patch, we would filter out invalid output when trying to find candidate target refs. Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1488#pullrequestreview-1349248427 From zsong at openjdk.org Mon Mar 20 19:27:32 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 19:27:32 GMT Subject: Integrated: 1849: Exception when creating a new PR from CLI In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 18:25:32 GMT, Zhao Song wrote: > Since `git-for-each-ref` is updated in git 2.40.0, the output of this command is changed and would invoke some errors when using `git pr create`. > > In this patch, we would filter out invalid output when trying to find candidate target refs. This pull request has now been integrated. Changeset: 5170c585 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/5170c58502b789d0ee9848eeadfc710905050e1e Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 1849: Exception when creating a new PR from CLI Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1488 From zsong at openjdk.org Mon Mar 20 22:04:01 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 22:04:01 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches Message-ID: In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. ------------- Commit messages: - fix a problem - fix import - SKARA-1830 Changes: https://git.openjdk.org/skara/pull/1489/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1489&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1830 Stats: 22 lines in 2 files changed: 17 ins; 5 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1489.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1489/head:pull/1489 PR: https://git.openjdk.org/skara/pull/1489 From zsong at openjdk.org Mon Mar 20 22:04:01 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 22:04:01 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 21:56:22 GMT, Zhao Song wrote: > In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. bots/notify/src/main/java/org/openjdk/skara/bots/notify/prbranch/PullRequestBranchNotifier.java line 67: > 65: if (protectBranches) { > 66: log.info("Removing branch protection for " + branch); > 67: pr.repository().unprotectBranchPattern(branch); We still need this because it's possible that we have some pr branch protected before we deploy this patch. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142717306 From erikj at openjdk.org Mon Mar 20 22:52:39 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 20 Mar 2023 22:52:39 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 21:56:22 GMT, Zhao Song wrote: > In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. bots/notify/src/main/java/org/openjdk/skara/bots/notify/NotifyBot.java line 92: > 90: repository.protectBranchPattern("*"); > 91: wildCardProtected = true; > 92: } I would suggest adding a new method on the `PullRequestListener` interface `initialize(HostedRepository)` and implement this method in `PullRequestBranchNotifier` so you can put this logic there instead. Then you can call `initialize` on all listeners when `getPeriodicItems` is called the first time. bots/notify/src/main/java/org/openjdk/skara/bots/notify/prbranch/PullRequestBranchNotifier.java line 78: > 76: pr.repository().deleteBranch(branch); > 77: log.info("Protecting branch * after deleting branch " + branch); > 78: pr.repository().protectBranchPattern("*"); We should not be touching branch protection settings unless `protectBranches` is enabled. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142738696 PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142739478 From erikj at openjdk.org Mon Mar 20 22:52:39 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 20 Mar 2023 22:52:39 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 21:59:37 GMT, Zhao Song wrote: >> In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. > > bots/notify/src/main/java/org/openjdk/skara/bots/notify/prbranch/PullRequestBranchNotifier.java line 67: > >> 65: if (protectBranches) { >> 66: log.info("Removing branch protection for " + branch); >> 67: pr.repository().unprotectBranchPattern(branch); > > We still need this because it's possible that we have some pr branch protected before we deploy this patch. You should add a code comment explaining this so we may eventually remove that code later. Have you checked how the call behaves if there is no protection to remove? ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142741076 From zsong at openjdk.org Mon Mar 20 22:58:47 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 22:58:47 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches In-Reply-To: References: Message-ID: <_lEAUYn6C3kubGGyQpuF5Tk4QYQu7zRVW5-h3Hw72gk=.617f8fab-06f1-4a09-88f9-732ac4e56c9f@github.com> On Mon, 20 Mar 2023 22:32:58 GMT, Erik Joelsson wrote: >> In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. > > bots/notify/src/main/java/org/openjdk/skara/bots/notify/NotifyBot.java line 92: > >> 90: repository.protectBranchPattern("*"); >> 91: wildCardProtected = true; >> 92: } > > I would suggest adding a new method on the `PullRequestListener` interface `initialize(HostedRepository)` and implement this method in `PullRequestBranchNotifier` so you can put this logic there instead. Then you can call `initialize` on all listeners when `getPeriodicItems` is called the first time. Good idea. Will do it. > bots/notify/src/main/java/org/openjdk/skara/bots/notify/prbranch/PullRequestBranchNotifier.java line 78: > >> 76: pr.repository().deleteBranch(branch); >> 77: log.info("Protecting branch * after deleting branch " + branch); >> 78: pr.repository().protectBranchPattern("*"); > > We should not be touching branch protection settings unless `protectBranches` is enabled. Exactly, will fix it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142750863 PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142751382 From zsong at openjdk.org Mon Mar 20 22:58:47 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 22:58:47 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 22:37:32 GMT, Erik Joelsson wrote: >> bots/notify/src/main/java/org/openjdk/skara/bots/notify/prbranch/PullRequestBranchNotifier.java line 67: >> >>> 65: if (protectBranches) { >>> 66: log.info("Removing branch protection for " + branch); >>> 67: pr.repository().unprotectBranchPattern(branch); >> >> We still need this because it's possible that we have some pr branch protected before we deploy this patch. > > You should add a code comment explaining this so we may eventually remove that code later. > > Have you checked how the call behaves if there is no protection to remove? Sure, will add the comment. No, I didn't check it by myself because I saw your test in `GitLabRestApiTest::branchProtection`. I will check it again later. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142752422 From zsong at openjdk.org Mon Mar 20 23:13:13 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 23:13:13 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches [v2] In-Reply-To: References: Message-ID: > In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix problems ------------- Changes: - all: https://git.openjdk.org/skara/pull/1489/files - new: https://git.openjdk.org/skara/pull/1489/files/fefdaac9..b8e97b9a Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1489&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1489&range=00-01 Stats: 23 lines in 3 files changed: 12 ins; 3 del; 8 mod Patch: https://git.openjdk.org/skara/pull/1489.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1489/head:pull/1489 PR: https://git.openjdk.org/skara/pull/1489 From zsong at openjdk.org Mon Mar 20 23:22:42 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 20 Mar 2023 23:22:42 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches [v2] In-Reply-To: References: Message-ID: <9aBKHwT5S9fX0vPwNp8-6LWFEaAxiEWgZYm_lr5WYks=.a2cd95e0-b430-4057-88b1-5bbea748d1cd@github.com> On Mon, 20 Mar 2023 22:56:26 GMT, Zhao Song wrote: >> You should add a code comment explaining this so we may eventually remove that code later. >> >> Have you checked how the call behaves if there is no protection to remove? > > Sure, will add the comment. No, I didn't check it by myself because I saw your test in `GitLabRestApiTest::branchProtection`. I will check it again later. Checked it again, if there is no protection to remove, nothing would happen. The bot works fine. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1489#discussion_r1142764781 From erikj at openjdk.org Tue Mar 21 12:52:15 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 21 Mar 2023 12:52:15 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches [v2] In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 23:13:13 GMT, Zhao Song wrote: >> In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix problems Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1489#pullrequestreview-1350367942 From zsong at openjdk.org Tue Mar 21 13:14:27 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 21 Mar 2023 13:14:27 GMT Subject: RFR: 1830: Support wildcard branch protection with prbranches [v2] In-Reply-To: References: Message-ID: On Mon, 20 Mar 2023 23:13:13 GMT, Zhao Song wrote: >> In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix problems Thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1489#issuecomment-1477813897 From zsong at openjdk.org Tue Mar 21 13:14:27 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 21 Mar 2023 13:14:27 GMT Subject: Integrated: 1830: Support wildcard branch protection with prbranches In-Reply-To: References: Message-ID: <50ICEHyg2TcXyoGtLMjHKqUuCKd3p2PgPXujB-PNg2E=.39be9737-2950-4929-9f25-e9771ec83467@github.com> On Mon, 20 Mar 2023 21:56:22 GMT, Zhao Song wrote: > In this patch, notifyBot would add wildcard branch protection for the repo, and when the bot tries to delete the pr/* branch, it will temporarily remove wildcard branch protection. This pull request has now been integrated. Changeset: 8e974e45 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/8e974e45f0124a9e88b816e484f3516538b0e961 Stats: 31 lines in 3 files changed: 26 ins; 5 del; 0 mod 1830: Support wildcard branch protection with prbranches Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1489 From erikj at openjdk.org Wed Mar 22 20:09:20 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 22 Mar 2023 20:09:20 GMT Subject: RFR: 1827: Better handling of Error Message-ID: After some deliberation, I think this is how we should handle an `Error` being thrown when running a `WorkItem`. We need to attempt to log it and register it in the counters, otherwise it will be very hard to discover the problem. We also need to attempt to return the scratch path to the BotRunner, as well as removing the item from the active set, otherwise the BotRunner will enter a broken state. The drawback of this is that it will allow new instances of the same WorkItem to run, which will likely repeat the Error. I still think that's the better option compared to what we experienced in SKARA-1825. I think it's fine to skip scheduling of pending items. When an Error has been thrown in a thread, we should try to minimize any additional work in that thread to only what's necessary. Unless every WorkItem throws an Error, pending items will get scheduled eventually anyway, by some other successful WorkItem. If every WorkItem is throwing an Error, then not scheduling pending items is the least of our problems. By re-throwing the `Error` we make sure the Runnable exists as quickly as possible. ------------- Commit messages: - SKARA-1827 Changes: https://git.openjdk.org/skara/pull/1490/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1490&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1827 Stats: 11 lines in 1 file changed: 8 ins; 3 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1490.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1490/head:pull/1490 PR: https://git.openjdk.org/skara/pull/1490 From zsong at openjdk.org Wed Mar 22 20:30:25 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 22 Mar 2023 20:30:25 GMT Subject: RFR: 1827: Better handling of Error In-Reply-To: References: Message-ID: On Wed, 22 Mar 2023 20:05:37 GMT, Erik Joelsson wrote: > After some deliberation, I think this is how we should handle an `Error` being thrown when running a `WorkItem`. > > We need to attempt to log it and register it in the counters, otherwise it will be very hard to discover the problem. > > We also need to attempt to return the scratch path to the BotRunner, as well as removing the item from the active set, otherwise the BotRunner will enter a broken state. The drawback of this is that it will allow new instances of the same WorkItem to run, which will likely repeat the Error. I still think that's the better option compared to what we experienced in SKARA-1825. > > I think it's fine to skip scheduling of pending items. When an Error has been thrown in a thread, we should try to minimize any additional work in that thread to only what's necessary. Unless every WorkItem throws an Error, pending items will get scheduled eventually anyway, by some other successful WorkItem. If every WorkItem is throwing an Error, then not scheduling pending items is the least of our problems. By re-throwing the `Error` we make sure the Runnable exists as quickly as possible. LGTM bot/src/main/java/org/openjdk/skara/bot/BotRunner.java line 236: > 234: } catch (Error e) { > 235: EXCEPTIONS_COUNTER.labels(item.botName(), item.workItemName(), e.getClass().getName()).inc(); > 236: log.log(Level.SEVERE, "Error thrown during item execution: " + e.getMessage(), e); Maybe we could also log `item` in the message. ------------- Marked as reviewed by zsong (Committer). PR Review: https://git.openjdk.org/skara/pull/1490#pullrequestreview-1353426220 PR Review Comment: https://git.openjdk.org/skara/pull/1490#discussion_r1145373732 From erikj at openjdk.org Wed Mar 22 20:37:23 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 22 Mar 2023 20:37:23 GMT Subject: RFR: 1827: Better handling of Error [v2] In-Reply-To: References: Message-ID: > After some deliberation, I think this is how we should handle an `Error` being thrown when running a `WorkItem`. > > We need to attempt to log it and register it in the counters, otherwise it will be very hard to discover the problem. > > We also need to attempt to return the scratch path to the BotRunner, as well as removing the item from the active set, otherwise the BotRunner will enter a broken state. The drawback of this is that it will allow new instances of the same WorkItem to run, which will likely repeat the Error. I still think that's the better option compared to what we experienced in SKARA-1825. > > I think it's fine to skip scheduling of pending items. When an Error has been thrown in a thread, we should try to minimize any additional work in that thread to only what's necessary. Unless every WorkItem throws an Error, pending items will get scheduled eventually anyway, by some other successful WorkItem. If every WorkItem is throwing an Error, then not scheduling pending items is the least of our problems. By re-throwing the `Error` we make sure the Runnable exists as quickly as possible. Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: Improve log message ------------- Changes: - all: https://git.openjdk.org/skara/pull/1490/files - new: https://git.openjdk.org/skara/pull/1490/files/63f8a7a9..91eac6ae Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1490&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1490&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/skara/pull/1490.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1490/head:pull/1490 PR: https://git.openjdk.org/skara/pull/1490 From erikj at openjdk.org Wed Mar 22 20:37:23 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 22 Mar 2023 20:37:23 GMT Subject: RFR: 1827: Better handling of Error [v2] In-Reply-To: References: Message-ID: On Wed, 22 Mar 2023 20:28:03 GMT, Zhao Song wrote: >> Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: >> >> Improve log message > > bot/src/main/java/org/openjdk/skara/bot/BotRunner.java line 236: > >> 234: } catch (Error e) { >> 235: EXCEPTIONS_COUNTER.labels(item.botName(), item.workItemName(), e.getClass().getName()).inc(); >> 236: log.log(Level.SEVERE, "Error thrown during item execution: " + e.getMessage(), e); > > Maybe we could also log `item` in the message. Right yes, that's a good idea. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1490#discussion_r1145377556 From zsong at openjdk.org Thu Mar 23 19:05:17 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 23 Mar 2023 19:05:17 GMT Subject: RFR: 1734: Reduce disk usage in pr bot Message-ID: As Erik mentioned in the issue, currently, pr bot would create multiple repository clones in different sub directory in the scratch directory which resulting in significant disk space wastage within the container. In this patch, the repository clones will be stored in a single directory at `scratch-x/pr/repos/repoName`, allowing different types of `WorkItems` to reuse this space. ------------- Commit messages: - SKARA-1734 Changes: https://git.openjdk.org/skara/pull/1491/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1491&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1734 Stats: 10 lines in 4 files changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.org/skara/pull/1491.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1491/head:pull/1491 PR: https://git.openjdk.org/skara/pull/1491 From erikj at openjdk.org Thu Mar 23 19:59:11 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 23 Mar 2023 19:59:11 GMT Subject: RFR: 1734: Reduce disk usage in pr bot In-Reply-To: References: Message-ID: On Thu, 23 Mar 2023 18:56:01 GMT, Zhao Song wrote: > As Erik mentioned in the issue, currently, pr bot would create multiple repository clones in different sub directory in the scratch directory which resulting in significant disk space wastage within the container. > > In this patch, the repository clones will be stored in a single directory at `scratch-x/pr/repos/repoName`, allowing different types of `WorkItems` to reuse this space. This is a very minimal patch that does solve the issue. However, I don't like that IntegrateCommand has to know to call `getParent` on the scratchPath it gets to be able to resolve the correct path for a repo. I think we should hide this knowledge behind an abstraction. Instead of sending `Path scratchPath` around, we could define a new class `ScratchArea` that has methods for generating paths. `ScratchArea` is initialized with a Path object. This could happen in `PullRequestWorkItem::run` and `prRun` can be changed to take a `ScratchArea` instance. `ScratchArea.get(Repository)` would return a global repository path for that repository. `ScratchArea.get(CommandHandler)` would return a path suitable for that command. `ScratchArea.get(WorkItem)` would return a path suitable for that WorkItem. This would move the knowledge of the exact file layout to this class, so individual WorkItems or commands wouldn't need to know the directory hierarchy themselves. ------------- PR Review: https://git.openjdk.org/skara/pull/1491#pullrequestreview-1355469879 From zsong at openjdk.org Thu Mar 23 20:13:40 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 23 Mar 2023 20:13:40 GMT Subject: RFR: 1734: Reduce disk usage in pr bot In-Reply-To: References: Message-ID: On Thu, 23 Mar 2023 19:57:02 GMT, Erik Joelsson wrote: > This is a very minimal patch that does solve the issue. However, I don't like that IntegrateCommand has to know to call `getParent` on the scratchPath it gets to be able to resolve the correct path for a repo. I think we should hide this knowledge behind an abstraction. Instead of sending `Path scratchPath` around, we could define a new class `ScratchArea` that has methods for generating paths. > > `ScratchArea` is initialized with a Path object. This could happen in `PullRequestWorkItem::run` and `prRun` can be changed to take a `ScratchArea` instance. `ScratchArea.get(Repository)` would return a global repository path for that repository. `ScratchArea.get(CommandHandler)` would return a path suitable for that command. `ScratchArea.get(WorkItem)` would return a path suitable for that WorkItem. > > This would move the knowledge of the exact file layout to this class, so individual WorkItems or commands wouldn't need to know the directory hierarchy themselves. It's quite a good idea. Will do it. ------------- PR Comment: https://git.openjdk.org/skara/pull/1491#issuecomment-1481830060 From gli at openjdk.org Sat Mar 25 00:21:31 2023 From: gli at openjdk.org (Guoxiong Li) Date: Sat, 25 Mar 2023 00:21:31 GMT Subject: Withdrawn: 1846: Optimize the method MailmanListReader::conversations In-Reply-To: References: Message-ID: On Sun, 19 Mar 2023 13:47:43 GMT, Guoxiong Li wrote: > Hi all, > > This patch caches the finally unchanged emails instead of the http response at the previous months to improve the performance. And it adds the emails to the end of the list to avoid memory copy. > > Thanks for the review. > > Best Regards, > -- Guoxiong This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/skara/pull/1487 From zsong at openjdk.org Mon Mar 27 22:24:25 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 27 Mar 2023 22:24:25 GMT Subject: RFR: 1851: Fold CSR bot into PR bot Message-ID: In this patch, the whole csr bot module is removed. Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. ------------- Commit messages: - SKARA-1851 Changes: https://git.openjdk.org/skara/pull/1492/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1851 Stats: 2582 lines in 22 files changed: 1006 ins; 1534 del; 42 mod Patch: https://git.openjdk.org/skara/pull/1492.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/skara/pull/1492 From erikj at openjdk.org Mon Mar 27 23:02:48 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 27 Mar 2023 23:02:48 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: On Mon, 27 Mar 2023 21:48:23 GMT, Zhao Song wrote: > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. I've skimmed through a first pass of the patch. The comments about unifying functionality in CheckRun could perhaps be done in a separate followup fix to keep the size of this change down. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueBot.java line 54: > 52: this.pullRequestBotMap = pullRequestBotMap; > 53: // The CSRPullRequestBot will initially evaluate all active PRs so there > 54: // is no need to look at any issues older than the start time of the bot This comment needs to be updated. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1287: > 1285: } > 1286: > 1287: void updateCSRLabel(List issues) { Why not private? bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1289: > 1287: void updateCSRLabel(List issues) { > 1288: if (issues.isEmpty()) { > 1289: log.info("No issue found for " + describe(pr)); I don't think this log message is relevant when this code is running as part of CheckRun. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1293: > 1291: } > 1292: > 1293: var versionOpt = BotUtils.getVersion(pr); Can we reuse version from line 1167? bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1318: > 1316: } > 1317: > 1318: var csrOptional = Backports.findCsr(jbsIssueOpt.get(), versionOpt.get()); Can this be unified with the `getCsrIssueTrackerIssues` call right before this method is called? We shouldn't need to fetch CSR issues more than once. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 63: > 61: private final boolean forceUpdate; > 62: > 63: CheckWorkItem(PullRequestBot bot, String prId, Consumer errorHandler, ZonedDateTime prUpdatedAt, There are a lot of calls to the old constructor. Instead of adding `false` to all of them, perhaps overload the constructor with a default false. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 278: > 276: var activeReviews = CheckablePullRequest.filterActiveReviews(allReviews, pr.targetRef()); > 277: // Determine if the current state of the PR has already been checked > 278: if (forceUpdate || !currentCheckValid(census, comments, activeReviews, labels)) { Forcing an update is one way of solving this. It may turn out to trigger too many updates. If so we will need to think about how we can identify relevant changes to the issue, or at least filter out obviously irrelevant changes. We only really care about state changes. bots/pr/src/main/java/org/openjdk/skara/bots/pr/IssueWorkItem.java line 102: > 100: .flatMap(r -> r.parsePullRequestUrl(uri.toString()).stream())) > 101: .filter(Issue::isOpen) > 102: .map(pr -> new CheckWorkItem(bot.getPRBot(pr.repository().name()), pr.id(), errorHandler, pr.updatedAt(), true, true)) The updatedAt parameter is used for the logLatency functionality. That means that the timestamp needs to be the timestamp of the action that caused this WorkItem to be scheduled. In this case that is the timestamp of the csrIssue update, not the pr. So this needs to be changed back to `csrIssue.updatedAt()` and the comment needs to be restored. The rest of the code for logLatency in PR bot isn't aware of Issues now being able to trigger updates, so the variable names and log messages assume it's prUpdatedAt. This should ideally also be changed. ------------- PR Review: https://git.openjdk.org/skara/pull/1492#pullrequestreview-1359953776 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149847408 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149848687 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149851405 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149851087 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149853017 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149862023 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149865068 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149859255 From zsong at openjdk.org Mon Mar 27 23:07:38 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 27 Mar 2023 23:07:38 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: On Mon, 27 Mar 2023 22:27:43 GMT, Erik Joelsson wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueBot.java line 54: > >> 52: this.pullRequestBotMap = pullRequestBotMap; >> 53: // The CSRPullRequestBot will initially evaluate all active PRs so there >> 54: // is no need to look at any issues older than the start time of the bot > > This comment needs to be updated. Sure, will update it. > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1287: > >> 1285: } >> 1286: >> 1287: void updateCSRLabel(List issues) { > > Why not private? Yes, it would be better to make it private, will fix it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149868330 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149868682 From zsong at openjdk.org Mon Mar 27 23:13:53 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 27 Mar 2023 23:13:53 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: On Mon, 27 Mar 2023 22:33:44 GMT, Erik Joelsson wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1293: > >> 1291: } >> 1292: >> 1293: var versionOpt = BotUtils.getVersion(pr); > > Can we reuse version from line 1167? Yes, we can. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149870838 From erikj at openjdk.org Mon Mar 27 23:13:53 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 27 Mar 2023 23:13:53 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: On Mon, 27 Mar 2023 21:48:23 GMT, Zhao Song wrote: > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRTests.java line 453: > 451: > 452: // The bot should reply with a message that there is already an approved > 453: // Now CheckWorkItem is responsible for updating CSR label, so before 'csr' is handled, csr label is added to this pr I don't understand this comment. bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java line 173: > 171: assertNotNull(csrIssueBot2.getPRBot("repo2")); > 172: assertNotNull(csrIssueBot2.getPRBot("repo5")); > 173: assertNotNull(csrIssueBot2.getPRBot("repo6")); This doesn't look right. An instance of `CSRIssueBot` should only have access to `PullRequestBot` instances for repositories that share the same IssueProject. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149867142 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149871746 From zsong at openjdk.org Mon Mar 27 23:18:20 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 27 Mar 2023 23:18:20 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: <786zcnoQF-jZs2YKBB0T42z5WA3s97lz4XOW9_0OMZ0=.4a6cbd92-6005-4afa-b387-1679ac3cbb70@github.com> On Mon, 27 Mar 2023 23:02:39 GMT, Erik Joelsson wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRTests.java line 453: > >> 451: >> 452: // The bot should reply with a message that there is already an approved >> 453: // Now CheckWorkItem is responsible for updating CSR label, so before 'csr' is handled, csr label is added to this pr > > I don't understand this comment. Sorry, somehow the sentence is truncated. Will update the comment ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149874267 From zsong at openjdk.org Mon Mar 27 23:23:23 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 27 Mar 2023 23:23:23 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: On Mon, 27 Mar 2023 23:11:25 GMT, Erik Joelsson wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java line 173: > >> 171: assertNotNull(csrIssueBot2.getPRBot("repo2")); >> 172: assertNotNull(csrIssueBot2.getPRBot("repo5")); >> 173: assertNotNull(csrIssueBot2.getPRBot("repo6")); > > This doesn't look right. An instance of `CSRIssueBot` should only have access to `PullRequestBot` instances for repositories that share the same IssueProject. At first, I had the same idea with you and later I found it a little complex to implement it. But if we let all CSRIssueBots share a map, it would be very easy. If you think it's necessary to change, I will fix it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149876593 From zsong at openjdk.org Mon Mar 27 23:30:55 2023 From: zsong at openjdk.org (Zhao Song) Date: Mon, 27 Mar 2023 23:30:55 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: <6kjpfVWJIl_CVX2WiUY7wH0ihbQRA79jVlWf6LoVg-c=.bc667e52-2568-46a3-b739-bd7dd77e9c88@github.com> On Mon, 27 Mar 2023 22:53:44 GMT, Erik Joelsson wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 63: > >> 61: private final boolean forceUpdate; >> 62: >> 63: CheckWorkItem(PullRequestBot bot, String prId, Consumer errorHandler, ZonedDateTime prUpdatedAt, > > There are a lot of calls to the old constructor. Instead of adding `false` to all of them, perhaps overload the constructor with a default false. Yes, it's a good idea ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149880270 From zsong at openjdk.org Tue Mar 28 00:48:30 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 00:48:30 GMT Subject: RFR: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: On Mon, 27 Mar 2023 22:37:25 GMT, Erik Joelsson wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1318: > >> 1316: } >> 1317: >> 1318: var csrOptional = Backports.findCsr(jbsIssueOpt.get(), versionOpt.get()); > > Can this be unified with the `getCsrIssueTrackerIssues` call right before this method is called? We shouldn't need to fetch CSR issues more than once. Yes, we can. Fixed it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149915237 From zsong at openjdk.org Tue Mar 28 01:02:48 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 01:02:48 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v2] In-Reply-To: References: Message-ID: > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix problems ------------- Changes: - all: https://git.openjdk.org/skara/pull/1492/files - new: https://git.openjdk.org/skara/pull/1492/files/a048bd7b..d0a0d2f0 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=00-01 Stats: 55 lines in 8 files changed: 13 ins; 4 del; 38 mod Patch: https://git.openjdk.org/skara/pull/1492.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/skara/pull/1492 From zsong at openjdk.org Tue Mar 28 01:02:48 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 01:02:48 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v2] In-Reply-To: References: Message-ID: <_fgeKPwmn7jomXuIEKMjW1Th1FLTaZvrjgug4XG8Q_E=.e2c38732-962a-4021-8f23-eb828fe3a57b@github.com> On Mon, 27 Mar 2023 22:58:49 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> fix problems > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 278: > >> 276: var activeReviews = CheckablePullRequest.filterActiveReviews(allReviews, pr.targetRef()); >> 277: // Determine if the current state of the PR has already been checked >> 278: if (forceUpdate || !currentCheckValid(census, comments, activeReviews, labels)) { > > Forcing an update is one way of solving this. It may turn out to trigger too many updates. If so we will need to think about how we can identify relevant changes to the issue, or at least filter out obviously irrelevant changes. We only really care about state changes. Yes, you're right. Currently, any change to a csr issue would trigger update to the relevant pr. I will try to get the activities of the csr issue. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1149920752 From ehelin at openjdk.org Tue Mar 28 09:38:42 2023 From: ehelin at openjdk.org (Erik Helin) Date: Tue, 28 Mar 2023 09:38:42 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot Message-ID: Hi all, please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. ### Testing - [x] Added one additional unit test Thanks, Erik ------------- Commit messages: - 1859 Changes: https://git.openjdk.org/skara/pull/1493/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1493&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1859 Stats: 163 lines in 7 files changed: 134 ins; 10 del; 19 mod Patch: https://git.openjdk.org/skara/pull/1493.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1493/head:pull/1493 PR: https://git.openjdk.org/skara/pull/1493 From erikj at openjdk.org Tue Mar 28 13:16:02 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 28 Mar 2023 13:16:02 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot In-Reply-To: References: Message-ID: <-vhnEZUo1PDo4uU2dl5oe38Ph9SuC5OFx3gysGQNEdc=.2f101742-f354-45e5-b931-2d7688a0951a@github.com> On Tue, 28 Mar 2023 09:34:32 GMT, Erik Helin wrote: > Hi all, > > please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. > > ### Testing > - [x] Added one additional unit test > > Thanks, > Erik Could you expand the `MirrorBotFactory` test to verify the new configuration options? It's also worth pointing out that existing configurations will need to be updated when this change goes live. ------------- PR Review: https://git.openjdk.org/skara/pull/1493#pullrequestreview-1361050262 From zsong at openjdk.org Tue Mar 28 19:47:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 19:47:18 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: References: Message-ID: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. Zhao Song has updated the pull request incrementally with four additional commits since the last revision: - fix a problem - fix a problem - renamed some classes - improve PullRequestBotFactoryTest ------------- Changes: - all: https://git.openjdk.org/skara/pull/1492/files - new: https://git.openjdk.org/skara/pull/1492/files/d0a0d2f0..f06cf10e Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=01-02 Stats: 26 lines in 7 files changed: 3 ins; 9 del; 14 mod Patch: https://git.openjdk.org/skara/pull/1492.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/skara/pull/1492 From erikj at openjdk.org Tue Mar 28 19:47:18 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 28 Mar 2023 19:47:18 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> References: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> Message-ID: <2ac6tPfi3ACXkb1H7zB0YQT8lu_4_n_UO-OW7k8fD0M=.1f2a6e21-80b5-4252-91f9-acc6a9c3c516@github.com> On Tue, 28 Mar 2023 19:43:14 GMT, Zhao Song wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > Zhao Song has updated the pull request incrementally with four additional commits since the last revision: > > - fix a problem > - fix a problem > - renamed some classes > - improve PullRequestBotFactoryTest bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueWorkItem.java line 102: > 100: .flatMap(r -> r.parsePullRequestUrl(uri.toString()).stream())) > 101: .filter(Issue::isOpen) > 102: .filter(pr -> bot.getPRBot(pr.repository().namespace()).enableCsr()) Are you sure about `.namespace()`? bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueWorkItem.java line 104: > 102: // This will mix time stamps from the IssueTracker and the Forge hosting PRs, but it's the > 103: // best we can do. > 104: .map(pr -> new CheckWorkItem(bot.getPRBot(pr.repository().name()), pr.id(), errorHandler, csrIssue.updatedAt(), true, true)) We should probably only schedule this if the PullRequestBot in question is configured to handle CSR. bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRBotTests.java line 65: > 63: TestBotRunner.runPeriodicItems(csrIssueBot); > 64: > 65: var csr = issueProject.createIssue("This is an approved CSR", List.of(), Map.of()); The title is misleading. The CSR isn't approved until the end of this test. bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRBotTests.java line 94: > 92: TestBotRunner.runPeriodicItems(csrIssueBot); > 93: // The bot should have removed the CSR label > 94: assertFalse(pr.store().labelNames().contains("csr")); At this point, the label is removed, but the PR body still doesn't have the checkbox checked. I think the logic for the checkbox and the label need to be unified and consistent. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151035004 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150970336 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150921155 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150949374 From zsong at openjdk.org Tue Mar 28 19:47:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 19:47:18 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: <2ac6tPfi3ACXkb1H7zB0YQT8lu_4_n_UO-OW7k8fD0M=.1f2a6e21-80b5-4252-91f9-acc6a9c3c516@github.com> References: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> <2ac6tPfi3ACXkb1H7zB0YQT8lu_4_n_UO-OW7k8fD0M=.1f2a6e21-80b5-4252-91f9-acc6a9c3c516@github.com> Message-ID: On Tue, 28 Mar 2023 18:53:25 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with four additional commits since the last revision: >> >> - fix a problem >> - fix a problem >> - renamed some classes >> - improve PullRequestBotFactoryTest > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueWorkItem.java line 102: > >> 100: .flatMap(r -> r.parsePullRequestUrl(uri.toString()).stream())) >> 101: .filter(Issue::isOpen) >> 102: .filter(pr -> bot.getPRBot(pr.repository().namespace()).enableCsr()) > > Are you sure about `.namespace()`? Oops, of course not. Sorry for the mistake. I will fix it soon. > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueWorkItem.java line 104: > >> 102: // This will mix time stamps from the IssueTracker and the Forge hosting PRs, but it's the >> 103: // best we can do. >> 104: .map(pr -> new CheckWorkItem(bot.getPRBot(pr.repository().name()), pr.id(), errorHandler, csrIssue.updatedAt(), true, true)) > > We should probably only schedule this if the PullRequestBot in question is configured to handle CSR. Good idea! > bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRBotTests.java line 65: > >> 63: TestBotRunner.runPeriodicItems(csrIssueBot); >> 64: >> 65: var csr = issueProject.createIssue("This is an approved CSR", List.of(), Map.of()); > > The title is misleading. The CSR isn't approved until the end of this test. Will fix it. > bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRBotTests.java line 94: > >> 92: TestBotRunner.runPeriodicItems(csrIssueBot); >> 93: // The bot should have removed the CSR label >> 94: assertFalse(pr.store().labelNames().contains("csr")); > > At this point, the label is removed, but the PR body still doesn't have the checkbox checked. I think the logic for the checkbox and the label need to be unified and consistent. I think the checkbox should already be checked at that point. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151041403 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150974996 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150953651 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150960174 From erikj at openjdk.org Tue Mar 28 19:47:19 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 28 Mar 2023 19:47:19 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: References: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> <2ac6tPfi3ACXkb1H7zB0YQT8lu_4_n_UO-OW7k8fD0M=.1f2a6e21-80b5-4252-91f9-acc6a9c3c516@github.com> Message-ID: On Tue, 28 Mar 2023 17:57:12 GMT, Zhao Song wrote: >> I think the checkbox should already be checked at that point. > > Please see the latest commit. I have updated this test. Ah, checked again with latest and you are right. I may have looked at the wrong `body` variable as I was in a hurry. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151037525 From zsong at openjdk.org Tue Mar 28 19:47:19 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 19:47:19 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v2] In-Reply-To: References: Message-ID: On Tue, 28 Mar 2023 15:52:38 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with one additional commit since the last revision: >> >> fix problems > > bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java line 176: > >> 174: } >> 175: } >> 176: } > > I think you can configure intellij to always add a newline at end of file. It's good practice. Thanks, will do it! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150861633 From zsong at openjdk.org Tue Mar 28 19:47:19 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 19:47:19 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: References: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> <2ac6tPfi3ACXkb1H7zB0YQT8lu_4_n_UO-OW7k8fD0M=.1f2a6e21-80b5-4252-91f9-acc6a9c3c516@github.com> Message-ID: On Tue, 28 Mar 2023 17:39:19 GMT, Zhao Song wrote: >> bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRBotTests.java line 94: >> >>> 92: TestBotRunner.runPeriodicItems(csrIssueBot); >>> 93: // The bot should have removed the CSR label >>> 94: assertFalse(pr.store().labelNames().contains("csr")); >> >> At this point, the label is removed, but the PR body still doesn't have the checkbox checked. I think the logic for the checkbox and the label need to be unified and consistent. > > I think the checkbox should already be checked at that point. Please see the latest commit. I have updated this test. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150978289 From zsong at openjdk.org Tue Mar 28 19:47:19 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 19:47:19 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: References: <_fgeKPwmn7jomXuIEKMjW1Th1FLTaZvrjgug4XG8Q_E=.e2c38732-962a-4021-8f23-eb828fe3a57b@github.com> Message-ID: On Tue, 28 Mar 2023 15:51:50 GMT, Erik Joelsson wrote: >> At first, I had the same idea with you and later I found it a little complex to implement it. But if we let all CSRIssueBots share a map, it would be very easy. If you think it's necessary to change, I will fix it. > > I suppose it doesn't matter if they share the map, but the test does not need to verify that they do, or that a `CSRIssueBot` for a certain `IssueProject` is able to look up a `PullRequestBot` for a different IssueProject. The test should only verify that the relevant PullRequestBots are available. Yes, at least I will change the test here. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150861223 From erikj at openjdk.org Tue Mar 28 19:47:19 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 28 Mar 2023 19:47:19 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v2] In-Reply-To: References: Message-ID: On Tue, 28 Mar 2023 01:02:48 GMT, Zhao Song wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix problems bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java line 176: > 174: } > 175: } > 176: } I think you can configure intellij to always add a newline at end of file. It's good practice. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150836092 From erikj at openjdk.org Tue Mar 28 19:47:19 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 28 Mar 2023 19:47:19 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: <_fgeKPwmn7jomXuIEKMjW1Th1FLTaZvrjgug4XG8Q_E=.e2c38732-962a-4021-8f23-eb828fe3a57b@github.com> References: <_fgeKPwmn7jomXuIEKMjW1Th1FLTaZvrjgug4XG8Q_E=.e2c38732-962a-4021-8f23-eb828fe3a57b@github.com> Message-ID: On Tue, 28 Mar 2023 00:58:31 GMT, Zhao Song wrote: >> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 278: >> >>> 276: var activeReviews = CheckablePullRequest.filterActiveReviews(allReviews, pr.targetRef()); >>> 277: // Determine if the current state of the PR has already been checked >>> 278: if (forceUpdate || !currentCheckValid(census, comments, activeReviews, labels)) { >> >> Forcing an update is one way of solving this. It may turn out to trigger too many updates. If so we will need to think about how we can identify relevant changes to the issue, or at least filter out obviously irrelevant changes. We only really care about state changes. > > Yes, you're right. Currently, any change to a csr issue would trigger update to the relevant pr. I will try to get the activities of the csr issue. I think it's better to leave that for later. If we see that this becomes a problem, we could think about possible solutions. Let's try to keep the scope of this change from growing too much. >> bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java line 173: >> >>> 171: assertNotNull(csrIssueBot2.getPRBot("repo2")); >>> 172: assertNotNull(csrIssueBot2.getPRBot("repo5")); >>> 173: assertNotNull(csrIssueBot2.getPRBot("repo6")); >> >> This doesn't look right. An instance of `CSRIssueBot` should only have access to `PullRequestBot` instances for repositories that share the same IssueProject. > > At first, I had the same idea with you and later I found it a little complex to implement it. But if we let all CSRIssueBots share a map, it would be very easy. If you think it's necessary to change, I will fix it. I suppose it doesn't matter if they share the map, but the test does not need to verify that they do, or that a `CSRIssueBot` for a certain `IssueProject` is able to look up a `PullRequestBot` for a different IssueProject. The test should only verify that the relevant PullRequestBots are available. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150877603 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1150835008 From zsong at openjdk.org Tue Mar 28 22:09:43 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 22:09:43 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot In-Reply-To: References: Message-ID: On Tue, 28 Mar 2023 09:34:32 GMT, Erik Helin wrote: > Hi all, > > please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. > > ### Testing > - [x] Added one additional unit test > > Thanks, > Erik bots/mirror/src/main/java/org/openjdk/skara/bots/mirror/MirrorBotFactory.java line 95: > 93: if (onlyTags && !branchPatterns.isEmpty()) { > 94: throw new IllegalStateException("Branches cannot be mirrored when only tags are mirrored"); > 95: } Originally, if `branchPatterns.isEmpty()`, `includeTags` would always be true. But now, it is possible that when `branchPatterns.isEmpty()`, `includeTags` is false. So I think we could also throw exception when `branchPatterns.isEmpty() && !includeTags`. It is illegal. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1493#discussion_r1151197001 From erikj at openjdk.org Tue Mar 28 22:18:41 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 28 Mar 2023 22:18:41 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> References: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> Message-ID: <0RvkBYif98E64Glf_zdxVXH4F9EIoYxM25iHFOnKH44=.15d1c3c3-5b9f-4c40-8464-a23f7cd6fee4@github.com> On Tue, 28 Mar 2023 19:47:18 GMT, Zhao Song wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > Zhao Song has updated the pull request incrementally with four additional commits since the last revision: > > - fix a problem > - fix a problem > - renamed some classes > - improve PullRequestBotFactoryTest bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueWorkItem.java line 115: > 113: } > 114: > 115: @Override Should probably change the `workItemName` to something like "csrissue". bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java line 47: > 45: /** > 46: * The updatedAt timestamp of the external entity that triggered this WorkItem, > 47: * which would be either a PR or a CSR Issue. Used for tracking reaction legacy Suggestion: * which would be either a PR or a CSR Issue. Used for tracking reaction latency bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java line 48: > 46: * The updatedAt timestamp of the external entity that triggered this WorkItem, > 47: * which would be either a PR or a CSR Issue. Used for tracking reaction legacy > 48: * of the bot through logging.This is the best estimated value, which is the last Suggestion: * of the bot through logging. This is the best estimated value, which is the last bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java line 51: > 49: * updatedAt value when the bot finds the PR or CSR Issue. This value is propagated > 50: * through chains of WorkItems, as the complete chain is considered to have > 51: * been triggered by the same PR update or CSR Issue update. Suggestion: * been triggered by the same trigger. bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java line 62: > 60: this.prId = prId; > 61: this.errorHandler = errorHandler; > 62: this.triggerUpdatedAt = prUpdatedAt; I like the new naming of this field, but please also update the parameter in the constructor. bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRCommandTests.java line 453: > 451: > 452: // The bot should reply with a message that there is already an approved CSR request > 453: // Now CheckWorkItem is responsible for updating CSR label, so before '/csr' is handled, csr label is added to this pr We should avoid comments that reference a change in the code. After this PR is integrated, it's no longer relevant that this functionality moved to CheckWorkItem. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151195832 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151200320 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151200407 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151200806 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151199883 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151202553 From zsong at openjdk.org Tue Mar 28 22:23:37 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 22:23:37 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v4] In-Reply-To: References: Message-ID: > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. Zhao Song has updated the pull request incrementally with three additional commits since the last revision: - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/skara/pull/1492/files - new: https://git.openjdk.org/skara/pull/1492/files/f06cf10e..c5990274 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=03 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=02-03 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/skara/pull/1492.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/skara/pull/1492 From zsong at openjdk.org Tue Mar 28 22:23:38 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 22:23:38 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: <0RvkBYif98E64Glf_zdxVXH4F9EIoYxM25iHFOnKH44=.15d1c3c3-5b9f-4c40-8464-a23f7cd6fee4@github.com> References: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> <0RvkBYif98E64Glf_zdxVXH4F9EIoYxM25iHFOnKH44=.15d1c3c3-5b9f-4c40-8464-a23f7cd6fee4@github.com> Message-ID: On Tue, 28 Mar 2023 22:06:26 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with four additional commits since the last revision: >> >> - fix a problem >> - fix a problem >> - renamed some classes >> - improve PullRequestBotFactoryTest > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueWorkItem.java line 115: > >> 113: } >> 114: >> 115: @Override > > Should probably change the `workItemName` to something like "csrissue". Will change it > bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestWorkItem.java line 62: > >> 60: this.prId = prId; >> 61: this.errorHandler = errorHandler; >> 62: this.triggerUpdatedAt = prUpdatedAt; > > I like the new naming of this field, but please also update the parameter in the constructor. Sure ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151205901 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151205765 From zsong at openjdk.org Tue Mar 28 22:27:01 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 22:27:01 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v3] In-Reply-To: <0RvkBYif98E64Glf_zdxVXH4F9EIoYxM25iHFOnKH44=.15d1c3c3-5b9f-4c40-8464-a23f7cd6fee4@github.com> References: <_gJrBEFnx2oRNfxp6n4aM2AiHcRKqW64NOyR3i2bcTI=.b8c1ce97-cac1-4f50-bd2f-f0504dc86b9b@github.com> <0RvkBYif98E64Glf_zdxVXH4F9EIoYxM25iHFOnKH44=.15d1c3c3-5b9f-4c40-8464-a23f7cd6fee4@github.com> Message-ID: On Tue, 28 Mar 2023 22:15:03 GMT, Erik Joelsson wrote: >> Zhao Song has updated the pull request incrementally with four additional commits since the last revision: >> >> - fix a problem >> - fix a problem >> - renamed some classes >> - improve PullRequestBotFactoryTest > > bots/pr/src/test/java/org/openjdk/skara/bots/pr/CSRCommandTests.java line 453: > >> 451: >> 452: // The bot should reply with a message that there is already an approved CSR request >> 453: // Now CheckWorkItem is responsible for updating CSR label, so before '/csr' is handled, csr label is added to this pr > > We should avoid comments that reference a change in the code. After this PR is integrated, it's no longer relevant that this functionality moved to CheckWorkItem. Got it. Will change it ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1151209779 From zsong at openjdk.org Tue Mar 28 22:30:56 2023 From: zsong at openjdk.org (Zhao Song) Date: Tue, 28 Mar 2023 22:30:56 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v5] In-Reply-To: References: Message-ID: > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: improve some comments ------------- Changes: - all: https://git.openjdk.org/skara/pull/1492/files - new: https://git.openjdk.org/skara/pull/1492/files/c5990274..edfd7b09 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=04 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=03-04 Stats: 5 lines in 3 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/skara/pull/1492.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/skara/pull/1492 From ehelin at openjdk.org Wed Mar 29 11:42:13 2023 From: ehelin at openjdk.org (Erik Helin) Date: Wed, 29 Mar 2023 11:42:13 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v2] In-Reply-To: References: Message-ID: > Hi all, > > please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. > > ### Testing > - [x] Added one additional unit test > > Thanks, > Erik Erik Helin has updated the pull request incrementally with one additional commit since the last revision: Reviewer feeback ------------- Changes: - all: https://git.openjdk.org/skara/pull/1493/files - new: https://git.openjdk.org/skara/pull/1493/files/9a85b09f..e84bc944 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1493&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1493&range=00-01 Stats: 210 lines in 3 files changed: 201 ins; 0 del; 9 mod Patch: https://git.openjdk.org/skara/pull/1493.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1493/head:pull/1493 PR: https://git.openjdk.org/skara/pull/1493 From ehelin at openjdk.org Wed Mar 29 11:43:56 2023 From: ehelin at openjdk.org (Erik Helin) Date: Wed, 29 Mar 2023 11:43:56 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v2] In-Reply-To: References: Message-ID: On Tue, 28 Mar 2023 22:07:39 GMT, Zhao Song wrote: >> Erik Helin has updated the pull request incrementally with one additional commit since the last revision: >> >> Reviewer feeback > > bots/mirror/src/main/java/org/openjdk/skara/bots/mirror/MirrorBotFactory.java line 95: > >> 93: if (onlyTags && !branchPatterns.isEmpty()) { >> 94: throw new IllegalStateException("Branches cannot be mirrored when only tags are mirrored"); >> 95: } > > Originally, if `branchPatterns.isEmpty()`, `includeTags` would always be true. But now, it is possible that when `branchPatterns.isEmpty()`, `includeTags` is false. > So I think we could also throw exception when `branchPatterns.isEmpty() && !includeTags`. It is illegal. Thanks @zhaosongzs , I reworked this a bit in the latest version and fixed this as well ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1493#discussion_r1151806810 From ehelin at openjdk.org Wed Mar 29 11:46:17 2023 From: ehelin at openjdk.org (Erik Helin) Date: Wed, 29 Mar 2023 11:46:17 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v2] In-Reply-To: <-vhnEZUo1PDo4uU2dl5oe38Ph9SuC5OFx3gysGQNEdc=.2f101742-f354-45e5-b931-2d7688a0951a@github.com> References: <-vhnEZUo1PDo4uU2dl5oe38Ph9SuC5OFx3gysGQNEdc=.2f101742-f354-45e5-b931-2d7688a0951a@github.com> Message-ID: On Tue, 28 Mar 2023 13:13:50 GMT, Erik Joelsson wrote: >> Erik Helin has updated the pull request incrementally with one additional commit since the last revision: >> >> Reviewer feeback > > Could you expand the `MirrorBotFactory` test to verify the new configuration options? It's also worth pointing out that existing configurations will need to be updated when this change goes live. @erikj79 thans, I added a bunch of tests in `MirrorBotFactoryTest.java`. As I wrote the tests I realized it was more natural to use a string value for the `"tags"` field, see the tests in the latest version for examples. @zhaosongzs I think the latest version also resolves your comment, please have a look. ------------- PR Comment: https://git.openjdk.org/skara/pull/1493#issuecomment-1488449252 From zsong at openjdk.org Wed Mar 29 16:07:39 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 29 Mar 2023 16:07:39 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v2] In-Reply-To: References: Message-ID: <8NNquSRRcQ2CFXQp-TyDECLJSUtIseGdkFvCEmaO_3Q=.d50ccd27-1f07-40c8-ada3-e88e4f271512@github.com> On Wed, 29 Mar 2023 11:42:13 GMT, Erik Helin wrote: >> Hi all, >> >> please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. >> >> ### Testing >> - [x] Added one additional unit test >> >> Thanks, >> Erik > > Erik Helin has updated the pull request incrementally with one additional commit since the last revision: > > Reviewer feeback bots/mirror/src/test/java/org/openjdk/skara/bots/mirror/MirrorBotFactoryTest.java line 234: > 232: "to": "to4", > 233: "tags": "exclude" > 234: }, I am wondering what's the expected behavior for the mirror bot configured like this? Intuitively speaking, I think the bot should mirror every branch but excluding tags. But currently, the bot would not mirror anything. if i am wrong please correct me. Thank you! ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1493#discussion_r1152173992 From zsong at openjdk.org Wed Mar 29 22:03:40 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 29 Mar 2023 22:03:40 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description Message-ID: Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. In this patch, the pr bot would add the link to webrev comment to the pr body. Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. ------------- Commit messages: - fix import - SKARA-1856 Changes: https://git.openjdk.org/skara/pull/1494/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1856 Stats: 73 lines in 6 files changed: 70 ins; 1 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1494.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1494/head:pull/1494 PR: https://git.openjdk.org/skara/pull/1494 From zsong at openjdk.org Wed Mar 29 22:03:40 2023 From: zsong at openjdk.org (Zhao Song) Date: Wed, 29 Mar 2023 22:03:40 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description In-Reply-To: References: Message-ID: On Wed, 29 Mar 2023 21:58:06 GMT, Zhao Song wrote: > Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. > > In this patch, the pr bot would add the link to webrev comment to the pr body. > > Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 100: > 98: .collect(Collectors.joining()); > 99: commentString = commentString + comments.stream() > 100: .filter(comment -> comment.author().username().equals("mlbridge[bot]")) We also could compare `comment.author().id()` here, but I am not sure if it is a good idea to explicitly expose the id of mlbridge bot. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1152525545 From erikj at openjdk.org Thu Mar 30 18:23:25 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 Mar 2023 18:23:25 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v5] In-Reply-To: References: Message-ID: On Tue, 28 Mar 2023 22:30:56 GMT, Zhao Song wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > improve some comments Almost done now. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueBot.java line 85: > 83: @Override > 84: public String name() { > 85: return PullRequestBotFactory.NAME; The name of this `Bot` needs to be unique to avoid creating confusion with log messages. Perhaps add `-csr` as a suffix. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CSRIssueWorkItem.java line 112: > 110: @Override > 111: public String botName() { > 112: return "CSRIssueBot"; If you fix the `name()` of `CSRIssueBot`, you can reference that here instead. ------------- PR Review: https://git.openjdk.org/skara/pull/1492#pullrequestreview-1365673849 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1153622239 PR Review Comment: https://git.openjdk.org/skara/pull/1492#discussion_r1153627012 From erikj at openjdk.org Thu Mar 30 18:47:23 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 Mar 2023 18:47:23 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v2] In-Reply-To: <8NNquSRRcQ2CFXQp-TyDECLJSUtIseGdkFvCEmaO_3Q=.d50ccd27-1f07-40c8-ada3-e88e4f271512@github.com> References: <8NNquSRRcQ2CFXQp-TyDECLJSUtIseGdkFvCEmaO_3Q=.d50ccd27-1f07-40c8-ada3-e88e4f271512@github.com> Message-ID: On Wed, 29 Mar 2023 16:04:19 GMT, Zhao Song wrote: >> Erik Helin has updated the pull request incrementally with one additional commit since the last revision: >> >> Reviewer feeback > > bots/mirror/src/test/java/org/openjdk/skara/bots/mirror/MirrorBotFactoryTest.java line 234: > >> 232: "to": "to4", >> 233: "tags": "exclude" >> 234: }, > > I am wondering what's the expected behavior for the mirror bot configured like this? Intuitively speaking, I think the bot should mirror every branch but excluding tags. But currently, the bot would not mirror anything. if i am wrong please correct me. Thank you! I believe you are correct, this config will mirror nothing, but I agree that the expectation would be to mirror all branches but no tags. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1493#discussion_r1153637628 From erikj at openjdk.org Thu Mar 30 18:48:39 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 Mar 2023 18:48:39 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description In-Reply-To: References: Message-ID: On Wed, 29 Mar 2023 22:00:31 GMT, Zhao Song wrote: >> Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. >> >> In this patch, the pr bot would add the link to webrev comment to the pr body. >> >> Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 100: > >> 98: .collect(Collectors.joining()); >> 99: commentString = commentString + comments.stream() >> 100: .filter(comment -> comment.author().username().equals("mlbridge[bot]")) > > We also could compare `comment.author().id()` here, but I am not sure if it is a good idea to explicitly expose the id of mlbridge bot. The `commentString` looks like it's only containing comments from the currentUser (which is the bot user for the pr bot). I think we need to filter all comments again for the mlbridge user to find this comment. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153654764 From zsong at openjdk.org Thu Mar 30 18:49:34 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 18:49:34 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v6] In-Reply-To: References: Message-ID: <_CKSRtVkeZKaAoiaYZoUtqMyiUTo41uz1D90Wvkv6wE=.087d4df4-8e9a-4c35-96ff-3ddfd836bfeb@github.com> > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix CSRIssueBot name ------------- Changes: - all: https://git.openjdk.org/skara/pull/1492/files - new: https://git.openjdk.org/skara/pull/1492/files/edfd7b09..aab63fe9 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=05 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1492&range=04-05 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/skara/pull/1492.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1492/head:pull/1492 PR: https://git.openjdk.org/skara/pull/1492 From erikj at openjdk.org Thu Mar 30 18:48:38 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 Mar 2023 18:48:38 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description In-Reply-To: References: Message-ID: <56nqO5jcgU9kizwJxh-LiWqnnOX0Vt1-PAWpwwpTx0A=.3813d499-48c2-4ce2-a1cf-1df52fc43258@github.com> On Wed, 29 Mar 2023 21:58:06 GMT, Zhao Song wrote: > Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. > > In this patch, the pr bot would add the link to webrev comment to the pr body. > > Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. Overall a nice solution to this issue. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 735: > 733: private String getWebrevCommentLink() { > 734: var webrevComment = comments.stream() > 735: .filter(comment -> comment.author().username().equals("mlbridge[bot]")) We can't hard code the bot name here, it needs to be a configuration parameter for pr bot. See configuration of mlbridge for an example of how we configure user names to filter comments. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 739: > 737: .findFirst(); > 738: return webrevComment.map(comment -> "[Link to Webrev Comment](" + pr.commentUrl(comment).toString() + ")") > 739: .orElse("Webrev comment has not been available now."); I think this method could return an Optional and that we should only print the whole section if a webrev comment has been posted. bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 103: > 101: .flatMap(comment -> comment.body().lines()) > 102: .filter(line -> line.equals(WEBREV_COMMENT_MARKER)) > 103: .collect(Collectors.joining()); Since we only want to react when this comment is added the first time, we could do `findFirst` here. That way we terminate the stream once we find the relevant comment. ------------- PR Review: https://git.openjdk.org/skara/pull/1494#pullrequestreview-1365727700 PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153650416 PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153651687 PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153656732 From zsong at openjdk.org Thu Mar 30 19:15:35 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 19:15:35 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description In-Reply-To: References: Message-ID: On Thu, 30 Mar 2023 18:43:40 GMT, Erik Joelsson wrote: >> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 100: >> >>> 98: .collect(Collectors.joining()); >>> 99: commentString = commentString + comments.stream() >>> 100: .filter(comment -> comment.author().username().equals("mlbridge[bot]")) >> >> We also could compare `comment.author().id()` here, but I am not sure if it is a good idea to explicitly expose the id of mlbridge bot. > > The `commentString` looks like it's only containing comments from the currentUser (which is the bot user for the pr bot). I think we need to filter all comments again for the mlbridge user to find this comment. Yes, commentString only containing comments from the currentUser. So I actually filter all comments again in line 99. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153675572 From zsong at openjdk.org Thu Mar 30 19:15:35 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 19:15:35 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description In-Reply-To: <56nqO5jcgU9kizwJxh-LiWqnnOX0Vt1-PAWpwwpTx0A=.3813d499-48c2-4ce2-a1cf-1df52fc43258@github.com> References: <56nqO5jcgU9kizwJxh-LiWqnnOX0Vt1-PAWpwwpTx0A=.3813d499-48c2-4ce2-a1cf-1df52fc43258@github.com> Message-ID: <9YYC-_g_u7E6MMjiXjWdupaxvJkMwhcH_tjRNdTnstw=.4de8108e-4e4c-46ef-b446-173aaaebf5f7@github.com> On Thu, 30 Mar 2023 18:40:15 GMT, Erik Joelsson wrote: >> Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. >> >> In this patch, the pr bot would add the link to webrev comment to the pr body. >> >> Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. > > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 735: > >> 733: private String getWebrevCommentLink() { >> 734: var webrevComment = comments.stream() >> 735: .filter(comment -> comment.author().username().equals("mlbridge[bot]")) > > We can't hard code the bot name here, it needs to be a configuration parameter for pr bot. See configuration of mlbridge for an example of how we configure user names to filter comments. Will fix it. > bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 739: > >> 737: .findFirst(); >> 738: return webrevComment.map(comment -> "[Link to Webrev Comment](" + pr.commentUrl(comment).toString() + ")") >> 739: .orElse("Webrev comment has not been available now."); > > I think this method could return an Optional and that we should only print the whole section if a webrev comment has been posted. Sure, will fix it. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153675999 PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153676346 From zsong at openjdk.org Thu Mar 30 21:09:48 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 21:09:48 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description [v2] In-Reply-To: References: Message-ID: > Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. > > In this patch, the pr bot would add the link to webrev comment to the pr body. > > Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix some problems ------------- Changes: - all: https://git.openjdk.org/skara/pull/1494/files - new: https://git.openjdk.org/skara/pull/1494/files/16564842..c4456312 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=01 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=00-01 Stats: 41 lines in 7 files changed: 27 ins; 1 del; 13 mod Patch: https://git.openjdk.org/skara/pull/1494.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1494/head:pull/1494 PR: https://git.openjdk.org/skara/pull/1494 From zsong at openjdk.org Thu Mar 30 21:17:45 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 21:17:45 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description [v3] In-Reply-To: References: Message-ID: <4oy061Wd4n4zZkqOo7xZTmMUSmCqX6_c-WTktp1g6H4=.a961dd17-2361-495e-9c15-47b2dcfb7e4a@github.com> > Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. > > In this patch, the pr bot would add the link to webrev comment to the pr body. > > Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1494/files - new: https://git.openjdk.org/skara/pull/1494/files/c4456312..0746297f Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1494.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1494/head:pull/1494 PR: https://git.openjdk.org/skara/pull/1494 From erikj at openjdk.org Thu Mar 30 21:24:57 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 Mar 2023 21:24:57 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description [v3] In-Reply-To: References: Message-ID: On Thu, 30 Mar 2023 18:59:32 GMT, Zhao Song wrote: >> The `commentString` looks like it's only containing comments from the currentUser (which is the bot user for the pr bot). I think we need to filter all comments again for the mlbridge user to find this comment. > > Yes, commentString only containing comments from the currentUser. So I actually filter all comments again in line 99. Oh right, I misread that. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153800555 From zsong at openjdk.org Thu Mar 30 21:25:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 21:25:18 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v6] In-Reply-To: <6rd5ErJlAcjV9-im7OB1wgwVSRYhZIMbqXOyT9us3wg=.a7b74862-5734-4eb5-b245-f37c0ce89831@github.com> References: <_CKSRtVkeZKaAoiaYZoUtqMyiUTo41uz1D90Wvkv6wE=.087d4df4-8e9a-4c35-96ff-3ddfd836bfeb@github.com> <6rd5ErJlAcjV9-im7OB1wgwVSRYhZIMbqXOyT9us3wg=.a7b74862-5734-4eb5-b245-f37c0ce89831@github.com> Message-ID: On Thu, 30 Mar 2023 21:20:24 GMT, Erik Joelsson wrote: > I think this looks good now. Please verify some scenarios with playground in staging before going live. Sure, thanks for the review! ------------- PR Comment: https://git.openjdk.org/skara/pull/1492#issuecomment-1490979521 From zsong at openjdk.org Thu Mar 30 21:25:18 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 21:25:18 GMT Subject: Integrated: 1851: Fold CSR bot into PR bot In-Reply-To: References: Message-ID: On Mon, 27 Mar 2023 21:48:23 GMT, Zhao Song wrote: > In this patch, the whole csr bot module is removed. > > Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. > > Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. This pull request has now been integrated. Changeset: 744eb169 Author: Zhao Song URL: https://git.openjdk.org/skara/commit/744eb169620212f4126348fd3aac08d6ec7fabe0 Stats: 2611 lines in 23 files changed: 1010 ins; 1535 del; 66 mod 1851: Fold CSR bot into PR bot Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1492 From erikj at openjdk.org Thu Mar 30 21:25:18 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 Mar 2023 21:25:18 GMT Subject: RFR: 1851: Fold CSR bot into PR bot [v6] In-Reply-To: <_CKSRtVkeZKaAoiaYZoUtqMyiUTo41uz1D90Wvkv6wE=.087d4df4-8e9a-4c35-96ff-3ddfd836bfeb@github.com> References: <_CKSRtVkeZKaAoiaYZoUtqMyiUTo41uz1D90Wvkv6wE=.087d4df4-8e9a-4c35-96ff-3ddfd836bfeb@github.com> Message-ID: <6rd5ErJlAcjV9-im7OB1wgwVSRYhZIMbqXOyT9us3wg=.a7b74862-5734-4eb5-b245-f37c0ce89831@github.com> On Thu, 30 Mar 2023 18:49:34 GMT, Zhao Song wrote: >> In this patch, the whole csr bot module is removed. >> >> Original CSRPullRequestBot is deleted. The functionality of this bot has been moved to `CheckRun`. >> >> Original CSRIssueBot has been moved to pr bot module. PullRequestBotFactory would generate a CSRIssueBot for every configured Issue project. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix CSRIssueBot name I think this looks good now. Please verify some scenarios with playground in staging before going live. ------------- Marked as reviewed by erikj (Lead). PR Review: https://git.openjdk.org/skara/pull/1492#pullrequestreview-1365946643 From erikj at openjdk.org Thu Mar 30 21:28:33 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 30 Mar 2023 21:28:33 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description [v3] In-Reply-To: <4oy061Wd4n4zZkqOo7xZTmMUSmCqX6_c-WTktp1g6H4=.a961dd17-2361-495e-9c15-47b2dcfb7e4a@github.com> References: <4oy061Wd4n4zZkqOo7xZTmMUSmCqX6_c-WTktp1g6H4=.a961dd17-2361-495e-9c15-47b2dcfb7e4a@github.com> Message-ID: <8oAZgCBG3kzD6mLxX3COikTJlBK-nXKpmqtp1bZPpXY=.f9731283-22b7-49c3-a21b-00b05d896e58@github.com> On Thu, 30 Mar 2023 21:17:45 GMT, Zhao Song wrote: >> Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. >> >> In this patch, the pr bot would add the link to webrev comment to the pr body. >> >> Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. > > Zhao Song has updated the pull request incrementally with one additional commit since the last revision: > > fix a problem Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1494#pullrequestreview-1365954051 From zsong at openjdk.org Thu Mar 30 21:34:35 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 21:34:35 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description [v4] In-Reply-To: References: Message-ID: <8fsAkgAnmPvbj4F337AVsnwTj5_4-0j0EOCWMPzON1Y=.d4d47fb2-a895-4549-836a-59e5b5aa5365@github.com> > Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. > > In this patch, the pr bot would add the link to webrev comment to the pr body. > > Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge branch 'master' into SKARA-1856 # Conflicts: # bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java - fix a problem - fix some problems - fix import - SKARA-1856 ------------- Changes: https://git.openjdk.org/skara/pull/1494/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=03 Stats: 102 lines in 10 files changed: 95 ins; 1 del; 6 mod Patch: https://git.openjdk.org/skara/pull/1494.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1494/head:pull/1494 PR: https://git.openjdk.org/skara/pull/1494 From zsong at openjdk.org Thu Mar 30 22:16:15 2023 From: zsong at openjdk.org (Zhao Song) Date: Thu, 30 Mar 2023 22:16:15 GMT Subject: RFR: 1856: Include a link to the webrev comment in the pull request's description [v5] In-Reply-To: References: Message-ID: > Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. > > In this patch, the pr bot would add the link to webrev comment to the pr body. > > Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. Zhao Song has updated the pull request incrementally with one additional commit since the last revision: fix a problem ------------- Changes: - all: https://git.openjdk.org/skara/pull/1494/files - new: https://git.openjdk.org/skara/pull/1494/files/8ef9f6ca..ed203969 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=04 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1494&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/skara/pull/1494.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1494/head:pull/1494 PR: https://git.openjdk.org/skara/pull/1494 From ehelin at openjdk.org Fri Mar 31 12:58:10 2023 From: ehelin at openjdk.org (Erik Helin) Date: Fri, 31 Mar 2023 12:58:10 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v3] In-Reply-To: References: Message-ID: > Hi all, > > please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. > > ### Testing > - [x] Added one additional unit test > > Thanks, > Erik Erik Helin has updated the pull request incrementally with one additional commit since the last revision: Remove "exclude" for "tags" ------------- Changes: - all: https://git.openjdk.org/skara/pull/1493/files - new: https://git.openjdk.org/skara/pull/1493/files/e84bc944..4ba3c642 Webrevs: - full: https://webrevs.openjdk.org/?repo=skara&pr=1493&range=02 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1493&range=01-02 Stats: 68 lines in 3 files changed: 24 ins; 29 del; 15 mod Patch: https://git.openjdk.org/skara/pull/1493.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1493/head:pull/1493 PR: https://git.openjdk.org/skara/pull/1493 From ehelin at openjdk.org Fri Mar 31 13:03:14 2023 From: ehelin at openjdk.org (Erik Helin) Date: Fri, 31 Mar 2023 13:03:14 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v3] In-Reply-To: References: Message-ID: <2Oxl9seg3Xc8ahoFy1vKgLI0XtsOQMW_cg4l6wMNptI=.ce922251-c3e2-449d-8cf5-16a23fa48bc1@github.com> On Fri, 31 Mar 2023 12:58:10 GMT, Erik Helin wrote: >> Hi all, >> >> please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. >> >> ### Testing >> - [x] Added one additional unit test >> >> Thanks, >> Erik > > Erik Helin has updated the pull request incrementally with one additional commit since the last revision: > > Remove "exclude" for "tags" @zhaosongzs @erikj79 I decided to remove `"exclude"` (see inline comment for details). The latest version should now be fully backwards compatible and only features `"include"` and `"only"` for tags. ------------- PR Comment: https://git.openjdk.org/skara/pull/1493#issuecomment-1491891380 From ehelin at openjdk.org Fri Mar 31 13:03:15 2023 From: ehelin at openjdk.org (Erik Helin) Date: Fri, 31 Mar 2023 13:03:15 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v2] In-Reply-To: References: <8NNquSRRcQ2CFXQp-TyDECLJSUtIseGdkFvCEmaO_3Q=.d50ccd27-1f07-40c8-ada3-e88e4f271512@github.com> Message-ID: <5setD131KY8gXh8dBloXCts1xDRZfWFuW0kujVgVP2Q=.e497908d-b3f1-4dc0-8d96-a18927dcd223@github.com> On Thu, 30 Mar 2023 18:29:20 GMT, Erik Joelsson wrote: >> bots/mirror/src/test/java/org/openjdk/skara/bots/mirror/MirrorBotFactoryTest.java line 234: >> >>> 232: "to": "to4", >>> 233: "tags": "exclude" >>> 234: }, >> >> I am wondering what's the expected behavior for the mirror bot configured like this? Intuitively speaking, I think the bot should mirror every branch but excluding tags. But currently, the bot would not mirror anything. if i am wrong please correct me. Thank you! > > I believe you are correct, this config will mirror nothing, but I agree that the expectation would be to mirror all branches but no tags. Yep, realized this after I pushed. I decided to remove `"exclude"` in the latest commit since implementing it is quite cumbersome (the `git` CLI client doesn't have a `--no-tags` option for `git push`). ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1493#discussion_r1154445921 From erikj at openjdk.org Fri Mar 31 13:50:46 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 31 Mar 2023 13:50:46 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v3] In-Reply-To: References: Message-ID: On Fri, 31 Mar 2023 12:58:10 GMT, Erik Helin wrote: >> Hi all, >> >> please review this patch that adds an option to the `MirrorBot` to mirror only tags from one repository to another. I also added some additional logging to `MirrorBot` and cleaned up the logic a bit for selecting the "mode" (tags, mirror, selected branches) that the `MirrorBot` uses. >> >> ### Testing >> - [x] Added one additional unit test >> >> Thanks, >> Erik > > Erik Helin has updated the pull request incrementally with one additional commit since the last revision: > > Remove "exclude" for "tags" Marked as reviewed by erikj (Lead). ------------- PR Review: https://git.openjdk.org/skara/pull/1493#pullrequestreview-1366979217 From zsong at openjdk.org Fri Mar 31 15:34:50 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 31 Mar 2023 15:34:50 GMT Subject: RFR: 1859: Add "tags only" option to MirrorBot [v3] In-Reply-To: <2Oxl9seg3Xc8ahoFy1vKgLI0XtsOQMW_cg4l6wMNptI=.ce922251-c3e2-449d-8cf5-16a23fa48bc1@github.com> References: <2Oxl9seg3Xc8ahoFy1vKgLI0XtsOQMW_cg4l6wMNptI=.ce922251-c3e2-449d-8cf5-16a23fa48bc1@github.com> Message-ID: On Fri, 31 Mar 2023 13:00:55 GMT, Erik Helin wrote: > @zhaosongzs @erikj79 I decided to remove `"exclude"` (see inline comment for details). The latest version should now be fully backwards compatible and only features `"include"` and `"only"` for tags. LGTM! Thank you! ------------- PR Comment: https://git.openjdk.org/skara/pull/1493#issuecomment-1492141002 From zsong at openjdk.org Fri Mar 31 17:07:36 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 31 Mar 2023 17:07:36 GMT Subject: Integrated: 1856: Include a link to the webrev comment in the pull request's description In-Reply-To: References: Message-ID: On Wed, 29 Mar 2023 21:58:06 GMT, Zhao Song wrote: > Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. > > In this patch, the pr bot would add the link to webrev comment to the pr body. > > Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr. This pull request has now been integrated. Changeset: 6e64045d Author: Zhao Song URL: https://git.openjdk.org/skara/commit/6e64045d301d125401d309c3e3d959415ac66d18 Stats: 103 lines in 10 files changed: 96 ins; 1 del; 6 mod 1856: Include a link to the webrev comment in the pull request's description Reviewed-by: erikj ------------- PR: https://git.openjdk.org/skara/pull/1494 From zsong at openjdk.org Fri Mar 31 19:03:07 2023 From: zsong at openjdk.org (Zhao Song) Date: Fri, 31 Mar 2023 19:03:07 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs Message-ID: In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. By default, review is not necessary for merge pull requests. However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: { "pr": { "repositories": { "repo1": { "reviewMergePullRequest": true } } } } Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. The basic idea for us to ignore reviewersCheck for CleanBackport and Merge PullRequest is ignoring the error message. ------------- Commit messages: - Merge branch 'master' into SKARA-1858 - SKARA-1858 Changes: https://git.openjdk.org/skara/pull/1495/files Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1495&range=00 Issue: https://bugs.openjdk.org/browse/SKARA-1858 Stats: 155 lines in 11 files changed: 136 ins; 5 del; 14 mod Patch: https://git.openjdk.org/skara/pull/1495.diff Fetch: git fetch https://git.openjdk.org/skara.git pull/1495/head:pull/1495 PR: https://git.openjdk.org/skara/pull/1495 From erikj at openjdk.org Fri Mar 31 22:09:47 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 31 Mar 2023 22:09:47 GMT Subject: RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs In-Reply-To: References: Message-ID: On Thu, 30 Mar 2023 18:51:31 GMT, Zhao Song wrote: > In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests. > > By default, review is not necessary for merge pull requests. > > However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows: > > { > "pr": { > "repositories": { > "repo1": { > "reviewMergePullRequest": true > } > } > } > } > > > Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. The basic idea for us to ignore reviewersCheck for CleanBackport and Merge PullRequest is ignoring the error message. bots/pr/src/test/java/org/openjdk/skara/bots/pr/PullRequestBotFactoryTest.java line 116: > 114: ], > 115: "reviewCleanBackport": true, > 116: "reviewMergePullRequest": true, I think `reviewMerge` is enough for the configuration option. The word "PullRequest" seems redundant in the context of pr bot. jcheck/src/main/java/org/openjdk/skara/jcheck/ReviewersCheck.java line 70: > 68: @Override > 69: Iterator check(Commit commit, CommitMessage message, JCheckConfiguration conf, Census census) { > 70: if (utils.addsHgTag(commit)) { We can't just remove this default behavior in jcheck itself. Then the cli version of jcheck would always require reviewers for a merge commit. We are going to need a new setting in `.jcheck/conf` for this and the PR bot would override it when creating the jcheck instance. ------------- PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1154942745 PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1154944247