在Lyft的微服务上扩大生产力(第二部分)。为快速的本地开发进行优化
This is the second post in the series on how we scaled our development practices at Lyft in the face of an ever-increasing number of developers and services.
这是关于我们如何在面对越来越多的开发者和服务时扩大我们在Lyft的开发实践系列的第二篇文章。
This post will focus on how we brought a great development experience right to the laptop to allow for super fast iteration.
这篇文章将重点介绍我们如何把优秀的开发经验直接带到笔记本电脑上,以实现超快的迭代。
The missing inner dev loop
缺少的内部开发循环
One way to think about the process a developer may follow when making a code change is to break it down into an inner and outer dev loop. The inner dev loop is the quick cycle of iteration of making a code change and testing if it worked. Ideally a developer will execute the inner dev loop many times to get their feature working and most time should be spent editing code followed by quickly running tests in 10s of seconds. The outer dev loop usually involves syncing your code change to a remote git branch, running tests on CI and getting code review before a change is deployed.The outer dev loop usually takes at least 10s of minutes and is ideally completed only a handful of times to address code review comments.
思考开发人员在进行代码修改时可能遵循的流程的一种方式是将其分解为内部和外部开发循环。内部开发循环是快速迭代的循环,即进行代码修改并测试它是否有效。理想情况下,开发人员会多次执行内部开发循环以使他们的功能正常工作,大部分时间应该花在编辑代码上,然后在十几秒内快速运行测试。外部开发循环通常包括将你的代码修改同步到远程git分支,在CI上运行测试,并在修改部署前获得代码审查。外部开发循环通常需要至少10分钟,最好只完成少数几次以处理代码审查意见。
As we mentioned in the previous post, executing the inner dev loop used to require syncing your code changes to a developer’s own environment running on a remote VM called Onebox. These environments were notoriously fickle, with long startup times and needed to be rebuilt frequently. Users were constantly frustrated that their inner dev loop was often impeded by these environment issues. The need for environment spin up and syncing code changes made this process look more like the outer dev loop. Developers would often fall back on the actual outer dev loop and use CI to run tests for each iteration they made.
正如我们在上一篇文章中提到的,执行内部开发循环过去需要将你的代码变化同步到开发人员自己的环境中,该环境运行在一个叫做Onebox的远程虚拟机上。这些环...