You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/10/28 12:07:16 UTC

[skywalking-infra-e2e] branch main updated: Ignore cancel error when copying container logs (#88)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git


The following commit(s) were added to refs/heads/main by this push:
     new 41156cd  Ignore cancel error when copying container logs (#88)
41156cd is described below

commit 41156cdce74a47aff0fb469af154ad3dddf9b76d
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Oct 28 20:07:11 2022 +0800

    Ignore cancel error when copying container logs (#88)
---
 internal/components/setup/compose.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/internal/components/setup/compose.go b/internal/components/setup/compose.go
index e6d7a9e..7b799ae 100644
--- a/internal/components/setup/compose.go
+++ b/internal/components/setup/compose.go
@@ -20,6 +20,7 @@ package setup
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"os"
 	"regexp"
@@ -226,7 +227,7 @@ func exposeComposeLog(cli *client.Client, service *ComposeService, containerID s
 
 	go func() {
 		defer writer.Close()
-		if _, err := stdcopy.StdCopy(writer, writer, logs); err != nil {
+		if _, err := stdcopy.StdCopy(writer, writer, logs); err != nil && !errors.Is(err, context.Canceled) {
 			logger.Log.Warnf("write %s std log error: %v", service.Name, err)
 		}
 	}()