complement icon indicating copy to clipboard operation
complement copied to clipboard

container logs not flushed if there is a timeout spinning up a container

Open richvdh opened this issue 3 years ago • 1 comments

#392 added a ContainerStop to Deployer.Destroy, so that the container has a chance to gracefully shut down and flush its logs before we print them.

However, we print the logs in a couple of other situations:

  • in Deployer.Deploy, if there is a timeout waiting for the container to be ready. (In this case it looks like we don't destroy the container at all?)
  • in Builder.ConstructBlueprint (via Builder.construct).

In both these cases, the logs are printed before the container is stopped.

richvdh avatar Sep 29 '22 11:09 richvdh

I don't really understand why we have three different code paths for this, but in any case, it looks like moving the call to ContainerStop into printLogs will solve the problem.

richvdh avatar Sep 29 '22 11:09 richvdh