RFR: 1658: Minimize race window when updating PR body [v2]
Zhao Song
zsong at openjdk.org
Wed Nov 9 00:33:48 UTC 2022
On Wed, 9 Nov 2022 00:30:51 GMT, Zhao Song <zsong at openjdk.org> wrote:
>> Currently, when the pr bot tries to update the PR body, users are also likely to update the PR body at the same time. Therefore, users' updates are likely to be overwritten by bot.
>>
>> This is a race between the bot and user and the race window is a little big right now.
>>
>> To reduce the race window, in this patch, when PR bot is trying to update PR body, it will check whether the PR body has been modified by user. And if the PR bot has been modified, PR bot would not overwrite it.
>
> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>
> Added an automatic test for latestBody
test/src/main/java/org/openjdk/skara/test/TestIssue.java line 94:
> 92: @Override
> 93: public String body() {
> 94: return body;
Make `TestIssue#body()` consistent with `GitHubPullRequest#body()` and `GitLabMergeRequest#body()`.
It was returning the latest body from the 'remote' instead of the cache. So it is different from `GitHubPullRequest` and `GitLabMergeRequest`
-------------
PR: https://git.openjdk.org/skara/pull/1416
More information about the skara-dev
mailing list