keymanapp / status.keyman.com

https://status.keyman.com/
0 stars 0 forks source link

bug: race condition when multiple events received for single PR #416

Open mcdurdin opened 5 months ago

mcdurdin commented 5 months ago

It is possible for the test bot to generate multiple User Test Result comments if multiple events are received when a PR/issue is created, before the first User Test Result comment is created.

image

There is a known race condition here -- you see the user test results showing up twice -- because of the async nature of the bot, it can end up creating two user test result comments when multiple events are received. Workaround is to delete one of them -- doesn't matter which one.

The proper fix is to serialize the responses from the test bot better, which we could do queuing actions, and signaling completion of each test bot action before starting the next one.

Or at least serialize actions for a given PR/issue. But that's a little more plumbing to get right.