RFR: 1658: Minimize race window when updating PR body [v2]

Zhao Song zsong at openjdk.org
Tue Nov 29 23:47:58 UTC 2022

On Tue, 15 Nov 2022 19:40:10 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>>   Added an automatic test for latestBody
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 747:
>> 745:         } else {
>> 746:             log.info("PR body has been modified, won't update PR body this time");
>> 747:             return description;
> If we detect concurrent modification, we have to fail the WorkItem so that it gets scheduled for a retry. To make that happen, throw RuntimeException.

I thought the body will be updated in next round, so I didn't throw exception here.  Why is retry here better than updating body in next round?


PR: https://git.openjdk.org/skara/pull/1416

More information about the skara-dev mailing list