You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a Slack limit set which prevents pinning more than 100 threads in a channel (not sure if this is server specific). The bot is pinning every Jira ticket it is set to watch and when it hits this limit it will crash because the exception is not handled now:
Traceback (most recent call last):
File "/usr/local/bin/triagebot.py", line 523, in wrapper
return f(config, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/triagebot.py", line 808, in _check_jira
[issue.post](http://issue.post/)()
File "/usr/local/bin/triagebot.py", line 369, in post
self._client.pins_add(channel=self.channel, timestamp=self.ts)
File "/usr/local/lib/python3.11/site-packages/slack_sdk/web/client.py", line 4026, in pins_add
return self.api_call("pins.add", params=kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/slack_sdk/web/base_client.py", line 156, in api_call
return self._sync_send(api_url=api_url, req_args=req_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/slack_sdk/web/base_client.py", line 187, in _sync_send
return self._urllib_api_call(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/slack_sdk/web/base_client.py", line 317, in _urllib_api_call
).validate()
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/slack_sdk/web/slack_response.py", line 199, in validate
raise e.SlackApiError(message=msg, response=self)
slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: [https://www.slack.com/api/pins.add](https://www.slack.com/api/pins.add))
The server responded with: {'ok': False, 'error': 'too_many_pins'}
The bot could log a warning instead and skip pinning until the count is reduced in a channel.
A second part of the issue is recovering from a large amount of pinned messages. Currently any issue tracked by the bot can be untracked with "Resolve" button for each issue/thread posted in the channel. Similarly it can be unpinned one by one manually. It would be helpful to have a new command, similar to refresh-all that would allow mass resolving (and unpinning) issues after they've been assigned (resolve-all?).
The text was updated successfully, but these errors were encountered:
We've had this one recently and I wonder if we should "just" not pin issues at all. They are always quickly available in the chat anyway so we don't strictly need it.
I guess we could live without it, the only downside is that for each issue/thread we would have to "click through" into history and hit "Resolve" there - which is slightly less convenient. Also if there's a huge amount of bug reports (with CVEs usually) the need for mass resolve still stands, although this is more of an RFE and not related to this issue.
There seems to be a Slack limit set which prevents pinning more than 100 threads in a channel (not sure if this is server specific). The bot is pinning every Jira ticket it is set to watch and when it hits this limit it will crash because the exception is not handled now:
The bot could log a warning instead and skip pinning until the count is reduced in a channel.
A second part of the issue is recovering from a large amount of pinned messages. Currently any issue tracked by the bot can be untracked with "Resolve" button for each issue/thread posted in the channel. Similarly it can be unpinned one by one manually. It would be helpful to have a new command, similar to
refresh-all
that would allow mass resolving (and unpinning) issues after they've been assigned (resolve-all
?).The text was updated successfully, but these errors were encountered: