Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition when looking up reaper (ryuk) container (#2508)
* If the ryuk container has a health status, wait for a healthy container before returning. * Use docker/types for health status, but also check for the zero value. * Wait for the ryuk port to be available in case the container is still being started by newReaper in a separate process. A race between newReaper and lookUpReaperContainer occurs: - newReaper creates the container with a ContainerRequest.WaitingFor = wait.ForListeningPort(listeningPort) - newReaper starts the container - lookUpReaperContainer obtains the container and returns. - newReaper invokes the readiness hook wait.ForListeningPort(listeningPort). * Fix whitespace. * chore: simplify * chore: make lint * chore: change emoji in log output when waiting * chore: move inside reuseReaper --------- Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
- Loading branch information