Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple alias formats not working #3770

Closed
bartwalczak1 opened this issue Sep 28, 2017 · 2 comments
Closed

multiple alias formats not working #3770

bartwalczak1 opened this issue Sep 28, 2017 · 2 comments

Comments

@bartwalczak1
Copy link

I am trying to put multiple formats in single alias

following this --> https://docs.stackstorm.com/chatops/aliases.html#multiple-formats-in-a-single-alias

here's alias I've put together

---
name: "get_ip_address"
pack: "core"
description: "get_ip_address"
action_ref: "core.get_ip_address"
formats:
     - "get ip {{tag_key}} {{tag_value}} {{tag_key2}} {{tag_value2}}"
     - "get ip {{tag_key}} {{tag_value}}"
ack:
 format: "Thinking...\n Execution id: '{{execution.id}}'"
 enabled: false
 append_url: false
result:
 extra:
   slack:
     color: "#00AA00"
     pretext: "Here's your response {{execution.context.api_user}}"
     title: "title"
     text: "optional text"
 format: |
   {{ execution.result.stdout}}

when I hit !st2 get ip ec2_tag_cluster qa-blue I am getting result, but when I hit !st2 get ip ec2_tag_cluster qa-blue a b

I am getting st2 command 'get ip ec2_tag_cluster qa-blue a b' not found. Check help with !st2help

in st2help I can see two formats listed

!st2 get ip {{tag_key}} {{tag_value}} {{tag_key2}} {{tag_value2}} -- get_ip_address
!st2 get ip {{tag_key}} {{tag_value}} -- get_ip_address
@Kami
Copy link
Member

Kami commented Sep 28, 2017

Thanks for reporting this.

It looks like an errobot issue (which is not officially supported by us) - fmnisme/err-stackstorm#11.

Having said that, we should update hubot and any other bot plugin to act just as a very simple and dumb wrapper around the API - all the matching, etc. should be performed server side.

@nzlosh
Copy link
Contributor

nzlosh commented Sep 30, 2017

I've detailed the problem in fmnisme/err-stackstorm#11, but the short version is an actionalias with multiple formats that differ by trailing tags causes ambiguous matches.

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

No branches or pull requests

3 participants