marge-bot icon indicating copy to clipboard operation
marge-bot copied to clipboard

Work on MRs from different projects in parallel

Open okainov opened this issue 5 years ago • 10 comments

Would be great to be able to work asynchronously with MRs from different projects

okainov avatar Jul 29 '19 19:07 okainov

I think my PR #293 might be helpful for this

nirizr avatar Mar 15 '21 10:03 nirizr

@nirizr at least from the description I'm not sure it does what expected. Within the single project I see it as making sense to merge chronologically, this issue was more about multiple independent projects...

okainov avatar Mar 15 '21 13:03 okainov

I'm not sure I follow. Within a single project you say you rather Marge bot wait for a single MR until it passes CI although other MRs are already ready to be merged? I'm curious, why wouldn't you want a ready MR to be merged?

You're correct that right now this won't help you, though.

nirizr avatar Mar 15 '21 13:03 nirizr

Within a single project you say you rather Marge bot wait for a single MR until it passes CI although other MRs are already ready to be merged? I'm curious, why wouldn't you want a ready MR to be merged?

I'm not against it, it might be useful feature :) But in our team we do use rebase-only approach and it's better to have defined order of automatic merges than "fight who is faster to pass ci".

The ideal thought for a single project was that whatever merge tool does, it might build some kind of "merge train" inside itself to avoid multiple rebuilds. So if I have 3 ready-to-merge MRs, ideally it should build "virtual" branch which has all three merged and use this in order to validate the 3rd PR.

okainov avatar Mar 15 '21 13:03 okainov

I was only asking out of curiosity, it's also perfectly fine if you're against this as a feature :)

And I see why in a rebase-only flow you'd find this an inconvenience. Thanks!

nirizr avatar Mar 15 '21 13:03 nirizr

This feature would be really useful for my org, we frequently make new repos, and setting up an extra instance of marge each time has become a pain. We toyed with using the project regex stuff, but that just resulted in MRs from different projects being unnecessarily delayed by each other.

I had a stab at making marge support this on a fork and it seems to work (we're using one concurrent marge across a few tens of repos at the moment). I'm not a python guy so its pretty hacky, before I invest time in cleaning it up for an MR, is this a feature smarkets would be interesting in taking, or is this better just staying on my hacky fork?

Diff: https://github.com/laurence-hudson-mindfoundry/marge-bot/commit/170d9e2989a9dca6fe53a760cb592f03e5e1062e Dockerhub: laurencehudsonmindfoundryai/marge-bot-test:test3

@laurence-hudson-mindfoundry In our instance of marge-bot, the project regexp is just .* and we don't create a new instance of marge-bot for new groups or projects, we just add the marge-bot user to the group/project with maintainer privileges.

This does mean that long-running CI pipelines can "hold up" other MRs, but it does keep everything very simple.

snim2 avatar Nov 01 '21 09:11 snim2

@laurence-hudson-mindfoundry In our instance of marge-bot, the project regexp is just .* and we don't create a new instance of marge-bot for new groups or projects, we just add the marge-bot user to the group/project with maintainer privileges.

This does mean that long-running CI pipelines can "hold up" other MRs, but it does keep everything very simple.

Yeah we went down that route for a while, but the delays introduced where just too high, hence the fork.

Yeah we went down that route for a while, but the delays introduced where just too high, hence the fork.

Right, I feel your pain! I can't remember whether Marge sets merge when pipeline succeeds after it's pushed a rebased version of each MR, but that might speed things up a little.

snim2 avatar Nov 01 '21 10:11 snim2

I can't believe it doesn't already work that way, if I hadn't found this issue I wouldn't have known until trying marge-bot in production :neutral_face:

You're saying it will currently wait for CI to finish in one MR, merge it, and then rebase the next MR in the queue even if they are on different projects?

nicolas17 avatar May 08 '22 23:05 nicolas17