StackStorm / hubot-stackstorm

Hubot plugin for integration with StackStorm event-driven infrastructure automation platform.
Apache License 2.0
49 stars 39 forks source link

st2chatops exits because command doesn't match format string #182

Closed jinpingh closed 5 years ago

jinpingh commented 5 years ago

Version: st2 3.1.0, on Python 3.6.8

Duplicate: With default action alias !pack get <pack>. If run !pack get pack=example, the st2chatops exits with exception.

[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] ERROR Failed to create an alias execution: { name: 'APIError',
  status: 400,
  message:
   'Command "pack get pack=core" doesn\'t match format string "pack get {{ pack }}"' }
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] DEBUG SlackClient#send() room: GJJCKM0HF, message: [object Object]
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] ERROR undefined
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] ERROR {"name":"APIError","status":400,"message":"Command \"pack get pack=core\" doesn't match format string \"pack get {{ pack }}\""}
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] INFO Hubot will shut down ...
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] INFO Disconnected from Slack RTM
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] INFO Exiting...
arm4b commented 5 years ago

Comes from https://github.com/StackStorm/hubot-stackstorm/blob/c692c6e341f436c32b46a4698b2c88b2a9202728/scripts/stackstorm.js#L298-L315

It could be https://github.com/StackStorm/hubot-stackstorm/pull/172 when previous chatops version considered that throw as non-critical and recovered/self-healed by looping further as nothing happened.