Mergifyio / mergify

Mergify Community Issue Tracker
https://mergify.com
Apache License 2.0
318 stars 91 forks source link

Deleted branch for PR doesn't exit queue #5113

Closed thejcannon closed 1 month ago

thejcannon commented 2 months ago

Steps to Reproduce the Problem

  1. Make branch and open PR
  2. Enqueue the PR
  3. Delete the branch on origin
    • This closes the GH PR
  4. Mergify will keep the closed PR at the head of the queue

Expected Behavior

The PR is dequeued

Actual Behavior

The PR is forever the head of the queue

Specifications

thejcannon commented 2 months ago
Screenshot 2024-05-01 at 2 29 32 PM
thejcannon commented 2 months ago

FWIW I've also seen Mergify handle this correctly. So I suspect now it must be a race.

jd commented 2 months ago

👋 @thejcannon We've opened a ticket internally and we'll look into it ASAP!

DouglasBlackwood commented 1 month ago

Hi @thejcannon

I ran several tests but I can't reproduce the bug. GitHub sends a "pull request closed" event and Mergify dequeues the pull request as expected.

How often do you notice this bug? Did you find any common pattern?

thejcannon commented 1 month ago

No, seemed like a blip really.

One thing I vaguely remember from bors is that GitHub doesn't retry webhooks. So if you blink and miss it you're SOL. I can go see if GitHub still has the webhooks log and see if any weren't responded to.

Otherwise feel free to close as not reproducible

jd commented 1 month ago

That'd be a good check. I'll close it in the meantime but feel free to reopen if you see this happening again.

thejcannon commented 1 month ago

Ah looks like GitHub only stored recent deliveries for the last day-or-so 😭