55 "bytes"
66 "context"
77 "fmt"
8- "github.com/loft-sh/devspace/pkg/util/tomb"
9- "github.com/mgutz/ansi"
108 "io"
119 "os"
1210 "path"
@@ -15,6 +13,9 @@ import (
1513 "strings"
1614 "time"
1715
16+ "github.com/loft-sh/devspace/pkg/util/tomb"
17+ "github.com/mgutz/ansi"
18+
1819 "github.com/loft-sh/devspace/pkg/devspace/kubectl/selector"
1920 kerrors "k8s.io/apimachinery/pkg/api/errors"
2021 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -267,9 +268,7 @@ func PrintPodError(ctx context.Context, kubeClient kubectl.Client, pod *v1.Pod,
267268}
268269
269270func (c * controller ) startSync (ctx devspacecontext.Context , options * Options , onInitUploadDone chan struct {}, onInitDownloadDone chan struct {}, onDone chan struct {}, onError chan error ) (* sync.Sync , * selector.SelectedPodContainer , error ) {
270- var (
271- syncConfig = options .SyncConfig
272- )
271+ syncConfig := options .SyncConfig
273272
274273 container , err := options .Selector .SelectSingleContainer (ctx .Context (), ctx .KubeClient (), ctx .Log ())
275274 if err != nil {
@@ -501,7 +500,7 @@ func (c *controller) initClient(ctx devspacecontext.Context, pod *v1.Pod, arch,
501500 go func () {
502501 err := StartStream (ctx .Context (), ctx .KubeClient (), pod , container , upstreamArgs , upStdinReader , upStdoutWriter , true , options .Log )
503502 if err != nil {
504- syncClient .Stop (errors .Errorf ("Sync - connection lost to pod %s/%s: %v" , pod .Namespace , pod .Name , err ))
503+ syncClient .Stop (errors .Errorf ("Upstream Sync - connection lost to pod %s/%s: %v" , pod .Namespace , pod .Name , err ))
505504 }
506505 }()
507506
@@ -529,7 +528,7 @@ func (c *controller) initClient(ctx devspacecontext.Context, pod *v1.Pod, arch,
529528 go func () {
530529 err := StartStream (ctx .Context (), ctx .KubeClient (), pod , container , downstreamArgs , downStdinReader , downStdoutWriter , true , options .Log )
531530 if err != nil {
532- syncClient .Stop (errors .Errorf ("Sync - connection lost to pod %s/%s: %v" , pod .Namespace , pod .Name , err ))
531+ syncClient .Stop (errors .Errorf ("Downstream Sync - connection lost to pod %s/%s: %v" , pod .Namespace , pod .Name , err ))
533532 }
534533 }()
535534
0 commit comments