RFR: 1682: PullRequestBot::getPeriodicItems takes too long

Erik Joelsson erikj at openjdk.org
Fri Nov 18 13:48:34 UTC 2022

On Fri, 18 Nov 2022 00:29:45 GMT, Zhao Song <zsong at openjdk.org> wrote:

> LGTM, just a small question, why don't we move `isReady()` to `PullRequestWorkItem`?

In this patch, it was laziness mostly. Moving it would require providing the underlying data to the WorkItem as well, either by calling the bot for it or adding as additional fields in the work item.

I did think some more on this patch since yesterday, and realized that we will be doing the isReady check quite a lot more with this change. This is because CheckWorkItem and PullRequestCommandWorkItem often spawn each other in sequence, and now each of those instances would repeat the check unnecessarily (or at least this wasn't considered needed before). I think I will change this by adding a new boolean field `readyCheckNeeded` to `PullRequestWorkItem` so we can avoid doing it when not needed, and while at it, I will move `isReady` as well.


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

More information about the skara-dev mailing list