The latency of your CI process doesn't matter[1]. What matters is the development process - local build & test should be fast. Otherwise, with CI/CD, it's a continually-moving release train where changes get pushed, built, tested, and deployed non-stop and automatically without human intervention. Once you remove humans from the process, and you have guard rails (quality) built into the process, it doesn't matter if…
Ask HN: How Long Is Your CI Process?
41–50 of 81 posts
Re: Ask HN: How Long Is Your CI Process?
#42Automated tests that my team runs vary from ~seconds to multiple days , depending on what's being tested. Some of the tests involve compiling a multi-billion line repo using over 30+ languages, and doing some analysis on the resulting code graph. So that takes awhile. 30-45 minutes just for a simple test suite, even if it's PHP, Python, and Ruby - that sounds long. But without any details on exactly what's being test…
Multi-billion? Wow. Google? Microsoft?
Here is a somewhat outdated talk given by our tech lead: https://www.youtube.com/watch?v=VYI3ji8aSM0. That doesn't really get into any of the CI/CD stuff though, I don't know what if any of that stuff is publicly shareable.
Re: Ask HN: How Long Is Your CI Process?
#43What makes the build so slow is that the database is involved, if you want fast builds decouple your unit tests from the database. With rails including the database access in tests makes everything easier and you get closer to real-life execution but slow ...
Re: Ask HN: How Long Is Your CI Process?
#44Earlier quoted context omitted.
Well, building Linux kernel takes 20s if you have the right machine https://openbenchmarking.org/test/pts/build-linux-kernel And that's some many millions lines of C code. Computing is fast these days.
Yea, computing is fast but @jart is also hella good with computers. This CI has two advantages. edit: this will blow your mind https://justine.lol/ape.html
Re: Ask HN: How Long Is Your CI Process?
#45Earlier quoted context omitted.
Well, building Linux kernel takes 20s if you have the right machine https://openbenchmarking.org/test/pts/build-linux-kernel And that's some many millions lines of C code. Computing is fast these days.
Yea, computing is fast but @jart is also hella good with computers. This CI has two advantages. edit: this will blow your mind https://justine.lol/ape.html
Re: Ask HN: How Long Is Your CI Process?
#46The pipeline is: build, unit test, lint in parallel, then package and save the relevant artifacts, then build a Docker image, then run the integration tests, and finally deploy (staging, dev or prod depending on the branch).
We also have end to end tests that run periodically and are a bit longer, but they're not on the path to prod.
Re: Ask HN: How Long Is Your CI Process?
#47The latency of your CI process doesn't matter[1]. What matters is the development process - local build & test should be fast. Otherwise, with CI/CD, it's a continually-moving release train where changes get pushed, built, tested, and deployed non-stop and automatically without human intervention. Once you remove humans from the process, and you have guard rails (quality) built into the process, it doesn't matter if…
I could imagine that is only true for non-Cloud systems, where you can mock stuff locally.
Re: Ask HN: How Long Is Your CI Process?
#48None of the above really matters, the important bit is that USERS actually see the work! Everything else is necessary, of course, but doesn't create value in itself.
So, the question is, how does each system create VALUE for its audience, and what's the latency (LAG)? CI is often for 4-10 developers, and takes ~10-20 minutes for smallish web shops. The value the business gets is that devs can check they didn't forget to "git add" a file :)
Devs and the business always complain about the slowness of CICD, but rarely invest the modest effort to make it faster. Here are some ways to improve the development cycle:
Speed up databases. Move from "install database and sample data interactively every time" to having a pre-baked Docker image with the database and seed data. Much faster: you get lower LAG and the same VALUE for the team.
Run fewer tests. Running tests creates business value -- confidence a deployment will give features to users -- but takes time (LAG). However, for 90% of the cases Devs get value by running a subset of the tests. Thus, much faster: less LAG, same VALUE. Run all the tests before a real deploy, or run the full suite nightly. Devs get the value of a full test without having to wait for it.
Simplify. CICD should just run things Devs can run locally. That is, Devs can run fast local test subsets to get rapid feedback (low LAG), and get focused VALUE. When CICD tests fail, it's very easy for Devs to figure out what went wrong, because CICD and local environments are nearly identical.
CICD creates a lot of value for several audiences. Plot out each one, and see what you, the business, want to improve upon!
Re: Ask HN: How Long Is Your CI Process?
#49A lot of the drag on CI for complex projects is tests, which are hard to argue against. Complexity : need for tests isn't linear -- once you hit some critical mass of complexity where one person can't know the whole application, the need for tests skyrockets. I joined a company last year that's trying to solve this [1] by tracing tests so it can skip any whose dependencies (functions, environment variables, etc.) hav…
Re: Ask HN: How Long Is Your CI Process?
#50The latency of your CI process doesn't matter[1]. What matters is the development process - local build & test should be fast. Otherwise, with CI/CD, it's a continually-moving release train where changes get pushed, built, tested, and deployed non-stop and automatically without human intervention. Once you remove humans from the process, and you have guard rails (quality) built into the process, it doesn't matter if…
I could imagine that is only true for non-Cloud systems, where you can mock stuff locally.
We also performed testing against live dependencies but with test accounts to ensure that our stubs/mocks were accurate and up-to-date, and captured realistic interactions (and failures).
I've done the same with hardware systems, again using stubs/mocks of HW dependencies for unit tests and then using actual HW for integration testing.
The time spent investing in stubs/mock quickly pays dividends in both increased development speed and test coverage, especially as you can inject faults and failures (bad data, timeouts, auth failures, corruption, etc).