RFR: SKARA-1096: New command and label for JEPs, similar to CSR [v5]
Erik Joelsson
erikj at openjdk.java.net
Wed Apr 13 21:39:54 UTC 2022
On Wed, 13 Apr 2022 16:28:22 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> bots/jep/src/main/java/org/openjdk/skara/bots/jep/JEPBot.java line 71:
>>
>>> 69: if (jepComment == null) {
>>> 70: if (pr.labelNames().contains(JEP_LABEL)) {
>>> 71: pr.removeLabel(JEP_LABEL);
>>
>> There is a potential race here. The /jep command adds the label first and the comment after. Not sure how to solve that. Ideally the label should be added after the comment.
>
> Another case: If there is a exiting jep command comment before. We may get the wrong comment and get the wrong issue in the following code.
> The error state will be fixed in the next JEPBot cycle, but it is not accepted because it seems that the error occurs frequently.
>
> Currently, the JEPBot implements the interface `Bot` and `WorkItem`. I would like to seperate the Bot (also named JEPBot) and the WorkItem (may named JEPStateCheckWorkItem). This new WorkItem maps to the pre PR, which is similar to the PullRequestWorkItem. And we need to override the method `WorkItem#concurrentWith` carefully to let the new WorkItem not concurrent with the PullRequestWorkItem if they operate the same PR. This is a common way to solve concurrency issues in the current SKARA "framework".
Unfortunately that won't work. The concurrentWith construct only works for WorkItems within the same bot module. An important property of the different bot modules is that they can be run independently in different Java processes. We are for instance currently not running the PullRequestBot and the CSRBot in the same JVM instance.
-------------
PR: https://git.openjdk.java.net/skara/pull/1297
More information about the skara-dev
mailing list