Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.
This repository was archived by the owner on May 27, 2025. It is now read-only.

hubot-slack calling bots.info a suspicious number of times #586

@mistydemeo

Description

@mistydemeo

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.info API 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:

# 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.

Metadata

Metadata

Assignees

Labels

bugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions