Description
The slack engine fails to load with a recent version of the slack client library
Setup
Steps to Reproduce the behavior
When starting up and enabling debug logging, one can see this:
2020-06-30 07:46:46,163 [salt.utils.lazy :106 ][DEBUG ][30780] Could not LazyLoad slack.start: 'slack' __virtual__ returned False: The 'slackclient' Python module could not be loaded
https://github.com/saltstack/salt/blob/master/salt/engines/slack.py#L177
It's probably because slackclient is now different and the migration described in https://github.com/slackapi/python-slackclient/wiki/Migrating-to-2.x was not done.
Installing a v1 version fixed the import but yielded different errors inside the slack module.
Quickfixing the imports also didn't fully work.
Expected behavior
Salt engine starts with recent version of slackclient.
Versions Report
Salt Version:
Salt: 3001
Dependency Versions:
cffi: 1.13.2
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.10
libgit2: 0.28.4
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: 3.6.1
pygit2: 1.0.2
Python: 3.7.3 (default, Dec 20 2019, 18:57:59)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 18.1.1
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.2
System Versions:
dist: debian 10 buster
locale: utf-8
machine: x86_64
release: 4.19.0-6-amd64
system: Linux
version: Debian GNU/Linux 10 buster
@toabi your right. Looks like the slack API did more than a naming convention change https://github.com/slackapi/python-slackclient/tree/master. sc.api_call(“chat.postMessage”… vs client.chat_postMessage(… But It looks like a simple restructure. So the good news is the module does not need a full rewrite but still needs some good work.
Does slack v1 work on an older version of salt? If not odds are slack changed their security protocols.
We actually have a Saltstack 3000.2 running with slackclient==1.0.0 still working. Funny.
Didn't manage to get the new setup to work with v1.3.2. I didn't dig much deeper though.
@toabi thanks for the information. I think the best course of action for this issue is to get 1.0.0 working on salt again. Then to upgrade our module to support the new API changes.
Do you have any news about the release date of this fix?
Most helpful comment
Do you have any news about the release date of this fix?