Skip to main content
← Back to list
01Issue
BugShippedExtensions
Assigneesstack72

Relationships

#485 @swamp/ssh exec: string host selector only matches 'all', ignores host names and tags

Opened by bixu · 5/29/2026· Shipped 5/29/2026

Description

The exec method on @swamp/ssh accepts a hosts argument with three forms per the schema: "all" (const string), an array of host names, or a plain string. Only "all" and the :json array form work. A plain string matching a host name or tag always returns "Selector matched no hosts."

Steps to reproduce

Given a fleet with hosts named controlplane-fsn1-0 tagged [controlplane, dev]:

# Works
swamp model method run my-fleet exec --input 'hosts=all' --input 'command=hostname'

# Works (array via :json suffix)
swamp model method run my-fleet exec --input 'hosts:json=["controlplane-fsn1-0"]' --input 'command=hostname'

# Fails — "Selector matched no hosts"
swamp model method run my-fleet exec --input 'hosts=controlplane-fsn1-0' --input 'command=hostname'

# Fails — "Selector matched no hosts"
swamp model method run my-fleet exec --input 'hosts=controlplane' --input 'command=hostname'

# Fails — "Invalid selector expression: Unexpected character: ':'"
swamp model method run my-fleet exec --input 'hosts=tag:controlplane' --input 'command=hostname'

Expected behavior

A plain string host selector should match by host name first, then by tag if no name matches. The schema's anyOf with { type: "string", minLength: 1 } implies this is intended but the selector parser doesn't implement it.

Environment

  • swamp version: 20260527.235818.0-sha.ed572875
  • @swamp/ssh typeVersion: 2026.05.19.1
  • OS: macOS Darwin 25.4.0
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

5/29/2026, 2:45:43 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/29/2026, 1:23:05 PM

Sign in to post a ripple.