Live data from Hacker News

A Two Month Debugging Story

kev.inburke.com

41–45 of 45 posts

Re: A Two Month Debugging Story

#41
post #21

What we do when we detect a failure is freeze the test runner instance, and allocate the same failed test to another runner. If the second runner succeeds, we okay the build, but we put the test and the frozen runner in a queue for investigation, and some engineer will be responsible for diagnosing and fixing this intermittent test. This queue is worked every day on a rotating schedule. We run our own CI/CD infrastru…

Has this strategy worked perfectly so far? I would imagine a best two of three method would work better like those used for integrity in high radiation environments. However, I'm guessing code is significantly more deterministic and the danger of false positives (tests passing when they shouldn't) is much smaller.

This has worked well for many years. Most of the intermittently failing tests are older, from before we had robust dependency injection, and they get incrementally improved this way.

False positives are also super costly for us, as everyone works on trunk (by design, to avoid skew) and deploys all ckeckins directly to production. "Best out of two" is sufficient for the old tests, and if someone creates new intermittent tests, we follow up with education so that isn't a persistent problem.

Re: A Two Month Debugging Story

#42
post #24

Earlier quoted context omitted.

Why does your test infrastructure allow a schema that doesn't match production? Seems like low hanging fruit there!

Sorry - that was a few months ago, we replaced it as soon as feasible. We had to upgrade a lot of tests to make it work with our prod schema

Right. In the best of worlds, your tests just apply the production schema update on start, and similarly you apply checked in schemas ASAP to production after passing tests!

Re: A Two Month Debugging Story

#43
I thought instead of telling you to drop your test suite, switch your ORM, or something equally as crazy I would rather just empathize. I'm glad you guys figured it out. We all have these kind of bugs that drive us insane. We all have those difficult to test bugs that can't be reliably reproduced. The feeling when you finally solve them is amazing. So congrats on finding that crazy bug!

Re: A Two Month Debugging Story

#44
Writing 6000 integration and unit tests can be avoided by using purely functional statically-typed languages. There are some that even compile to JS, such as PureScript. Most of what typical JS tests check can be expressed with pure functions and types.
Post reply on HN