bug: alerts modal fails to pop up due to slack api rate limit
Provide environment information
It happens in the webapp docker container
Describe the bug
The modal for creating a new integration hangs while it tries to fetch information from Slack. Most of the time it fails, but occasionally it passes and I'm able to create an alert (either slack, or other). Other than this the Slack alerts work perfectly, it's just an issue with adding them.
Reproduction repo
n/a
To reproduce
It's possible it's because our connection is a larger slack org, I don't know - I haven't looked at the Slack integration code
Additional information
[WARN] web-api:WebClient:22 http request failed A rate limit was exceeded (url: conversations.list, retry-after: 30)
Error: A rate limit was exceeded (url: conversations.list, retry-after: 30)
at /triggerdotdev/node_modules/.pnpm/@[email protected]/node_modules/@slack/web-api/dist/WebClient.js:433:31
at async run (/triggerdotdev/node_modules/.pnpm/[email protected]/node_modules/p-queue/dist/index.js:163:29) {
attemptNumber: 1,
retriesLeft: 2
}
Hey, @ghostdevv how were you able to set up slack integration on self-hosted I'm wondering.
Are these env vars required or:
ORG_SLACK_INTEGRATION_CLIENT_ID=your_slack_app_client_id ORG_SLACK_INTEGRATION_CLIENT_SECRET=your_slack_app_client_secret
We made a change that improves this a few months ago. It's still not ideal because the Slack API doesn't do server-side filtering of hidden channels. There doesn't seem to be a good solution for this from their API unfortunately, but it's certainly a lot better now.