You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ st2 action-alias match 'pack install vsphere'
ERROR: 400 Client Error: Bad Request
MESSAGE: Command 'pack install vsphere' matched more than 1 pattern for url: http://127.0.0.1:9101/v1/actionalias/match
This is also confusing because st2 action-alias match --help says it should return a list of matching aliases, when instead it either returns a single alias or it errors out if multiple are found.
$ st2 action-alias match --help
usage: st2 action-alias match [-h] [-t TOKEN] [--api-key API_KEY] [-j] [-y]
[-a ATTR [ATTR ...]] [-w WIDTH [WIDTH ...]]
command
Get the list of action aliases that match the command text.
SUMMARY
Noticed by
@ravi
on Slack.When running
st2 action-alias match 'pack install vsphere'
multiple action-aliases are matched, causing an error.This is confusing in two ways:
st2 action-alias match
says it returns a list of matching aliases, but instead it either returns one or it errors.ISSUE TYPE
STACKSTORM VERSION
OS / ENVIRONMENT / INSTALL METHOD
STEPS TO REPRODUCE
$ st2 action-alias match 'pack install vsphere'
EXPECTED RESULTS
ACTUAL RESULTS
This is also confusing because
st2 action-alias match --help
says it should return a list of matching aliases, when instead it either returns a single alias or it errors out if multiple are found.INVESTIGATION
It appears that the action-alias
packs.pack_install
has redundant patterns defined: /~https://github.com/StackStorm/st2/blob/master/contrib/packs/aliases/pack_install.yaml#L7-L12I think the simplest fix is to remove the redundant pattern and change the display text for the one that is left behind.
The text was updated successfully, but these errors were encountered: