Marge has been stabilised

Hi all, I think I have finally managed to stablise the merge bot (Marge). If you have a patch ready to merge then 1. Make sure that CI shows as passing 2. Make sure it has been approved by at least one person 3. Make sure it is not marked as WIP Once these three conditions are met, assign the PR to "Marge Bot" and then she will pick it up and merge it, hopefully within 24 hours depending on her current state. Any more questions, feel free to ask. I included some more specific detail below. Cheers, Matt ------ Here is her current mode of operation. Every 30 minutes whilst idle she will try to find new MRs to batch together. If she finds at least two MRs to batch together then she creates a batch as a new merge request. A batch is the series of MRs rebased on top of each other from oldest to newest. She then waits for this merge request to pass CI, checking every 10 minutes to see if it has done so. Once the MR has passed CI, she rebases and merges each MR in the batch one by one to the target branch. In between each MR she merges she waits 5 minutes. Due to the fact each MR is merged one by one: 1. The original MR will be closed automatically. 2. A CI job will trigger for each MR as it lands on master.

WIP merge requests have "WIP:" at the front of the title.
I have been marking MRs as WIP is they are not ready to merge to try
to keep track of things that need to be added to the merge queue or
not.
This can be quickly toggled on/off by typing the /wip quick command in
a comment.
Cheers,
Matt
On Tue, Feb 12, 2019 at 3:44 PM Richard Eisenberg
Thanks for these instructions!
On Feb 12, 2019, at 3:37 AM, Matthew Pickering
wrote: 3. Make sure it is not marked as WIP
What does this mean, precisely?
Thanks, Richard

On Feb 12, 2019, at 10:51 AM, Matthew Pickering
wrote: This can be quickly toggled on/off by typing the /wip quick command in a comment.
This is an interesting aside. I understand this to mean: If I make a comment (the same place that I would write a comment for humans) that consists solely of "/wip", then instead of posting anything to humans, the title of my MR changes, either adding "WIP: " or deleting that from the beginning. Are there other such pieces of magic? Is there a place they are listed? Thanks! Richard

Yes there are two others I use frequently.
/approve - Approves a Merge request
/assign - Assign a user
and I imagine I will use /label and /relabel frequently when we have labels.
It's also useful to know that the ! autocomplete for merge requests
can be filtered by name of MR. The user autocomplete @ can also be
filtered by a user's real name.
There is a full list here:
https://docs.gitlab.com/ee/user/project/quick_actions.html
Cheers,
Matt
On Tue, Feb 12, 2019 at 4:23 PM Richard Eisenberg
On Feb 12, 2019, at 10:51 AM, Matthew Pickering
wrote: This can be quickly toggled on/off by typing the /wip quick command in a comment.
This is an interesting aside. I understand this to mean: If I make a comment (the same place that I would write a comment for humans) that consists solely of "/wip", then instead of posting anything to humans, the title of my MR changes, either adding "WIP: " or deleting that from the beginning.
Are there other such pieces of magic? Is there a place they are listed?
Thanks! Richard

Every 30 minutes whilst idle she will try to find new MRs to batch together. If she finds at least two MRs to batch together then she creates a batch as a new merge request. A batch is the series of MRs rebased on top of each other from oldest to newest.
Does this mean that on a quiet day (if there are ever any for GHC dev), a lone merge will languish until someone else puts forward a valid merge too? Or will marge just merge a non-batched lone merge request? Alan

Yes, on a quiet day she will idly wait for the opportunity to merge
two MRs rather than try and merge just one.
I don't think this is a bad default as her CI cycle has proved to be
quite long so only 2-3 batches happen per day at most.
Matt
On Tue, Feb 12, 2019 at 6:36 PM Alan & Kim Zimmerman
Every 30 minutes whilst idle she will try to find new MRs to batch together. If she finds at least two MRs to batch together then she creates a batch as a new merge request. A batch is the series of MRs rebased on top of each other from oldest to newest.
Does this mean that on a quiet day (if there are ever any for GHC dev), a lone merge will languish until someone else puts forward a valid merge too?
Or will marge just merge a non-batched lone merge request?
Alan

