Skip to content

Commit

Permalink
docker:fix - missing image name on debug log (#1026)
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
(cherry picked from commit f4d13a6)
  • Loading branch information
matheusalcantarazup authored and nathanmartinszup committed Mar 11, 2022
1 parent 748d681 commit a0c13d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/services/docker/docker_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,14 @@ func (d *API) logStatusAndExecuteCRDContainer(imageNameWithTag, cmd string) (con
return containerOutput, nil
}

// nolint:funlen
func (d *API) executeCRDContainer(imageNameWithTag, cmd string) (containerOutput string, err error) {
containerID, err := d.createContainer(imageNameWithTag, cmd)
if err != nil {
return "", err
}

d.loggerAPIStatusWithContainerID(messages.MsgDebugDockerAPIContainerWait, imageNameWithTag, containerID)
containerOutput, err = d.readContainer(containerID)
if err != nil {
return "", err
Expand Down Expand Up @@ -272,8 +274,6 @@ func (d *API) getImageID() string {

// nolint: funlen
func (d *API) readContainer(containerID string) (string, error) {
d.loggerAPIStatusWithContainerID(messages.MsgDebugDockerAPIContainerWait, "", containerID)

chanContainerStatus, _ := d.dockerClient.ContainerWait(d.ctx, containerID, "")

if containerWaitStatus := <-chanContainerStatus; containerWaitStatus.Error != nil {
Expand Down

0 comments on commit a0c13d2

Please sign in to comment.