RFR: 1659: Fix polling and retries in testinfo bot [v2]

Zhao Song zsong at openjdk.org
Tue Nov 15 23:00:48 UTC 2022


On Tue, 15 Nov 2022 22:17:45 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> > Hi Erik,
> > You mentioned
> > > For any PR that hasn't been updated, the only way to get scheduled is if a WorkItem is calling back with a "recheckAt" time.
> > 
> > 
> > And I am thinking that sometimes we will update checks in the end of `TestInfoBotWorkItem#run`, so whether a pr will be considered as 'updated' if the checks are updated. And if so, I think in the next call of `getPeriodicItems`, the bot will also schedule another `TestInfoBotWorkItem`.
> > Maybe it's not a big deal. Once the checks are not updated., it will stop.
> 
> You are correct, and this is actually a behavior exhibited by some other bots as well. A WorkItem modifying the PR will trigger another round by itself. In certain cases (in other bots) I believe this is intentional, as a WorkItem will return early on first modification and then let the next round do further changes. In this case, it's not really something I wanted, but it also doesn't hurt much. It could even be considered a feature that after a check update, we quickly check again a single time in case checks update quickly, then we fall off to the 2 minute recheck interval.
> 
> All that said, I should probably add some comment acknowledging this behavior so that it's more obvious to someone reading the code.

Make sense to me!

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

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


More information about the skara-dev mailing list