Integrated: 1595: Introduce an IssuePoller similar to the PullRequestPoller
Erik Joelsson
erikj at openjdk.org
Tue Sep 20 18:07:32 UTC 2022
On Mon, 12 Sep 2022 21:16:37 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 o
f 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.
This pull request has now been integrated.
Changeset: c2a7adc4
Author: Erik Joelsson <erikj at openjdk.org>
URL: https://git.openjdk.org/skara/commit/c2a7adc43135a673a8019ab30ed94d90a9487074
Stats: 402 lines in 7 files changed: 401 ins; 0 del; 1 mod
1595: Introduce an IssuePoller similar to the PullRequestPoller
Reviewed-by: ihse
-------------
PR: https://git.openjdk.org/skara/pull/1372
More information about the skara-dev
mailing list