errbot icon indicating copy to clipboard operation
errbot copied to clipboard

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

Open in-op opened this issue 2 years ago • 6 comments

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.

in-op avatar Nov 11 '21 21:11 in-op

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.

nzlosh avatar Nov 12 '21 06:11 nzlosh

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.

torgeirl avatar Jan 07 '22 12:01 torgeirl

@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

nzlosh avatar Jan 07 '22 13:01 nzlosh

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?

torgeirl avatar Jan 07 '22 13:01 torgeirl

@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?

nzlosh avatar Jan 10 '22 10:01 nzlosh

@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

sijis avatar Jun 08 '22 06:06 sijis