Live data from Hacker News

Ask HN: How Long Is Your CI Process?

news.ycombinator.com

41–50 of 81 posts

Re: Ask HN: How Long Is Your CI Process?

#41

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…

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?

#42
post #34
post #29

Automated 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?

Yes, this is for the Kythe (née Grok) team at Google. We build a giant cross reference graph of the codebase. So - most teams don't have to build the whole codebase, but the Kythe team does.

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?

#43
Large ruby on rails application. Entire test suite takes around 40 minutes to run, however we use circleCI and parallelize the build so realtime is around 10 minutes.

What 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?

#44
post #25
post #22

Earlier 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

[deleted]

Re: Ask HN: How Long Is Your CI Process?

#45
post #25
post #22

Earlier 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?

#46
From 2 minutes to 10 minutes. We have mostly Go microservices so building is fast.

The 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?

#47
post #41

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…

I could imagine that is only true for non-Cloud systems, where you can mock stuff locally.

You can always mock locally. And you should always do it, your tests should not depend on externalities.

Re: Ask HN: How Long Is Your CI Process?

#48
CICD systems deliver value to audiences. CI is mostly for the developer team, so you can check your changes don't break other's work, or vice versa. Often there's a CD to an internal system, so QA can take a look to see the new feature works according to the business expectations, and the business can play with it.

None 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?

#49

A 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…

I’d be wild about anything that could trace our Cypress tests against our frontend and our nodejs microservices.

Re: Ask HN: How Long Is Your CI Process?

#50
post #41

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…

I could imagine that is only true for non-Cloud systems, where you can mock stuff locally.

The system I described is actually a cloud system, and we had both stubs and mocks of all our dependences (which is easy, because they were other cloud systems and we could easily stand up a fake service with the same API when doing integration tests, or switch to use local data when doing unit tests).

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).

Post reply on HN