Inconsistent argument naming in salt.modules.slack_notify.call_hook #58845
Labels
doc-param-missing
parameters are missing in the docs
doc-request
net new docs requested
Documentation
Relates to Salt documentation
severity-high
2nd top severity, seen by most users, causes major problems
slack
All salt stuff for slack
time-estimate-sprint
Projects
Milestone
Description
To use the function call_hook in the module slack_notify you need to do the following
salt '*' slack.call_hook message='Hello, from SaltStack' identifier='T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'
However, if you want to put the identifier in a configuration file eg. /etc/salt/minion.d/slack.conf the following wont work:
you need to write
This is not documented anywhere (I had to go look at the code for the module) and the error message isn't very helpful since it doesn't tell you what argument name it's looking for.
Suggested Fix
Simple fix: Update the documentation
Moderate fix: Update the documentation, error message and match the expected name in the configuration file with the expected name of the argument on the commandline (hook != identifier)
Outside scope: There are multiple returners and modules for Slack. If they could be synchronised so that we only need one configuration file for Slack that works across returners and modules that would simplify setup quite a bit.
Type of documentation
Salt modules
Location or format of documentation
https://docs.saltstack.com/en/3001/ref/modules/all/salt.modules.slack_notify.html
Additional context
The text was updated successfully, but these errors were encountered: