From eff59a86fdcd069729f63e34b4eebedf6104d636 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Fri, 24 Oct 2025 23:41:33 +0200 Subject: [PATCH] Remove proxy, logger and process init from UnmarshalJSON --- pkg/instance/instance.go | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 0bfaec5..1f0afc8 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -319,38 +319,5 @@ func (i *Instance) UnmarshalJSON(data []byte) error { i.status = aux.Status i.options = aux.Options - // Handle options with validation and defaults - if i.options != nil { - opts := i.options.get() - if opts != nil { - opts.validateAndApplyDefaults(i.Name, i.globalInstanceSettings) - } - } - - // Initialize fields that are not serialized or may be nil - if i.status == nil { - i.status = newStatus(Stopped) - } - if i.options == nil { - i.options = newOptions(&Options{}) - } - - // Recreate the proxy - var err error - i.proxy, err = newProxy(i) - if err != nil { - log.Println("Warning: Failed to create proxy for instance", i.Name, "-", err) - } - - // Only create logger, proxy, and process for non-remote instances - if !i.IsRemote() { - if i.logger == nil && i.globalInstanceSettings != nil { - i.logger = newLogger(i.Name, i.globalInstanceSettings.LogsDir) - } - if i.process == nil { - i.process = newProcess(i) - } - } - return nil }