errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.12k stars 614 forks source link

Slack rtm.start is changing on 09/20/2022, breaking slackclient #1545

Closed in-op closed 8 months ago

in-op commented 2 years ago

Slack is changing the response from its deprecated rm.start endpoint on 09/20/2022, which errbot's backend, slackclient, uses. Instead, all calls to rtm.start will fetch the data from rtm.connect, which contains less data in the response.

Errbot calls slackclient's rtm_connect method here (which is a bit misleadingly named considering it actually calls rtm.start by default). It also expects those extra response fields to be there. So when this drops of 11/30 all the Slack backends are going to break.

When first investigating this issue, I was originally going to open an issue with slackclient, but slackclient itself is already deprecated and errbot is pinned to slackclient>=1.0.5,<2.0, which is already an old major version.

There are probably a number of different solutions to this, ideally using Slack's newest slack-sdk instead of slackclient.

Additionally, on 11/30/2021, no new Slack apps can use rtm.start, so no one can use errbot to make new Slack apps until it is fixed.

nzlosh commented 2 years ago

The slackv3 backend uses the slack-sdk and supports all 3 API types: RTM and Events Request URL and Socket Mode. I recommend trying it before 20/09/2022 so you have time to adjust to any differences between the old slack backend and the slackv3 version.

torgeirl commented 2 years ago

I recommend trying it before 20/09/2022 so you have time to adjust to any differences between the old slack backend and the slackv3 version.

@nzlosh: is there a rough sketch (or roadmap) for how and when the slackv3 backend would become the default Slack backend for Errbot? September is both far away and very close, in different aspects.

nzlosh commented 2 years ago

@torgeirl The slackv3 backend will not replace the slack in that it will be a drop in replacement for slack. I recommend everyone start using slack3 as soon as possible. If you find any problems, open PRs/issues. The slackv3 backend will probably remain outside the errbot core repository. This allows the backend to have an independent release cycle which allows the backend to fixed quickly since errbot release cycles are slow paced. The slackv3 backend is now being tracked with releases so you can see the evolution of things here https://github.com/errbotio/err-backend-slackv3/releases

torgeirl commented 2 years ago

The slackv3 backend will probably remain outside the errbot core repository. This allows the backend to have an independent release cycle which allows the backend to fixed quickly since errbot release cycles are slow paced.

@nzlosh: I hope keeping it in a separate repository doesn't prevent it from getting a more tied-in installation process (ie pip install "errbot[slackv3]")? Otherwise I fear the adaptation will be low and then its suddenly September...

As an alternative, would it be possible to keep the development of slackv3 on a seperate, fast-paced release cadence while the main repository's releases could include the most recent slackv3 release in its releases?

nzlosh commented 2 years ago

@torgeirl you make some good points here.

My concern is having two concurrent versions of the backend would lead to confusion between bugs/fixes/features in the slackv3 repository but not yet merged into the errbot repository.

The installation process for slackv3 is inline with other backends outside errbot: mattermost, rocketchat, botframework (msteams) and discord are all installed by manually cloning the backend into the errbot directory structure and having the configuration updated to point to the backend directory.

Log messages are being generated to alert people to the fact the slack backend is being deprecated https://github.com/errbotio/errbot/pull/1526 but it will probably be over looked by most people as they will only look at the logs when there's a problem.

@sijis What do you think about raising an admin notification at errbot startup to warn of deprecated backends? What's your point of view on the subject of backend installation?

sijis commented 2 years ago

@nzlosh We already have deprecation warnings https://github.com/errbotio/errbot/blob/2b56971f8e1a3d3a4887e5ad41d0137636730d51/errbot/backends/slack.py#L418-L422

https://github.com/errbotio/errbot/blob/2b56971f8e1a3d3a4887e5ad41d0137636730d51/errbot/backends/slack_rtm.py#L430-L435