Linear团队近期重新设计了持续集成系统,以应对AI驱动编码加速所带来的验证延迟问题1。随着AI agents使代码发布速度呈指数级提升,原有CI流程的速度未能跟上,成为开发效率的制约因素1。
团队通过四个主要方向推进优化:升级基础设施、优化关键路径任务、减少重复设置和提高测试执行效率1。具体措施包括迁移至第三方运行器后作业平均速度提升34%、tsc性能提升52%1;切换至tsgo原生TypeScript编译器,周中位数tsc检查时间减少73%1;通过减少8个独立检查步骤中的重复设置,每月节省约87,000运行分钟1。这些改进使API代码检查时间减少68%,全仓库代码检查时间减少55%1。
在测试执行层面,团队将Vitest从3个分片优化到8个分片,关键作业速度提升约19%,成本同步降低19%1。禁用完整隔离后(vitest isolate: false),最慢分片从300-379秒降至约195秒,总runner时间从32.8分钟降至22分钟1。最终成效显著:PR等待时间从超过6分钟降至刚过5分钟,单位测试运行时间减少近一半1。这些优化在测试套件自年初增加近四倍的情况下完成1,目前团队每周还在增加约2,000个测试1。
The rapid adoption of AI agents has dramatically accelerated code release velocity, but the verification infrastructure has struggled to keep pace. 1 Linear's engineering team identified continuous integration as a critical bottleneck and implemented a comprehensive overhaul across four dimensions to restore system balance.
Through infrastructure upgrades, optimization of critical path tasks, elimination of redundant setup procedures, and improved test execution efficiency, Linear reduced pull request wait times from over six minutes to just above five minutes. 1 Unit test execution time was cut by nearly half during the same period. 1 The team achieved these gains even as their test suite expanded by nearly four times since the beginning of the year. 1
Infrastructure improvements delivered immediate performance gains. After migrating to a third-party runner, average job speed improved by 34 percent, with TypeScript compilation performance jumping 52 percent. 1 Switching to tsgo, a native TypeScript compiler, reduced median type-checking time during the week by 73 percent. 1 Code analysis also saw substantial improvements: API checking time decreased 68 percent while repository-wide checks dropped 55 percent. 1
The team eliminated duplication across eight independent check steps, saving approximately 87,000 runner minutes per month. 1 Vitest test distribution was expanded from three shards to eight shards, boosting critical job speed by roughly 19 percent while lowering costs by the same margin. 1 Disabling full isolation in Vitest reduced the slowest shard from 300–379 seconds to approximately 195 seconds, bringing total runner time down from 32.8 minutes to 22 minutes. 1 The test suite continues to grow, adding approximately 2,000 tests weekly. 1
评论
还没有评论,欢迎留下第一条。