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"
1920kerrors "k8s.io/apimachinery/pkg/api/errors"
2021metav1 "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
274273container , err := options .Selector .SelectSingleContainer (ctx .Context (), ctx .KubeClient (), ctx .Log ())
275274if err != nil {
@@ -501,7 +500,7 @@ func (c *controller) initClient(ctx devspacecontext.Context, pod *v1.Pod, arch,
501500go func () {
502501err := StartStream (ctx .Context (), ctx .KubeClient (), pod , container , upstreamArgs , upStdinReader , upStdoutWriter , true , options .Log )
503502if 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,
529528go func () {
530529err := StartStream (ctx .Context (), ctx .KubeClient (), pod , container , downstreamArgs , downStdinReader , downStdoutWriter , true , options .Log )
531530if 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