-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Enable merge_group trigger for merge queues #35062
Conversation
why is |
Github will create temporary branches that will trigger the |
maybe I'm mistreading what the patch does, but appearnce of |
but why do we need it on |
This is a bit of a stupid yml syntax. The indented "branches" only apply to "push" and not to "merge_queue".
I was not sure about this change, since the role of the master branch is not clear to me. If it is indeed only an old copy of the develop branch and does not receive any updates, then sure we don't need to run these workflows on it (but then why is there a master branch in the first place?). If the master branch may be updated (hotfixes?) than you probably want to verify that the new commits adhere at least to these basic tests. |
The |
@vbraun Did you already found the time to look into merge queues? In its current form this PR doesn't replace your buildbots but it ensures that PR's don't introduce changes that make other PRs fail (when merged at the same time). This happened a few times in the last months and is pretty annoying since then the github workflow fails for every new PR. |
@dimpase since you were interested in the merge queue feature. |
Documentation preview for this PR (built with commit 043e76a; changes) is ready! 🎉 |
could it rather have a manual trigger, for the time being? |
master branch ought to be removed here, IMHO |
One can only trigger a merge queue by merging PRs. There is no other way. (The master branch there is just for completeness - it looks like its no longer used, but officially its still there.) |
does this mean that PRs are merged automatically? So then they are still mergeable in the usual way? |
For the PRs targeting |
what does it mean for PR to " target" the 'test' branch? |
If you open a PR you can say into which branch you want to merge this PR. |
Oh, right, of course. So, suppose this happens, and the PR gets more or less automatically merged into 'test'. |
Never ;-) The point of the 'test' branch would be to merge stupid test PRs (some nonsensical changes in the readme say, some others that break the build etc) in order to test that the merge queue works. Once this is established, we can approach @vbraun and ask that real PRs are merged into the develop branch using the merge queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Do these experiments to get familiar with merge queues really have to be done in this repo? I'd suggest not. |
Why not? It's not breaking anything |
So you cannot try it out in a private fork. Thanks @dimpase for your review! |
### 📚 Description Two days ago [github announced the public beta of merge queues](https://github.blog/changelog/2023-02-08-pull-request-merge- queue-public-beta/). The idea is pretty similar the current release/merge process (as far as I understand it): Given you want to merge three PRs into `develop`, you add them to the merge queue and github will create three temporary branches: - PR1 - PR1 + PR2 merged - PR1 + PR2 + PR3 merged It then runs all checks with the `merge_group` trigger on each branch. Once all checks for all these temporary branches are successful, the whole group is merged into `develop`. If there are merge conflicts, say between PR3 and PR1, or the build for the PR1+2+3 branch fails, then PR3 is removed from the merge queue and only the first two PRs are merged into `develop`. In this way, one could never end up in a situation where the checks are not passing in the develop branch, without requiring devs to always merge the latest develop branch themselves. (E.g., we will no longer hit the situation that PR2 introduces new linter rules which are not fullfiled by PR3 but both PRs are merged into develop). References: - https://docs.github.com/en/repositories/configuring-branches-and- merges-in-your-repository/configuring-pull-request-merges/managing-a- merge-queue - https://docs.github.com/en/actions/using-workflows/events-that- trigger-workflows#merge_group --- In this PR we add the merge_group trigger on the current PR-workflows, which enables to run these in the merge queue as well. --- Since this effectively implements the current version of "Volker's temporary private develop branch", I was wondering if this would be eneough to give more people rights to merge PRs. What else would be necessary for such a step? @vbraun <!-- Describe your changes in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes sagemath#1337" --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> URL: sagemath#35062 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik, Matthias Köppe, Tobias Diez
I've now enabled the merge queue feature. You can try it out by creating a PR against https://github.com/sagemath/sage/tree/test_merge_queue. For example, #36432. Currently, only the linter workflow has to pass for the merge to succeed. |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> Tests if the merge queue added in #35062 is working. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [ ] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
📚 Description
Two days ago github announced the public beta of merge queues. The idea is pretty similar the current release/merge process (as far as I understand it): Given you want to merge three PRs into
develop
, you add them to the merge queue and github will create three temporary branches:It then runs all checks with the
merge_group
trigger on each branch. Once all checks for all these temporary branches are successful, the whole group is merged intodevelop
. If there are merge conflicts, say between PR3 and PR1, or the build for the PR1+2+3 branch fails, then PR3 is removed from the merge queue and only the first two PRs are merged intodevelop
.In this way, one could never end up in a situation where the checks are not passing in the develop branch, without requiring devs to always merge the latest develop branch themselves. (E.g., we will no longer hit the situation that PR2 introduces new linter rules which are not fullfiled by PR3 but both PRs are merged into develop).
References:
In this PR we add the merge_group trigger on the current PR-workflows, which enables to run these in the merge queue as well.
Since this effectively implements the current version of "Volker's temporary private develop branch", I was wondering if this would be eneough to give more people rights to merge PRs. What else would be necessary for such a step? @vbraun
📝 Checklist
⌛ Dependencies