diff --git a/internal/container/container.go b/internal/container/container.go index 10db9c4..e346506 100644 --- a/internal/container/container.go +++ b/internal/container/container.go @@ -526,10 +526,12 @@ func (a *Client) removeContainer(ctx context.Context, id string) error { if ok { cancel() } else { - // This shouldn't happen, but we prefer the Docker engine to be the - // definitive source of truth and not the cancelFuncs map so don't sweat it - // if it doesn't exist. - a.logger.Warn("removeContainer: cancelFunc not found", "id", shortID(id)) + // It is attempted to keep track of cancel functions for each container, + // which allow clean cancellation of container restart logic during + // removal. But there are legitimate occasions where the cancel function + // would not exist (e.g. during startup check) and in general the state of + // the Docker engine is preferred to local state in this package. + a.logger.Debug("removeContainer: cancelFunc not found", "id", shortID(id)) } a.logger.Info("Stopping container", "id", shortID(id))