Skip to content

st2 run packs.install should register all pack components by default #1619

@arm4b

Description

@arm4b

It seems related to recent: Action aliases are registered by default. (improvement) change.

The problem I'm experiencing in chatops is that not everything loaded/unloaded when running install/uninstall for packs. It's just nice to have install/uninstall process complete, so user shouldn't care about low-level details.

My behavior:

  • st2 run packs.install packs=hubot
  • install, configure and run hubot with hubot-stackstorm
  • expect that I get command output from st2 in chat !pack info hubot
  • because chatops.notify_hubot rule shipped with hubot pack wasn't registered - I don't get any output in chat

I think install could do all the things by default, not only register actions. Maybe I'm missing some use cases here when only actions should be registered?


Related problem for uninstall. It could be better if that command unload all pack contents as well.

st2 run packs.uninstall packs=hubot
...

After uninstall there is still rule registered:

st2 rule list -p hubot
+----------------------------+-------+----------------------+------------------------------------------+
| ref                        | pack  | name                 | description                              |
+----------------------------+-------+----------------------+------------------------------------------+
| hubot.chatops.notify_hubot | hubot | chatops.notify_hubot | Notification rule to send messages to    |
|                            |       |                      | Hubot                                    |
+----------------------------+-------+----------------------+------------------------------------------+

Third problem,
seems action-aliases are still not registered:

st2 run packs.install packs=st2-google repo_url=jfryman/st2-google
...
st2 action-alias list | grep google
# no action aliases registered

These commits might be related: [ 1 ] [ 2 ]


^^ Tested on latest version.

st2 --version
st2 ('0.12dev.31',)

If that makes sense I can submit PR and verify & test everything again. My intent is to install/uninstall st2 packs in chatops way without any additional steps.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions