Skip to content

Conversation

rkuo-danswer
Copy link
Contributor

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.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Copy link

vercel bot commented May 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2025 1:49am

@rkuo-danswer rkuo-danswer marked this pull request as ready for review May 2, 2025 01:23
@rkuo-danswer rkuo-danswer requested a review from a team as a code owner May 2, 2025 01:23
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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])
Copy link
Contributor

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

@rkuo-danswer rkuo-danswer added this pull request to the merge queue May 2, 2025
Merged via the queue into main with commit 5c3820b May 2, 2025
11 checks passed
@rkuo-danswer rkuo-danswer deleted the bugfix/slack-timeout branch May 2, 2025 19:36
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants