Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged PR with label conditions do not always result in the same action #699

Closed
0xc0170 opened this issue Feb 3, 2020 · 2 comments
Closed

Comments

@0xc0170
Copy link

0xc0170 commented Feb 3, 2020

An example can be found here: ARMmbed/mbed-os#12291

This is the rule:

  # Check if version label is applied
  - name: release version is a must for merged PRs
    conditions:
      - merged
      - -label~=^(release-version)
    actions:
      label:
        add: ['Release review required']
      comment:
        message: This PR does not contain release version label after merging.

I checked this in simulator and also on Github. The rule looks fine to me. But somehow we get the comment and label add for PRs that do not satisfy this rule. Only some PRs are affected.
What I suspect, if the label "release-version: xxx" is added after PR is being merged, might play a role here. It should not however.

@jd
Copy link
Member

jd commented Feb 3, 2020

Yes, this is a race condition. When Mergify evaluates the rule, the PR is merged and then label is not set.

If you want to solve this right now you need to make sure your label is set before merging the PR.

(On our side, this kind of behavior should be improved when we switch to a more batched approach in treating GitHub events.)

@0xc0170
Copy link
Author

0xc0170 commented Feb 3, 2020

Thanks for the input. We will make sure the label is there before merging, already been testing this today - works fine.

@jd jd closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants