Integrated: 1537: SponsorCommand can fail indefinitely with '/integrate auto'

Erik Joelsson erikj at openjdk.org
Thu Aug 11 22:30:22 UTC 2022


On Wed, 10 Aug 2022 21:21:40 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> This patch fixes two issues. The main one is an Optional "No value present" issue in SponsorCommand which can happen in combination with '/integrate auto' if a sponsor is too quick. With this patch, appropriate error replies are added by the bot when this happens, asking the sponsor to try again when the PR is in a suitable state. The commands on PRs and commits are designed to be evaluated in order, so there is really no way around this if they aren't issued in the right order.
> 
> Related to this, I'm also fixing SKARA-1534, where CheckWorkItem would continuously post new '/integrate' comments when '/integrate auto' is activated. This would typically happen in conjunction with the above sponsor problem, and did actually cause my new test to fail (as it found 2 replies to /integrate instead of 1), so I decided to fix that in the same patch. To do that, I exposed some static utility methods from PullRequestCommandWorkItem to be able to identify if any unhandled '/integrate' commands were already present in the PR.

This pull request has now been integrated.

Changeset: 16025165
Author:    Erik Joelsson <erikj at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/16025165f07d96d3a698c651d229d6980bc0e6ee
Stats:     131 lines in 4 files changed: 109 ins; 13 del; 9 mod

1537: SponsorCommand can fail indefinitely with '/integrate auto'
1534: Bot posts multiple /integrate commands

Reviewed-by: kcr

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

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


More information about the skara-dev mailing list