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

Zhao Song zsong at openjdk.org
Fri Feb 10 17:44:34 UTC 2023


On Fri, 10 Feb 2023 14:52:44 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?

I'm not sure I understand it correctly. Is the problem that the notification 'I'm putting this PR in draft to work on the feedback' won't be sent until the user makes the PR out of draft mode? Maybe it's not a big problem, the window is not very big, just few minutes.

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

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


More information about the skara-dev mailing list