RFR: 1595: Introduce an IssuePoller similar to the PullRequestPoller [v4]
Magnus Ihse Bursie
ihse at openjdk.org
Tue Sep 20 15:06:36 UTC 2022
On Fri, 16 Sep 2022 21:21:08 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Inspired by the `PullRequestPoller`, I have now also created an `IssuePoller`. The requirements are a bit different on this poller, which makes it a bit easier to implement.
>>
>> Like the `PullRequestPoller`, it needs to handle retries, something I had overlooked in the original `CSRIssueBot`. Compared to that implementation, I'm also moving away from using `IssueProject::lastUpdatedIssue` for the initial query. The problem with relying on such a query for the very first round is if it, or something else in that round, fails. At least for the `CSRIssueBot`, once we are in the second round, after a failed first round, it's no longer safe to only query for the very last updated Issue, there could be multiple updates that we would miss. Instead there is a configurable `Duration` that defines how far back we go from the time the bot was created for the first query. Depending on what the bot needs, this Duration can be expected to cover any downtime for the bot (typically in the order of days), which would be the case for the `SyncLabelBot` bot, or it could just be needed to cover any time sync differences between the bot and the server (typically in the order
of minutes to an hour), which would apply to the `CSRIssueBot`.
>>
>> Like with my revised PR for SKARA-1565, I'm not changing any bot to use this poller yet. I'm going to followup with that change for the CSRBot in SKARA-1594, and for other bots later.
>
> Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:
>
> For correctness and better test stability, also check for Issue eqaulity in isUpdated, like the PullRequestPoller does
LGTM
-------------
Marked as reviewed by ihse (Reviewer).
PR: https://git.openjdk.org/skara/pull/1372
More information about the skara-dev
mailing list