RFR: 1532: CSRBot is too inefficient

Erik Joelsson erikj at openjdk.org
Mon Aug 15 17:17:50 UTC 2022


On Mon, 15 Aug 2022 16:54:13 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> > I don't really know whether it is a good idea to has both CSRIssueBot and CSRPullRequestBot. It seems that one CSRBot contains two work items, `IssueWorkItem` and `PullRequestWorkItem`, works well too.
> 
> The reason for having two separate bots is that the CSRPullRequestBot has one instance for each repo, while the CSRIssueBot has one instance for each IssueProject. There are generally multiple repos that share the same IssueProject. It would be possible to have one single CSRBot for each IssueProject and just loop over all the repos in it. I chose to split them to keep each "bot" more focused on polling one kind of thing. Compare with the existing `MailingListArchiveReaderBot` and `MailingListBridgeBot`.
> 
> > Or we can seperate the `CSRIssueBot` to a new module, like `IssueBot`, to be reused in the future. But it may exceed the range of this patch.
> 
> A separate module would be tricky as we need WorkItems that are specialized for CSR, but those wouldn't be accessible in the other module. I do agree that part of the implementation here would be nice to be able to reuse, but until we know how some other bot would like to reuse it, I would rather not complicate the current patch further.

Also, thank you for taking the time to review this!

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

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


More information about the skara-dev mailing list