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

Pivot mergify config to use a merge queue #6211

Merged
merged 2 commits into from
May 7, 2021

Conversation

mtreinish
Copy link
Member

@mtreinish mtreinish commented Apr 13, 2021

Summary

In #6118 and #6117 we changed the mergify configuration to use the smart
strict mode which silently maintains a merge queue for us. This option
has recently been superseded by building explict merge queues that
enable more rich control over how PRs to merge get queue together. [1]
This commit switches the mergify config to use an explicit queue for
merging to give us more explicit control over how mergify is going to
merge PRs for us. This also opens up new options if we were to have a
mergify subscription at a future date, primarily speculative testing on
the merge queue [2] which will enable better throughput because it
validates the potential future state all at once and lets us run testing
in parallel.

Details and comments

[1] https://docs.mergify.io/actions/queue/
[2] https://docs.mergify.io/actions/queue/#speculative-checks

In Qiskit#6188 and Qiskit#6117 we changed the mergify configuration to use the smart
strict mode which silently maintains a merge queue for us. This option
has recently been superseded by building explict merge queues that
enable more rich control over how PRs to merge get queue together. [1]
This commit switches the mergify config to use an explicit queue for
merging to give us more explicit control over how mergify is going to
merge PRs for us. This also opens up new options if we were to have a
mergify subscription at a future date, primarily speculative testing on
the merge queue [2] which will enable better throughput because it
validates the potential future state all at once and lets us run testing
in parallel.

[1] https://docs.mergify.io/actions/queue/
[2] https://docs.mergify.io/actions/queue/#speculative-checks
@mtreinish mtreinish requested a review from a team as a code owner April 13, 2021 11:04
@levbishop
Copy link
Member

levbishop commented Apr 13, 2021

I support finding some way to use merge trains. (Whether using mergify or another tool).

@levbishop
Copy link
Member

Does this enable having a different set of checks for the ready-to-enter-the-queue check, vs final-merge-to-master check? Keeping a streamlined set of checks for the former but a slower/more complete for the latter would seem a potentially good idea.

@mtreinish
Copy link
Member Author

mtreinish commented Apr 13, 2021

Does this enable having a different set of checks for the ready-to-enter-the-queue check, vs final-merge-to-master check? Keeping a streamlined set of checks for the former but a slower/more complete for the latter would seem a potentially good idea.

In theory it does as we can now configure the pull request queue conditions to be a subset of jobs and then have the queue rules be the full set. But, in practice because github, CI, and mergify are 3 different, disconnected systems it would be tricky to implement. The first issue comes up with github's branch protection rules. Since we don't force (and actually can't short of removing write permission from the core team) the usage of mergify we need branch protection rules to ensure that we don't accidentally merge something before the required checks pass. But, mergify is bound by the same branch protection rules and won't consider a PR ready for the merge queue until it satisfies the branch protection rules. The only option to do this I guess would be to disable the required status checks in the branch protection rules and enforce by convention using mergify to do all the PR merging. But then there are other things like how to make CI trigger different jobs based on whether it's in the merge queue or not.

@mtreinish
Copy link
Member Author

One other thing here is github natively supports automerging now: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request Although the feature set looks more limited, it will just automerge a PR when the branch protection rules are satisfied. It doesn't look like it does updating automatically.

@mtreinish mtreinish merged commit 91007dc into Qiskit:main May 7, 2021
@mtreinish mtreinish deleted the update-mergify branch May 7, 2021 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants