When the PR bot runner is restarted, the initial run of PullRequestBot polls all open PRs and 7 days of closed PRs, to make sure we process any updates that happened while the bot was down, and to make sure we process PRs with the potentially updated bot implementation. The CheckWorkItem tries to prevent re-evaluating PRs too much by storing a checksum of the last checked state in the PR itself on the forge. This state is split between PR state and (Jira) Issue state. Depending on which kind of Bot instance (Issue or PullRequest) that spawned the CheckWorkItem, only the relevant checksum is recalculated and compared. This selective checking is good for performance when the bot runner has reached steady state, but is the cause for missing Issue updates (or updates to Issue evaluation) when the bot runner is restarted. Only the PullRequestBot does the initial big poll of PRs, while the IssueBot only starts polling for current updates. This means that if an Issue was updated while the bot runner was restarting, CheckWorkItem won't compare the checksum for Issues in this first run.
I think we can solve this without too much trouble. In the initial run, PullRequestBot needs to make CheckWorkItem compare both checksums.
I think we can solve this without too much trouble. In the initial run, PullRequestBot needs to make CheckWorkItem compare both checksums.
- relates to
-
SKARA-2016 CSRIssueBot shouldn't force CheckWorkItem to run
-
- Resolved
-