Skip to content

Commit

Permalink
fix: do not include log option details in Docker logs
Browse files Browse the repository at this point in the history
...to prevent unexpected content to appear in the logs when
interpreting the agent output.
  • Loading branch information
stempler committed Jan 14, 2025
1 parent a39a055 commit a168ee9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/orchestrators/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (o *DockerOrchestrator) DeployAgent(image string, cmd []string, envs []stri
body, err := o.client.ContainerLogs(context.Background(), container.ID, types.ContainerLogsOptions{
ShowStdout: true,
ShowStderr: true,
Details: true,
Details: false,
Follow: true,
})
if err != nil {
Expand Down Expand Up @@ -363,7 +363,7 @@ func (o *DockerOrchestrator) AttachOrphanAgent(containerID, namespace string) (s
body, err := o.client.ContainerLogs(context.Background(), container.ID, types.ContainerLogsOptions{
ShowStdout: true,
ShowStderr: true,
Details: true,
Details: false,
Follow: true,
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/orchestrators/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func TestDockerDeployAgentSuccess(t *testing.T) {
mockDocker.EXPECT().ContainerLogs(context.Background(), "alpha", types.ContainerLogsOptions{
ShowStdout: true,
ShowStderr: true,
Details: true,
Details: false,
Follow: true,
}).Return(ioutil.NopCloser(bytes.NewReader([]byte("foo"))), nil).Times(1)

Expand Down

0 comments on commit a168ee9

Please sign in to comment.