RFR: 2015: Initial run of PR IssueBot misses issue updates
Zhao Song
zsong at openjdk.org
Tue Sep 12 17:43:07 UTC 2023
On Tue, 12 Sep 2023 17:06:11 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Currently, if pullRequestBot is down for more than 10 minutes and during that time, if users make changes to some issues, than the update activities would not trigger CheckWorkItem after the bot restarts.
>>
>> To solve this problem, In this patch, after the bot restarts, in the initial run, pullRequestBot would make CheckWorkItem compare both prMetaData and issueMetaData.
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 73:
>
>> 71:
>> 72: CheckWorkItem(PullRequestBot bot, String prId, Consumer<RuntimeException> errorHandler, ZonedDateTime triggerUpdatedAt,
>> 73: boolean needsReadyCheck, boolean forceUpdate, boolean spawnedFromIssueBot, boolean initialRun) {
>
> Having 4 booleans in the constructor is becoming really hard to read and understand. Perhaps we should introduce factory methods instead so we only allow for valid combinations of the booleans. Something like:
>
> fromIssue
> fromPr
> initialRun
> forceUpdate
I was thinking that if we fix SKARA-2016 in the future, then `forceUpdate` would be removed. So three booleans is reasonable.
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1554#discussion_r1323368188
More information about the skara-dev
mailing list