Interesting. That page says (my emphasis)
Quick actions are textual shortcuts for common actions on issues, epics, merge requests, and commits that are usually done by clicking buttons or dropdowns in GitLab’s UI. You can enter these commands while creating a new issue or merge request, or in comments of issues, epics, merge requests, and commits. Each command should be on a separate line in order to be properly detected and executed. Once executed, the commands are removed from the text body and not visible to anyone else.
So this may be a useful shortcut, but it’s optional.
So that means that this “WIP” thing is part of GitLab’s semantic model. The table says
/wip: Toggle the Work In Progress status
So it seems that
* Each MR has a WIP status
* There is some way in the UI to toggle it
Do you know what are the semantics of “WIP status”? It’s not just the title!
I assume it is /not/ “WIP MRs aren’t merged” because no MR is merged until there are enough approvals /and/ the author clicks “please merge”. Correct?
Sorry to be dim. I’m a bit slow to catch up with GitLab.
I have a “Simon’s GitLab page” here https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/GitLabSPJ
I use it to add notes on things I’ve learned.
Simon
| -----Original Message-----
| From: ghc-devs

As far as I can work out the WIP field is a part of the semantic model
but the only way it displays on the UI is in the title.
Two other facets of the WIP state are:
1. WIP MRs can't be merged via the UI. (Marge also honours this)
2. The list of MRs can be filtered by the WIP status (which is that I
use it for).
https://docs.gitlab.com/ee/user/project/merge_requests/work_in_progress_merg...
Your page is very helpful Simon. If you have any more questions then
I'll try to answer.
Cheers,
Matt
On Wed, Feb 13, 2019 at 9:38 AM Simon Peyton Jones
Interesting. That page says (my emphasis)
Quick actions are textual shortcuts for common actions on issues, epics, merge requests, and commits that are usually done by clicking buttons or dropdowns in GitLab’s UI. You can enter these commands while creating a new issue or merge request, or in comments of issues, epics, merge requests, and commits. Each command should be on a separate line in order to be properly detected and executed. Once executed, the commands are removed from the text body and not visible to anyone else.
So this may be a useful shortcut, but it’s optional.
So that means that this “WIP” thing is part of GitLab’s semantic model. The table says
/wip: Toggle the Work In Progress status
So it seems that
Each MR has a WIP status There is some way in the UI to toggle it
Do you know what are the semantics of “WIP status”? It’s not just the title!
I assume it is /not/ “WIP MRs aren’t merged” because no MR is merged until there are enough approvals /and/ the author clicks “please merge”. Correct?
Sorry to be dim. I’m a bit slow to catch up with GitLab.
I have a “Simon’s GitLab page” here https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/GitLabSPJ
I use it to add notes on things I’ve learned.
Simon
| -----Original Message-----
| From: ghc-devs
On Behalf Of Matthew | Pickering
| Sent: 12 February 2019 16:29
| To: Richard Eisenberg
| Cc: GHC developers
| Subject: Re: Marge has been stabilised
|
| Yes there are two others I use frequently.
|
| /approve - Approves a Merge request
| /assign - Assign a user
|
| and I imagine I will use /label and /relabel frequently when we have
| labels.
|
| It's also useful to know that the ! autocomplete for merge requests
| can be filtered by name of MR. The user autocomplete @ can also be
| filtered by a user's real name.
|
| There is a full list here:
| https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.gitl
| ab.com%2Fee%2Fuser%2Fproject%2Fquick_actions.html&data=02%7C01%7Csimonp
| j%40microsoft.com%7Cb91996c8302240d8c75c08d691074201%7C72f988bf86f141af91ab
| 2d7cd011db47%7C1%7C0%7C636855857693042801&sdata=ngK1tGiNd6ZLGMS34emZYv%
| 2B31dHS1nfUQ9StRSLXwcQ%3D&reserved=0
|
| Cheers,
|
| Matt
|
| On Tue, Feb 12, 2019 at 4:23 PM Richard Eisenberg
| wrote:
| >
| >
| >
| > On Feb 12, 2019, at 10:51 AM, Matthew Pickering
|
wrote: | >
| > This can be quickly toggled on/off by typing the /wip quick command in
| > a comment.
| >
| >
| > This is an interesting aside. I understand this to mean: If I make a
| comment (the same place that I would write a comment for humans) that
| consists solely of "/wip", then instead of posting anything to humans, the
| title of my MR changes, either adding "WIP: " or deleting that from the
| beginning.
| >
| > Are there other such pieces of magic? Is there a place they are listed?
| >
| > Thanks!
| > Richard
| _______________________________________________
| ghc-devs mailing list
| ghc-devs@haskell.org
| https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haske
| ll.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
| devs&data=02%7C01%7Csimonpj%40microsoft.com%7Cb91996c8302240d8c75c08d69
| 1074201%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636855857693042801&
| ;sdata=ciA051iOt74WyZMrr9HulHik%2BG4la8YyF47sYnbqvzs%3D&reserved=0

