RFR: 1595: Introduce an IssuePoller similar to the PullRequestPoller [v2]

Erik Joelsson erikj at openjdk.org
Fri Sep 16 20:04:17 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:

  Adjust tests to pass on Windows


  - all: https://git.openjdk.org/skara/pull/1372/files
  - new: https://git.openjdk.org/skara/pull/1372/files/2f90f879..28824973

 - full: https://webrevs.openjdk.org/?repo=skara&pr=1372&range=01
 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1372&range=00-01

  Stats: 13 lines in 1 file changed: 5 ins; 0 del; 8 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