RFR: SKARA-1096: New command and label for JEPs, similar to CSR [v5]

Guoxiong Li gli at openjdk.java.net
Wed Apr 13 16:31:14 UTC 2022

On Tue, 12 Apr 2022 22:48:48 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>>   Disable the test in JiraProjectTests.
> 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".


PR: https://git.openjdk.java.net/skara/pull/1297

More information about the skara-dev mailing list