Skip to content

Multiple backport attempts  #35

Closed
Closed

Description

@Mariatta

In python/cpython#4003, miss-islington made multiple backport attempts. It should only be done once.

Activity

  1. Mariatta commented on Oct 17, 2017

    @Mariatta
    MemberAuthor

    We received several PR "labeled" events from GitHub for adding the labels: type-bugfix, needs backport to 2.7, and needs backport to 3.6.

    It shouldn't have tried to do the backport when type-bugfix label was added.

  2. self-assigned this
    on Oct 17, 2017
  3. pablogsal commented on Oct 17, 2017

    @pablogsal
    Member

    think the issue is in these lines:

      pr_labels = await gh.getitem(gh_issue['labels_url'])
            branches = [label['name'].split()[-1]
                        for label in pr_labels
                            if label['name'].startswith("needs backport to")]

    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 :)

  4. Mariatta commented on Oct 17, 2017

    @Mariatta
    MemberAuthor

    Yep, that is right. I have started working on the fix, and will have a PR later today. Thanks :)

  5. vstinner commented on Oct 17, 2017

    @vstinner
    Member

    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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions