-
Notifications
You must be signed in to change notification settings - Fork 637
hubot-slack calling bots.info a suspicious number of times #586
Description
Description
We believe that hubot-slack is calling the bots.info API excessively without caching.
We experienced a rate limit event with our Hubot today. After some investigation from Slack support, this is what they found:
According to our logs, what seems to have happened is that this bot called the
bots.infoAPI method (https://api.slack.com/methods/bots.info) at a sustained rate of 70 requests/minute for about 40 minutes.
I audited our own code and it doesn't look like we call it directly. I suspect it might be this uncached invocation in hubot-slack, which is outside our application's code:
Lines 247 to 248 in baca884
| # Bot user is not in mapping - call bots.info | |
| @web.bots.info(bot: botId).then((r) => r.bot) |
What type of issue is this?
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Reproducible in:
hubot-slack version: Latest git master
node version: v8.2.0
OS version(s): Debian stretch
Steps to reproduce:
Unsure as of yet - because it happens outside our own code we don't know how to cause it to reproduce.
Expected result:
hubot-slack works as normal.
Actual result:
hubot-slack is rate-limited by Slack.
Attachments:
The Slack support request 2659016 may have some additional context for you.