You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is that each time the webhook is triggered, we go to the issue and grab the labels, disregarding of the label that triggered the webhook is one of the ones we care about. If we label the PR very fast with 3 labels, the webhook will be fired 3 times and we will go the the issue three times, we will find three times that two of the labels in the issue should trigger a backport and therefore the backport will be triggered three times for each of the relevant labels.
I can make a PR trying to fix this if that's ok :)
In python/cpython#4003, miss-islington made multiple backport attempts. It should only be done once.
I tried to [Merge] this PR whereas @serhiy-storchaka already merged it while I tried to merge it. Then GitHub proposed me to [Try Again], I tried again, before seeing the small notification that the PR was already merged.
It can explain why the bot was called 3 times (x 2, since two backports were requested, total: 6 times) instead of only once (twice if we count both Python versions).
Activity
Mariatta commentedon Oct 17, 2017
We received several PR "labeled" events from GitHub for adding the labels:
type-bugfix,needs backport to 2.7, andneeds backport to 3.6.It shouldn't have tried to do the backport when
type-bugfixlabel was added.pablogsal commentedon Oct 17, 2017
think the issue is in these lines:
The reason is that each time the webhook is triggered, we go to the issue and grab the labels, disregarding of the label that triggered the webhook is one of the ones we care about. If we label the PR very fast with 3 labels, the webhook will be fired 3 times and we will go the the issue three times, we will find three times that two of the labels in the issue should trigger a backport and therefore the backport will be triggered three times for each of the relevant labels.
I can make a PR trying to fix this if that's ok :)
Mariatta commentedon Oct 17, 2017
Yep, that is right. I have started working on the fix, and will have a PR later today. Thanks :)
vstinner commentedon Oct 17, 2017
I tried to [Merge] this PR whereas @serhiy-storchaka already merged it while I tried to merge it. Then GitHub proposed me to [Try Again], I tried again, before seeing the small notification that the PR was already merged.
It can explain why the bot was called 3 times (x 2, since two backports were requested, total: 6 times) instead of only once (twice if we count both Python versions).
Only backport if the newly added label is the 'needs backport' label.
Only backport if the newly added label is the 'needs backport' label. (…