在Slack的CI/CD中平衡安全与速度的关系

In 2021, we changed developer testing workflows for Webapp, Slack’s main monorepo, from predominantly testing before merging to a multi-tiered testing workflow after merging. This changed our previous definition of safety and developer workflows between testing and deploys. In this project, we aimed to ensure frequent, reliable, and high-quality releases to our customers for a simpler, more pleasant, and more productive Slack experience.

2021年,我们改变了Slack的主要单机版Webapp的开发者测试工作流程,从合并前的测试为主改为合并后的多层次测试工作流程。这改变了我们之前对测试和部署之间的安全和开发人员工作流程的定义。在这个项目中,我们的目标是确保频繁、可靠、高质量地发布给我们的客户,以获得更简单、更愉快、更高效的Slack体验。

What happens when you discover that a one-line code change results in thousands of tests running in your pull request? And many of these tests are frustratingly flaky end-to-end tests executing complex workflows not related to your change? How do you refactor a development workflow consisting primarily of end-to-end tests, safely?

当你发现一行代码的修改导致成千上万的测试在你的拉动请求中运行时,会发生什么?而这些测试中有许多是令人沮丧的不稳定的端到端测试,执行着与你的修改无关的复杂工作流程?你如何安全地重构一个主要由端到端测试组成的开发工作流程?

Slack engineers began asking these questions due to rising frustration over several years in Webapp, Slack’s main monorepo, where many engineers spend their time. Webapp contains the core application that powers the Slack user experiences of the backend API and asynchronous job queue written in Hacklang, and frontend client written in Typescript. 

Slack的工程师们开始问这些问题,因为几年来Webapp的挫折感不断上升,Webapp是Slack的主要单体程序,许多工程师在这里度过了他们的时间。Webapp包含了为Slack用户体验提供动力的核心应用,包括用Hacklang编写的后端API和异步作业队,以及用Typescript编写的前端客户端。

In 2020, Slack’s developer productivity metrics on velocity provided data for those frustrations:

2020年,Slack关于速度的开发者生产力指标为这些挫折提供了数据。

  • Test turnaround time (p95) was consistently above 30 minutes for individual commits. This measures the time between an engineer pushing a commit to our code repository and test executions completing.
  • 测试周转时间(p95)在单个提交中一直高于30分钟。这是衡量工程师向我们的代码库推送提交和测试执行完成之间的时间。
  • Test flakiness per pull request (PR) was consistently around 50%. This measures the percentage of any single flaky...
开通本站会员,查看完整译文。

Home - Wiki
Copyright © 2011-2024 iteam. Current version is 2.139.0. UTC+08:00, 2024-12-23 09:22
浙ICP备14020137号-1 $Map of visitor$