Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1537

SponsorCommand can fail indefinitely with '/integrate auto'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.0
    • None
    • bots
    • None

      If an author without integration permission issues '/integrate auto' and a committer then issues '/sponsor' before after the PR is marked with label 'auto', but before the bot has added the automatic '/integrate' and posted the 'ready for sponsor message', then the SponsorCommand will get stuck in a failure loop like this:

      java.util.NoSuchElementException: No value present
      at java.base/java.util.Optional.orElseThrow(Optional.java:377)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.SponsorCommand.handle(SponsorCommand.java:62)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.CommandHandler.handle(CommandHandler.java:42)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.PullRequestCommandWorkItem.processCommand(PullRequestCommandWorkItem.java:144)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.PullRequestCommandWorkItem.prRun(PullRequestCommandWorkItem.java:193)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.PullRequestWorkItem.run(PullRequestWorkItem.java:66)
      at org.openjdk.skara.bot/org.openjdk.skara.bot.BotRunner$RunnableWorkItem.runMeasured(BotRunner.java:236)
      at org.openjdk.skara.bot/org.openjdk.skara.bot.BotRunner$RunnableWorkItem.run(BotRunner.java:186)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at java.base/java.lang.Thread.run(Thread.java:833)

      Together with SKARA-1534, this is also causing the bot to repost '/integrate' over and over again.

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: