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

Sync PRs should be auto-mergable if check-enforcer is green #1147

Closed
mikeharder opened this issue Oct 27, 2020 · 3 comments
Closed

Sync PRs should be auto-mergable if check-enforcer is green #1147

mikeharder opened this issue Oct 27, 2020 · 3 comments
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team.

Comments

@mikeharder
Copy link
Member

mikeharder commented Oct 27, 2020

Sync PRs should be auto-mergable if check-enforcer is green, even if some of the individual checks are red. For example, this PR was not auto-mergable because python - template failed, even though I ran /check-enforcer override.

https://github.com/Azure/azure-sdk-for-python/pull/14754/checks

Here's the log showing the auto-merge failure:

https://dev.azure.com/azure-sdk/internal/_build/results?buildId=588939&view=logs&j=f6a7114c-32c6-5cc4-d467-98fb1350225d&s=7d381cb2-73e5-5ace-6bc2-80e6cde2a5b2&t=a2695e80-e975-5318-3c29-d781630e749d&l=21

@mikeharder mikeharder added the Central-EngSys This issue is owned by the Engineering System team. label Oct 27, 2020
@chidozieononiwu
Copy link
Member

This has been fixed by removing inclusion of internal template runs on the sync PR checks.
#1154

@mikeharder
Copy link
Member Author

This still appears to be an issue:

##[warning]https://github.com/Azure/azure-sdk-for-ios/pull/1412 is blocked (unstable).
Please ensure all checks are green and reviewers have approved.

https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2033489&view=logs&j=f6a7114c-32c6-5cc4-d467-98fb1350225d&s=b0f91f5f-86bb-51b4-905a-b77da63d1728&t=92d3002b-c214-53f7-faf6-6294b17e07f4&l=17

Pipeline "ios - client - ci" was failing due to issues in main. I did /check-enforcer override on the sync PR, but the pipeline still blocked because it couldn't merge it. I needed to manually merge the blocked PR.

@weshaggard
Copy link
Member

After investigating further there is actually go good way using the rest api or the graphql to fully check if a PR can be merged or not. We are relying on the mergeable_state property in the rest api (https://github.com/Azure/azure-sdk-tools/blob/main/eng/scripts/Verify-And-Merge-PRs.ps1#L47) but it is undocumented and in both cases it returns "unknown" before and after the check-enforcer override is triggered. Given I don't see a great way to handle this and we have an easy workaround, which is to just merge the PR manually, I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team.
Projects
None yet
Development

No branches or pull requests

3 participants