-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bugfix/slack timeout #4652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/slack timeout #4652
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR addresses Slack timeout issues by improving error message handling and channel list truncation for large Slack workspaces.
- Modified
/backend/onyx/background/celery/tasks/indexing/tasks.py
to truncate long exception messages to 1024 chars while preserving tracebacks - Updated
/backend/onyx/connectors/slack/connector.py
to limit channel list in error messages to 50 entries - Removed channel accessibility validation in
filter_channels
to prevent timeouts in workspaces with 100k+ channels - Added
itertools
import for list slicing functionality - Improved error message formatting for better readability when channels are not found
2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
raise e | ||
|
||
# special bulletproofing ... truncate long exception messages | ||
sanitized_e = type(e)(str(e)[:1024]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to turn this into a utility for the future
* don't log all channels * print number of channels * sanitize indexing exception messages * harden vespa index swap * use constants and fix list generation --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
Description
Fixes https://linear.app/danswer/issue/DAN-1937/slack-unexpected-timeout
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.