diff --git a/VERSION b/VERSION index a09fb81..0ec315c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.122.14 +0.122.15 diff --git a/core/pkg/cli/production/upgrade/remote.go b/core/pkg/cli/production/upgrade/remote.go index 9e8ec9a..09f9211 100644 --- a/core/pkg/cli/production/upgrade/remote.go +++ b/core/pkg/cli/production/upgrade/remote.go @@ -67,9 +67,41 @@ func (r *RemoteUpgrader) Execute() error { return nil } -// upgradeNode runs `orama node upgrade --restart` on a single remote node. +// upgradeNode runs `orama node upgrade --restart` on a single remote node, +// forwarding the per-node flags the operator passed locally (--with-ntfy, +// --nameserver, --force, --skip-checks) so the remote orchestrator sees the +// same intent. Without this forwarding, the remote command would always use +// the saved preference, silently dropping operator overrides like +// `--with-ntfy` on the floor. func (r *RemoteUpgrader) upgradeNode(node inspector.Node) error { sudo := remotessh.SudoPrefix(node) cmd := fmt.Sprintf("%sorama node upgrade --restart", sudo) + + // Tri-state pointer flags: forward only when explicitly set locally. + // nil = "honor saved preference on the remote" — don't pass anything. + if r.flags.NtfyHost != nil { + if *r.flags.NtfyHost { + cmd += " --with-ntfy" + } else { + cmd += " --with-ntfy=false" + } + } + if r.flags.Nameserver != nil { + if *r.flags.Nameserver { + cmd += " --nameserver" + } else { + cmd += " --nameserver=false" + } + } + + // Plain booleans: forward when true. False is the default everywhere + // so no need to send `=false` explicitly. + if r.flags.Force { + cmd += " --force" + } + if r.flags.SkipChecks { + cmd += " --skip-checks" + } + return remotessh.RunSSHStreaming(node, cmd) } diff --git a/sdk/package.json b/sdk/package.json index 58579a9..707d942 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@debros/orama", - "version": "0.122.14", + "version": "0.122.15", "description": "TypeScript SDK for Orama Network - Database, PubSub, Cache, Storage, Vault, and more", "type": "module", "main": "./dist/index.js",