Uber SubmitQueue:高性能推测合并队列
Uber SubmitQueue: a high-performance speculative merge queue

原始链接: https://github.com/uber/submitqueue/

**SubmitQueue** 是一款高性能推测式合并队列,旨在为大规模单体仓库(monorepo)维护一个稳定且“通过验证”的主干。通过并行地进行推测性变基与验证,它实现了集成流程的自动化:有效的变更会自动合并,而失败的变更则会被自动隔离并重试,无需人工干预。 该项目的结构设计为:共享平台工具位于 `platform/` 目录下,各领域特定的逻辑则分离在各自的树状结构中。它专为快节奏的团队和复杂的并发开发环境而构建。 **快速开始:** * **环境要求:** Docker 和 Docker Compose。 * **核心命令:** * `make build`:编译项目。 * `make test`:运行单元测试。 * `make local-submitqueue-start`:启动完整的本地堆栈(网关、编排器和 MySQL)。 * `make local-stop`:关闭本地服务。 仓库中包含了涵盖架构、测试模式和贡献指南的详细文档。SubmitQueue 在 Apache License 2.0 协议下进行积极维护。

Uber 近日开源了 **SubmitQueue**,这是一个专为管理大型单体仓库(monorepo)代码变更而设计的高性能投机性合并队列。它通过并行验证多个变更并自动隔离冲突提交,实现了测试与合并过程的自动化,无需人工干预。 此次发布在 Hacker News 上引发了关于单体仓库优劣的热烈讨论。支持者认为,单体仓库通过简化跨项目依赖管理和原子提交,起到了“力量倍增器”的作用。相反,批评者认为单体仓库往往会带来过多的工具开销、开发者工作流的性能瓶颈以及更高的复杂性。 讨论还突显了现有基础设施的局限性。许多用户指出,尽管 GitHub 的合并队列等工具提供了类似功能,但 Uber 的解决方案在处理并行合并顺序方面更为精密。讨论的一个核心议题是,单体仓库需要专门的工具(如“锥形”检出或人工智能辅助的上下文管理)才能在大规模环境下保持可行性。归根结底,社区对此仍存在分歧:一些人视单体仓库为组织协调的必要方案,而另一些人则认为它是“依赖地狱”和开发者体验下降的根源。
相关文章

原文

CI Go Version License

SubmitQueue is a high-performance speculative merge queue that keeps your trunk consistently green at scale. Rather than validating changes one at a time, SubmitQueue speculatively rebases and validates multiple changes in parallel against predicted future states of HEAD. When validations pass, changes land automatically. When they fail, SubmitQueue isolates the offending change and retries the rest — all without human intervention.

Designed for large monorepos and fast-moving teams where concurrent changes can introduce subtle conflicts and destabilize builds.

Cross-domain Go code (errors, metrics, consumer framework, HTTP helpers, shared entities, shared extension contracts) lives under platform/. Each product domain has its own tree (submitqueue/, stovepipe/, …) and grows into gateway/, orchestrator/, entity/, extension/, and domain-local core/ — though a domain may start smaller (Stovepipe is currently a single Ping-only service with just controller/). See CLAUDE.md for conventions and import paths.

Requires Docker and Docker Compose. See Development Setup for full prerequisites.

# Build everything
make build

# Run unit tests
make test

# Start full stack locally (Gateway + Orchestrator + MySQL via Docker Compose)
make local-submitqueue-start

# Test with grpcurl
grpcurl -plaintext -d '{"message": "hello"}' localhost:8081 uber.submitqueue.gateway.SubmitQueueGateway/Ping

# Stop services
make local-stop

See service/README.md for more examples including running individual services and clients.

Document Description
Development Setup Prerequisites, build, environment, IDE setup
Contributing How to contribute, workflow, guidelines
Testing Guide Unit, integration, and E2E testing patterns
Architecture Guide Project layout, patterns, conventions
Examples Running services, clients, API reference
RFCs Design documents and proposals

SubmitQueue is under active development. We welcome contributions and feedback.

See CONTRIBUTING.md for how to get started.

Licensed under the Apache License 2.0.

联系我们 contact @ memedata.com