Skip to content

Commit b1a6408

Browse files
authored
refactor: remove built-in slack backend (#1581)
* refactor: remove slack backend * refactor: remove slack-rtm backend * test: remove slack tests * docs: remove slack and use slackv3 * chore: add slackv3 build to Dockerfile * feat: enable backend plugins directory on --init * chore: add slackv3 repo to backend image * refactor: simplify the final image * docs: fix slack refs in README * docs: add info to CHANGES
1 parent 791a08b commit b1a6408

File tree

15 files changed

+36
-3207
lines changed

15 files changed

+36
-3207
lines changed

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
v9.9.9 (unreleased)
22
-------------------
33

4+
breaking:
5+
6+
- backend/slack: remove slack and slack_rtm built-in backends (#1581)
7+
48
features:
59

610
- core/plugins: detect plugins using entrypoints (#1590)

Dockerfile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
1-
FROM python:3.9-slim as BUILD
1+
FROM python:3.9-slim as build
22
WORKDIR /wheel
33
COPY . .
4-
RUN apt update && apt install build-essential -y
4+
RUN apt update && apt install -y build-essential git
5+
RUN cd /tmp && \
6+
git clone https://github.com/errbotio/err-backend-slackv3 slackv3
57
RUN pip3 wheel --wheel-dir=/wheel . \
6-
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram]
8+
-r /tmp/slackv3/requirements.txt wheel \
9+
errbot errbot[irc] errbot[XMPP] errbot[telegram] && \
10+
cp /tmp/slackv3/requirements.txt /wheel/slackv3-requirements.txt
711

8-
FROM python:3.9-slim
9-
COPY --from=BUILD /wheel /wheel
12+
FROM python:3.9-slim as base
13+
COPY --from=build /wheel /wheel
1014
RUN apt update && \
1115
apt install -y git && \
1216
cd /wheel && \
1317
pip3 -vv install --no-cache-dir --no-index --find-links /wheel . \
14-
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram] && \
18+
-r /wheel/slackv3-requirements.txt \
19+
errbot errbot[irc] errbot[XMPP] errbot[telegram] && \
1520
rm -rf /wheel /var/lib/apt/lists/*
16-
1721
RUN useradd -m errbot
22+
23+
FROM base
24+
EXPOSE 3141 3142
25+
VOLUME /home/errbot
1826
WORKDIR /home/errbot
1927
USER errbot
2028
RUN errbot --init
21-
EXPOSE 3141 3142
22-
VOLUME /home/errbot
29+
RUN git clone https://github.com/errbotio/err-backend-slackv3 backend-plugins/slackv3
2330
ENTRYPOINT [ "/usr/local/bin/errbot" ]

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ Chat servers support
4343
**Built-in**
4444

4545
- IRC support
46-
- `Slack support <https://slack.com/>`_
4746
- `Telegram support <https://www.telegram.org/>`_
4847
- `XMPP support <http://xmpp.org>`_
4948

5049
**With add-ons**
5150

52-
- `Webex <https://www.webex.com/>`_ (See `instructions <https://github.com/marksull/err-backend-cisco-webex-teams>`__)
53-
- `Discord <https://www.discordapp.com/>`_ (See `instructions <https://github.com/gbin/err-backend-discord>`__)
51+
- `Slack support <https://slack.com/>`_ (See `instructions <https://github.com/errbotio/err-backend-slackv3>`__)
52+
- `Discord <https://www.discordapp.com/>`_ (See `instructions <https://github.com/errbotio/err-backend-discord>`__)
5453
- `Gitter support <https://gitter.im/>`_ (See `instructions <https://github.com/errbotio/err-backend-gitter>`__)
54+
- `Webex <https://www.webex.com/>`_ (See `instructions <https://github.com/marksull/err-backend-cisco-webex-teams>`__)
5555
- `Mattermost <https://about.mattermost.com/>`_ (See `instructions <https://github.com/Vaelor/errbot-mattermost-backend>`__)
5656
- `RocketChat <https://rocket.chat/>`_ (See `instructions <https://github.com/cardoso/errbot-rocketchat>`__)
5757
- `Skype <https://www.skype.com/>`_ (See `instructions <https://github.com/errbotio/errbot-backend-skype>`__)
@@ -130,12 +130,12 @@ It will show you a prompt `>>>` so you can talk to your bot directly! Try `!help
130130
Adding support for a chat system
131131
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132132

133-
For the built-ins, just use one of those options `slack, telegram, IRC, XMPP` with pip, you can still do it
133+
For the built-ins, just use one of those options `telegram, IRC, XMPP` with pip, you can still do it
134134
after the initial installation to add the missing support for example ::
135135

136-
$ pip install "errbot[slack]"
136+
$ pip install "errbot[irc]"
137137

138-
For the external ones (Skype, Gitter, Discord etc ...), please follow their respective github pages for instructions.
138+
For the external ones (Slack, Discord, Gitter, Skype, etc ...), please follow their respective github pages for instructions.
139139

140140
Configuration
141141
~~~~~~~~~~~~~

docs/requirements.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ sphinx>=1.2
33
sphinx-autodoc-annotation
44

55
-e .
6-
slixmpp
7-
irc
8-
python-telegram-bot
9-
slackclient
106
hypchat
7+
irc
118
pytest
9+
python-telegram-bot
10+
slixmpp

docs/user_guide/configuration/slack.rst

Lines changed: 0 additions & 90 deletions
This file was deleted.

docs/user_guide/configuration/slackv3.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ You need to install Slackv3 dependencies before using Errbot with Slack. In the
1717
it is assumed slackv3 has been download to the /opt/errbot/backends directory and errbot has been
1818
installed in a python virtual environment (adjust the command to your errbot's installation)::
1919

20-
.. code::
21-
20+
git clone https://github.com/errbotio/err-backend-slackv3.git
2221
source /opt/errbot/bin/activate
2322
/opt/errbot/bin/pip install -r /opt/errbot/backends/err-backend-slackv3/requirements.txt
2423

25-
2624
Connection Methods
2725
------------------
2826

@@ -87,7 +85,7 @@ The virtual environment is created in `/opt/errbot/virtualenv` and errbot initia
8785
git clone https://github.com/errbotio/err-backend-slackv3
8886
pip install -r /opt/errbot/backend/err-backend-slackv3/requirements.txt
8987
90-
5. Configure the slack bot token, signing secret (Events API with Request URLs) and/or app token (Events API with Socket-mode). Located in ``/opt/errbot/config.py``
88+
5. Configure the slack bot token, signing secret (Events API with Request URLs) and/or app token (Events API with Socket-mode). Located in `/opt/errbot/config.py`
9189

9290
.. code::
9391
@@ -97,6 +95,7 @@ The virtual environment is created in `/opt/errbot/virtualenv` and errbot initia
9795
'app_token': "xapp-..."
9896
}
9997
98+
10099
Setting up Slack application
101100
----------------------------
102101

docs/user_guide/setup.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ You can find here more details about configuring Errbot for some specific chat s
108108
configuration/gitter
109109
configuration/irc
110110
configuration/mattermost
111-
configuration/slack
112111
configuration/slackv3
113112
configuration/telegram
114113
configuration/xmpp

errbot/backends/slack.plug

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)