Skip to content

Add --cluster, --sandbox, and --route-group flags to plan run#316

Merged
daniel-de-vera merged 3 commits intofeature-planfrom
feature-plan-cluster
Apr 9, 2026
Merged

Add --cluster, --sandbox, and --route-group flags to plan run#316
daniel-de-vera merged 3 commits intofeature-planfrom
feature-plan-cluster

Conversation

@daniel-de-vera
Copy link
Copy Markdown
Contributor

@daniel-de-vera daniel-de-vera commented Apr 7, 2026

Summary

  • Add --cluster flag to signadot plan run for explicit cluster selection
  • Add --sandbox and --route-group mutually exclusive flags that translate to the correct plan param based on cluster affinity (FromAnyTarget for polymorphic JSON, FromSandbox/FromRouteGroup for plain strings)
  • Consolidate plan resolution into a single resolvePlan function that returns the full RunnablePlan, avoiding a double fetch when using --tag
  • Update go-sdk to pick up FromAnyTarget, RoutingTarget, and related types

Related to https://github.com/signadot/signadot/pull/6863.

Stacked on #313.

Test plan

  • signadot plan run --help shows --cluster, --sandbox, --route-group flags
  • --sandbox and --route-group are mutually exclusive
  • signadot plan run <id> --cluster <name> sends cluster in the execution request
  • signadot plan run <id> --sandbox <name> sets the correct param based on plan's cluster affinity
  • signadot plan run <id> --route-group <name> sets the correct param based on plan's cluster affinity
  • --sandbox on a plan with FromAnyTarget marshals as {"sandbox": "..."} JSON
  • --sandbox on a plan with FromSandbox sets a plain string param
  • --sandbox on a plan with no sandbox affinity returns a clear error

🤖 Generated with Claude Code

daniel-de-vera and others added 2 commits April 7, 2026 17:09
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) <noreply@anthropic.com>
Picks up the latest SDK with cluster field support in PlanExecutionSpec.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add --sandbox and --route-group mutually exclusive flags that translate
  to the correct plan param based on cluster affinity (FromAnyTarget for
  polymorphic JSON, FromSandbox/FromRouteGroup for plain strings)
- Consolidate resolvePlanID + fetchPlanSpec into resolvePlan, which
  returns the full RunnablePlan (avoiding double fetch when using --tag)
- Update go-sdk to v0.3.8-0.20260409131400-73b58199c972 for
  FromAnyTarget and RoutingTarget types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@daniel-de-vera daniel-de-vera changed the title Add --cluster flag to plan run and update go-sdk Add --cluster, --sandbox, and --route-group flags to plan run Apr 9, 2026
@daniel-de-vera
Copy link
Copy Markdown
Contributor Author

@scott-cotton, updated this PR against https://github.com/signadot/signadot/pull/6863, PTAL.

Copy link
Copy Markdown
Member

@scott-cotton scott-cotton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daniel-de-vera daniel-de-vera merged commit 9163e24 into feature-plan Apr 9, 2026
@daniel-de-vera daniel-de-vera deleted the feature-plan-cluster branch April 9, 2026 14:26
@davixcky davixcky mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants