GitHub Merge Queue Was Step One. Real CI Orchestration Comes Next.
Blog post from Mergify
GitHub's native merge queue addresses the issue of preventing multiple pull requests from breaking the main branch, but as Continuous Integration (CI) becomes slower and more expensive, especially in large monorepos or with Bazel, the challenge evolves from ensuring safety to optimizing throughput, scheduling, and cost control. The merge queue, while effective for small to medium-sized repositories, lacks the capability to handle the complexity of large teams where CI becomes a bottleneck due to long-running jobs, hardware constraints, and the need for efficient resource management. Mergify offers a solution by introducing merge orchestration, which involves batching CI runs, implementing two-step CI to distinguish between fast validations and comprehensive tests, and prioritizing changes to manage hotfixes and incidents effectively. In monorepos, Mergify utilizes scopes to ensure CI jobs only run when relevant parts of the codebase are affected, thereby reducing unnecessary testing and improving CI efficiency. This approach, particularly beneficial for Bazel and hardware-dependent CI processes, shifts the focus from merely merging pull requests to orchestrating the entire CI flow, providing insights into CI performance and transforming merge delays into actionable diagnostics.