conda / infrastructure

A repo to report issues and have discussions about the conda infrastructure
BSD 3-Clause "New" or "Revised" License
11 stars 15 forks source link

Consider using GitHub merge queues #867

Open jezdez opened 6 months ago

jezdez commented 6 months ago

Checklist

What is the idea?

We should consider using Github's merge queue for our pull requests to solve the problem of having to update all the time which leads to many additional CI runs.

Why is this needed?

To quote the docs:

The merge queue provides the same benefits as the Require branches to be up to date before merging branch protection, but does not require a pull request author to update their pull request branch and wait for status checks to finish before trying to merge.

That's possible because upon adding a pull request to the merge queue, another CI run is triggered that, if successful, will automatically merge into the main branch. And if unsuccessful shows up as a regular CI failure in the pull request.

The main advantage is that we would automate the coordination of merging potentially competing branches into main. The merge queue sequentially goes through the queue and builds all queued merges, but there is a way to bump a specific merge via an own user interface in case of an important change.

What should happen?

We should start by enabling the merge queue in our branch protection setup for the main branch (not release branches given the much less likely controversial changes).

We could also run longer running tests (optionally) for each merge queue item with different strategies, e.g.

Additional Context

xhochy commented 6 months ago

We could also run longer running tests (optionally) for each merge queue item with different strategies, e.g.

Do you have a working example of this? I'm a happy user of merge queue, but I would to understand on how to implement this correctly.

jezdez commented 6 months ago

We could also run longer running tests (optionally) for each merge queue item with different strategies, e.g.

Do you have a working example of this? I'm a happy user of merge queue, but I would to understand on how to implement this correctly.

No working example in conda/*, I've only experimented based on what I've read about the merge_group event. Generally speaking it, I imagine a separate workflow file that would only listen to the merge_group event and not the pull_request or push events, which would run additional tests, e.g. integration tests.

dbast commented 6 months ago

There is a lot to say to this:

tldr; running pre-commit via merge-queue is nice (and also fast), requiring branch to be up to date can be removed then, and job chaining can save resources ... I personally enjoy merge queues with 1-2 minutes lengths, even 20sec more or less have consequences to how productive one feels.