RFR: 1565: Only poll for updated MRs from GitLab [v13]

Erik Joelsson erikj at openjdk.org
Tue Sep 20 20:49:42 UTC 2022


> This is another rather big patch, but again, with some explanation, it shouldn't be too scary. The most important part is the new `PullRequestPoller` class. This class implements a polling mechanism for PullRequests that tries to only return new or updated pull requests to a bot and guaranteeing that none are missed. The goal is to minimize unnecessary evaluations that currently take place, especially when polling Gitlab. I have added quite a few tests to verify (almost) all the functionality of the poller. For a more detailed explanation of all the challenges this poller faces, see the bug description.
> 
> In order to reduce impact, I'm not actually making any bot use the new poller yet. I'm filing followup issues to convert them one by one, at least to start. The retry and quarantine features in the poller should cover the current needs for the bots I have inspected.
> 
> Most of the rest of the changes are just adding `equals` and `hashCode` to a bunch of classes that we now need to compare (to know if a PR has been updated or not). This includes the `GitHubPullrequest`, `GitLabMergeRequest` and all the JSON types. For test code this also includes the `TestPullRequest` and `TestIssue` and their related data classes.
> 
> To test this properly, I needed to refactor some test classes. This work was moved to a separate change in SKARA-1589.

Erik Joelsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits:

 - Merge branch 'master' into SKARA-1565-pr-poll
 - Style fix
 - Use Duration.ZERO
 - Adjusted some comments
 - Fix tests
 - Use new PullRequest API
 - Revert CSRBot, moving it to separate change
 - Merge branch 'master' into SKARA-1565-pr-poll
 - Adding log message
 - Merge branch 'SKARA-1589-test-refactor' into SKARA-1565-pr-poll
 - ... and 7 more: https://git.openjdk.org/skara/compare/44f09c1b...f6a35b11

-------------

Changes: https://git.openjdk.org/skara/pull/1369/files
 Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1369&range=12
  Stats: 867 lines in 17 files changed: 859 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/skara/pull/1369.diff
  Fetch: git fetch https://git.openjdk.org/skara pull/1369/head:pull/1369

PR: https://git.openjdk.org/skara/pull/1369


More information about the skara-dev mailing list