RFR: 1588: Bridge messages should not be sent for PRs in draft state

Erik Joelsson erikj at openjdk.org
Fri Feb 10 14:56:05 UTC 2023


On Thu, 9 Feb 2023 21:39:42 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> This will indeed pause emails while a PR is in draft state. When it gets back from draft, I believe everything that happened while in draft will be sent. That is certainly the easiest way to handle this and I'm good with this change. We will just have to see how it plays out in practice.

Thinking about this some more, this simple solution has a pretty big drawback. There is no actual synchronization between events. All bot actions are asynchronous. Imagine the following scenario.

1. User posts comment "I'm putting this PR in draft to work on the feedback"
2. User puts PR in draft
3. mlbridge bot processes PR, finds it in draft and does nothing
4. User removes draft state
5. mlbridge bot processes PR, finds new comment from 1 and posts it.

For this to work correctly, draft PRs still need to be processed by mlbridge, and any events up until the draft state change need to be processed as usual. 

This is still possibly better than what we have, but I'm not sure. Opinions?

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

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


More information about the skara-dev mailing list