From 131b59d775344149e3e35f693cd02fd6b240f0cd Mon Sep 17 00:00:00 2001 From: Daniel De Vera Date: Tue, 7 Apr 2026 17:09:18 -0300 Subject: [PATCH 1/2] Add --cluster flag to `signadot plan run` Plans without cluster affinity now require an explicit cluster in the execution request. This adds a --cluster flag that maps to the Cluster field in PlanExecutionSpec. Co-Authored-By: Claude Opus 4.6 (1M context) --- internal/command/plan/run.go | 5 +++-- internal/config/planrun.go | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/command/plan/run.go b/internal/command/plan/run.go index cf15bbc..6243ee8 100644 --- a/internal/command/plan/run.go +++ b/internal/command/plan/run.go @@ -70,8 +70,9 @@ func runPlan(cfg *config.PlanRun, out, log io.Writer, args []string) error { // Create execution. spec := &models.PlanExecutionSpec{ - PlanID: planID, - Params: params, + PlanID: planID, + Cluster: cfg.Cluster, + Params: params, } createParams := planexecs.NewCreatePlanExecutionParams(). WithContext(ctx). diff --git a/internal/config/planrun.go b/internal/config/planrun.go index 50f1bae..3e850a0 100644 --- a/internal/config/planrun.go +++ b/internal/config/planrun.go @@ -11,6 +11,7 @@ type PlanRun struct { // Flags Tag string + Cluster string Params TemplateVals Wait bool Attach bool @@ -20,6 +21,7 @@ type PlanRun struct { func (c *PlanRun) AddFlags(cmd *cobra.Command) { cmd.Flags().StringVar(&c.Tag, "tag", "", "run the plan referenced by this tag (alternative to plan ID argument)") + cmd.Flags().StringVar(&c.Cluster, "cluster", "", "target cluster for the execution") cmd.Flags().Var(&c.Params, "param", "parameter in key=value form (can be repeated)") cmd.Flags().BoolVar(&c.Wait, "wait", true, "wait for execution to complete") cmd.Flags().BoolVar(&c.Attach, "attach", false, "stream structured events (logs, outputs, result) to stdout") From cdbf025239e43612b0d46291abcab7773bf549ca Mon Sep 17 00:00:00 2001 From: Daniel De Vera Date: Tue, 7 Apr 2026 17:13:02 -0300 Subject: [PATCH 2/2] Update go-sdk to v0.3.8-0.20260407201055-78b3ac589bac Picks up the latest SDK with cluster field support in PlanExecutionSpec. Co-Authored-By: Claude Opus 4.6 (1M context) --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 9358d34..8ad8700 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 github.com/oklog/run v1.1.0 github.com/panta/machineid v1.0.2 - github.com/signadot/go-sdk v0.3.8-0.20260402222445-b8b5bc1f40c0 + github.com/signadot/go-sdk v0.3.8-0.20260407201055-78b3ac589bac github.com/signadot/libconnect v0.1.1-0.20260224205539-f894c2d0a57e github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.11.0 @@ -146,9 +146,9 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect - go.opentelemetry.io/otel v1.42.0 // indirect - go.opentelemetry.io/otel/metric v1.42.0 // indirect - go.opentelemetry.io/otel/trace v1.42.0 // indirect + go.opentelemetry.io/otel v1.43.0 // indirect + go.opentelemetry.io/otel/metric v1.43.0 // indirect + go.opentelemetry.io/otel/trace v1.43.0 // indirect golang.org/x/crypto v0.49.0 // indirect golang.org/x/oauth2 v0.32.0 // indirect golang.org/x/sys v0.42.0 // indirect diff --git a/go.sum b/go.sum index 585bebe..5cb5c6f 100644 --- a/go.sum +++ b/go.sum @@ -422,8 +422,8 @@ github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA= github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/signadot/go-sdk v0.3.8-0.20260402222445-b8b5bc1f40c0 h1:CpkTVrKonGpInT2p5p1cWihob4Nh1rYM52CrTqQS+sI= -github.com/signadot/go-sdk v0.3.8-0.20260402222445-b8b5bc1f40c0/go.mod h1:2+pvoCGoDDO+iPUmUuU2BjYHByHp3IDQ9k3o0liibb4= +github.com/signadot/go-sdk v0.3.8-0.20260407201055-78b3ac589bac h1:1cBD9AGWryF0nBRfthHTn2xWoJ1QAByYCPXrg6ABLPQ= +github.com/signadot/go-sdk v0.3.8-0.20260407201055-78b3ac589bac/go.mod h1:fnd1F9wgQ9He3VtTFU0luNTxyYimxjP0GmGqCvqsR2M= github.com/signadot/libconnect v0.1.1-0.20260224205539-f894c2d0a57e h1:NiYn5S3cMIhsGh3RzBgRg9NzLDG5qEP7uhSJKtwW7oc= github.com/signadot/libconnect v0.1.1-0.20260224205539-f894c2d0a57e/go.mod h1:cAsgAummH9Q9DrLQ7+S3mqrBv/+ZYKVSEXjR/WfoUJM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -484,16 +484,16 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.42.0 h1:lSQGzTgVR3+sgJDAU/7/ZMjN9Z+vUip7leaqBKy4sho= -go.opentelemetry.io/otel v1.42.0/go.mod h1:lJNsdRMxCUIWuMlVJWzecSMuNjE7dOYyWlqOXWkdqCc= -go.opentelemetry.io/otel/metric v1.42.0 h1:2jXG+3oZLNXEPfNmnpxKDeZsFI5o4J+nz6xUlaFdF/4= -go.opentelemetry.io/otel/metric v1.42.0/go.mod h1:RlUN/7vTU7Ao/diDkEpQpnz3/92J9ko05BIwxYa2SSI= +go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= +go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= +go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= +go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= go.opentelemetry.io/otel/sdk v1.41.0 h1:YPIEXKmiAwkGl3Gu1huk1aYWwtpRLeskpV+wPisxBp8= go.opentelemetry.io/otel/sdk v1.41.0/go.mod h1:ahFdU0G5y8IxglBf0QBJXgSe7agzjE4GiTJ6HT9ud90= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= -go.opentelemetry.io/otel/trace v1.42.0 h1:OUCgIPt+mzOnaUTpOQcBiM/PLQ/Op7oq6g4LenLmOYY= -go.opentelemetry.io/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc= +go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= +go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=