RFR: 1537: SponsorCommand can fail indefinitely with '/integrate auto' [v2]

Erik Joelsson erikj at openjdk.org
Wed Aug 10 21:48:34 UTC 2022

> 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.

Erik Joelsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge commit '990ac8fb40d1c2943b680631d7dac7aa30844236' into SKARA-1537-sponsor-auto
 - SKARA-1537


  - all: https://git.openjdk.org/skara/pull/1354/files
  - new: https://git.openjdk.org/skara/pull/1354/files/fe9726c4..2c3e7360

 - full: https://webrevs.openjdk.org/?repo=skara&pr=1354&range=01
 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1354&range=00-01

  Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/skara/pull/1354.diff
  Fetch: git fetch https://git.openjdk.org/skara pull/1354/head:pull/1354

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

More information about the skara-dev mailing list