| As far as I can work out the WIP field is a part of the semantic model
| but the only way it displays on the UI is in the title.
If you want to change the status using the UI (not via a "quick action") do you literally edit the title? That is, the semantics is driven from the title string itself? Or do you do something else in the UI?
S
| -----Original Message-----
| From: Matthew Pickering

Yes you have to literally edit the string.
I know this is very confusing but many things about gitlab can't be
explained with normal logic.
Cheers,
Matt
On Wed, Feb 13, 2019 at 4:03 PM Simon Peyton Jones
| As far as I can work out the WIP field is a part of the semantic model | but the only way it displays on the UI is in the title.
If you want to change the status using the UI (not via a "quick action") do you literally edit the title? That is, the semantics is driven from the title string itself? Or do you do something else in the UI?
S
| -----Original Message----- | From: Matthew Pickering
| Sent: 13 February 2019 10:10 | To: Simon Peyton Jones | Cc: Richard Eisenberg ; GHC developers | Subject: Re: Marge has been stabilised | | As far as I can work out the WIP field is a part of the semantic model | but the only way it displays on the UI is in the title. | | Two other facets of the WIP state are: | | 1. WIP MRs can't be merged via the UI. (Marge also honours this) 2. The | list of MRs can be filtered by the WIP status (which is that I use it | for). | | https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.gi | tlab.com%2Fee%2Fuser%2Fproject%2Fmerge_requests%2Fwork_in_progress_merge_ | requests.html&data=02%7C01%7Csimonpj%40microsoft.com%7C9936c5095e3147 | 63f30008d6919b61a2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636856493 | 881824887&sdata=ii1%2FHl0V94%2F8BssWQr%2F43dSOALvm0QFw7VIGeoFIar0%3D& | amp;reserved=0 | | Your page is very helpful Simon. If you have any more questions then I'll | try to answer. | | Cheers, | | Matt | | On Wed, Feb 13, 2019 at 9:38 AM Simon Peyton Jones | wrote: | > | > Interesting. That page says (my emphasis) | > | > | > | > Quick actions are textual shortcuts for common actions on issues, | epics, merge requests, and commits that are usually done by clicking | buttons or dropdowns in GitLab’s UI. You can enter these commands while | creating a new issue or merge request, or in comments of issues, epics, | merge requests, and commits. Each command should be on a separate line in | order to be properly detected and executed. Once executed, the commands | are removed from the text body and not visible to anyone else. | > | > | > | > So this may be a useful shortcut, but it’s optional. | > | > | > | > So that means that this “WIP” thing is part of GitLab’s semantic | > model. The table says | > | > | > | > /wip: Toggle the Work In Progress status | > | > | > | > So it seems that | > | > Each MR has a WIP status | > There is some way in the UI to toggle it | > | > | > | > Do you know what are the semantics of “WIP status”? It’s not just the | title! | > | > | > | > I assume it is /not/ “WIP MRs aren’t merged” because no MR is merged | until there are enough approvals /and/ the author clicks “please merge”. | Correct? | > | > | > | > Sorry to be dim. I’m a bit slow to catch up with GitLab. | > | > | > | > I have a “Simon’s GitLab page” here | > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fghc. | > haskell.org%2Ftrac%2Fghc%2Fwiki%2FWorkingConventions%2FGitLabSPJ&d | > ata=02%7C01%7Csimonpj%40microsoft.com%7C9936c5095e314763f30008d6919b61 | > a2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636856493881824887& | > ;sdata=0%2BFu2xOOc1SqVx4mwmmEf7pGX3CUfENIvjFf7MPINhs%3D&reserved=0 | > | > | > | > I use it to add notes on things I’ve learned. | > | > | > | > Simon | > | > | > | > | > | > | -----Original Message----- | > | > | From: ghc-devs On Behalf Of Matthew | > | > | Pickering | > | > | Sent: 12 February 2019 16:29 | > | > | To: Richard Eisenberg | > | > | Cc: GHC developers | > | > | Subject: Re: Marge has been stabilised | > | > | | > | > | Yes there are two others I use frequently. | > | > | | > | > | /approve - Approves a Merge request | > | > | /assign - Assign a user | > | > | | > | > | and I imagine I will use /label and /relabel frequently when we have | > | > | labels. | > | > | | > | > | It's also useful to know that the ! autocomplete for merge requests | > | > | can be filtered by name of MR. The user autocomplete @ can also be | > | > | filtered by a user's real name. | > | > | | > | > | There is a full list here: | > | > | https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdo | > | cs.gitl | > | > | ab.com%2Fee%2Fuser%2Fproject%2Fquick_actions.html&data=02%7C01%7 | > | Csimonp | > | > | j%40microsoft.com%7Cb91996c8302240d8c75c08d691074201%7C72f988bf86f14 | > | 1af91ab | > | > | 2d7cd011db47%7C1%7C0%7C636855857693042801&sdata=ngK1tGiNd6ZLGMS3 | > | 4emZYv% | > | > | 2B31dHS1nfUQ9StRSLXwcQ%3D&reserved=0 | > | > | | > | > | Cheers, | > | > | | > | > | Matt | > | > | | > | > | On Tue, Feb 12, 2019 at 4:23 PM Richard Eisenberg | > | | > | > | wrote: | > | > | > | > | > | > | > | > | > | > | > | > On Feb 12, 2019, at 10:51 AM, Matthew Pickering | > | > | wrote: | > | > | > | > | > | > This can be quickly toggled on/off by typing the /wip quick | > | > command in | > | > | > a comment. | > | > | > | > | > | > | > | > | > This is an interesting aside. I understand this to mean: If I make | > | > a | > | > | comment (the same place that I would write a comment for humans) | > | that | > | > | consists solely of "/wip", then instead of posting anything to | > | humans, the | > | > | title of my MR changes, either adding "WIP: " or deleting that from | > | the | > | > | beginning. | > | > | > | > | > | > Are there other such pieces of magic? Is there a place they are | listed? | > | > | > | > | > | > Thanks! | > | > | > Richard | > | > | _______________________________________________ | > | > | ghc-devs mailing list | > | > | ghc-devs@haskell.org | > | > | https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmai | > | l.haske | > | > | ll.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- | > | > | devs&data=02%7C01%7Csimonpj%40microsoft.com%7Cb91996c8302240d8c7 | > | 5c08d69 | > | > | 1074201%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636855857693042 | > | 801& | > | > | ;sdata=ciA051iOt74WyZMrr9HulHik%2BG4la8YyF47sYnbqvzs%3D&reserved | > | =0
participants (4)
-
Alan & Kim Zimmerman
-
Matthew Pickering
-
Richard Eisenberg
-
Simon Peyton Jones