Sharp edges of errgroup: Lessons from an errgroup and Context mishap

A recent faulty release disrupted service for some customers. The root cause was a concurrency bug involving x/sync/errgroup and context cancellation. This post shares three practices we learned from the incident. These practices will help us catch similar issues during code review or alert us to problems in production. What does the buggy code do? I've simplified the program for this post as…