From dbf7b522e0146d0341b434c2a5e094645d716de7 Mon Sep 17 00:00:00 2001 From: rvasikarla Date: Sun, 5 Apr 2026 17:15:49 -0500 Subject: [PATCH] fix: noWatch sync no longer prevents SSH injection When a sync config has noWatch: true, the sync goroutine completes after initial sync and defer-cancels its context. This triggers the RestartOnError handler which calls parent.Kill(nil), putting the tomb in a dying state. Since SSH starts after sync completes (it waits on <-syncDone), the killed tomb prevents SSH from starting. Fix: set RestartOnError to false when NoWatch is true. A one-shot sync has no need for restart-on-error handling, and this prevents the handler from killing the parent tomb on context cancellation. Fixes #3005 --- pkg/devspace/services/sync/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/devspace/services/sync/sync.go b/pkg/devspace/services/sync/sync.go index e2dcb88c28..e1c740b138 100644 --- a/pkg/devspace/services/sync/sync.go +++ b/pkg/devspace/services/sync/sync.go @@ -124,7 +124,7 @@ func startSync(ctx devspacecontext.Context, name, arch string, syncConfig *lates Arch: arch, Starter: starter, - RestartOnError: true, + RestartOnError: !syncConfig.NoWatch, Verbose: ctx.Log().GetLevel() == logrus.DebugLevel, }