Dhall-haskell: Merge automation

Created on 2 Jul 2019  路  6Comments  路  Source: dhall-lang/dhall-haskell

Now that we have a more rapid pace of contributions we need some merge-related automation so that people don't have to babysit their pull requests to get them up-to-date with master, wait for CI to pass, and then merge them.

The solution I'd like to propose is a merge bot of some sort that minimally does the following:

  • If at least one pull request is marked ready for merge, it picks one at a time and takes the chosen pull request to completion

... and optionally performs the following optimizations:

  • If there are N pull requests in flight, create a staging branch containing all N changes and merge that if CI passes
  • If CI fails on that branch, bisect the set of changes and try again on the two halves

The closest open source solution I'm aware of for this is bors-ng, although it doesn't yet appear to support squash merging pull requests. I could also roll such a solution myself if necessary. If people are aware of any other solutions for doing this, just let me know.

Most helpful comment

All 6 comments

If there are N pull requests in flight, create a staging branch containing all N changes and merge that if CI passes

This means N pull requests become one commit? I'm not too easy with that, it makes things like bisection much less effective. It also complicates authorship attribution.

@ocharles: No, if you batch N changes, they would be merged as N commits. What I mean is that each individual pull request would still be squashed to 1 commit each.

Ok, I thought that's what you were intending but I read this bit with "merge" as "squash merge" (as that's what "merge" has meant in this org so far).

create a staging branch containing all N changes and merge that if CI passes

Thanks, just wanted to clarify.

So it appears that Mergify is pretty close to satisfying the first requirement, so we'll go with that for now. The main thing it's missing is picking one pull request to drive to completion to avoid wasting CI resources by repeatedly merging master into candidate branches.

However, I think we should probably invest in speeding up CI first (such as https://github.com/dhall-lang/dhall-haskell/issues/1063) before devoting more resources to improving merge automation. In the worst case we can just let the merge bot run overnight, which is still an improvement over the current situation of people babysitting their pull requests for hours.

Closing, as Mergify seems to work quite well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

quasicomputational picture quasicomputational  路  4Comments

chris-martin picture chris-martin  路  5Comments

kevinjqiu picture kevinjqiu  路  5Comments

SiriusStarr picture SiriusStarr  路  5Comments

Profpatsch picture Profpatsch  路  4Comments