RFR: 1595: Introduce an IssuePoller similar to the PullRequestPoller [v4]
Erik Joelsson
erikj at openjdk.org
Fri Sep 16 21:21:08 UTC 2022
> 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.
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
-------------
Changes:
- all: https://git.openjdk.org/skara/pull/1372/files
- new: https://git.openjdk.org/skara/pull/1372/files/c94561a5..27929d9e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=skara&pr=1372&range=03
- incr: https://webrevs.openjdk.org/?repo=skara&pr=1372&range=02-03
Stats: 24 lines in 2 files changed: 24 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/skara/pull/1372.diff
Fetch: git fetch https://git.openjdk.org/skara pull/1372/head:pull/1372
PR: https://git.openjdk.org/skara/pull/1372
More information about the skara-dev
mailing list