Skip to content

Conversation

rkuo-danswer
Copy link
Contributor

Description

Fixes https://linear.app/danswer/issue/DAN-1993/floqast-slack-permissions-not-sharing-retry-handler

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 20, 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 20, 2025 1:55am

@rkuo-danswer rkuo-danswer marked this pull request as ready for review May 20, 2025 01:01
@rkuo-danswer rkuo-danswer requested a review from a team as a code owner May 20, 2025 01:01
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 fixes an issue with Slack permission clients not sharing retry handlers correctly by modifying the client initialization process and Redis-based rate limit handling.

  • Critical bug in backend/ee/onyx/external_permissions/slack/doc_sync.py: The properly configured WebClient with retry handler is immediately overwritten with a basic WebClient, negating the intended fix
  • Added static method make_slack_web_client in backend/onyx/connectors/slack/connector.py to ensure consistent retry handler configuration across all clients
  • Improved Redis client initialization with proper tenant ID validation for rate limit tracking
  • Moved delay lock and key generation to static methods for better encapsulation and reusability
  • Recommend removing the redundant WebClient initialization in doc_sync.py that overwrites the properly configured client

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@rkuo-danswer rkuo-danswer added this pull request to the merge queue May 20, 2025
@Weves Weves removed this pull request from the merge queue due to a manual request May 20, 2025
@Weves Weves merged commit 06312e4 into main May 20, 2025
11 checks passed
@Weves Weves deleted the bugfix/slack-perm-retry-handler branch May 20, 2025 04:07
ferdinandl007 pushed a commit to ferdinandl007/onyx that referenced this pull request May 27, 2025
…ot-app#4737)

* make sure the permission client uses the proper retry handler

* fix client

---------

Co-authored-by: Richard Kuo <rkuo@rkuo.com>
aronszanto pushed a commit to aronszanto/onyx that referenced this pull request May 27, 2025
…ot-app#4737)

* make sure the permission client uses the proper retry handler

* fix client

---------

Co-authored-by: Richard Kuo <rkuo@rkuo.com>
ZhipengHe pushed a commit to ZhipengHe/onyx that referenced this pull request Jun 6, 2025
…ot-app#4737)

* make sure the permission client uses the proper retry handler

* fix client

---------

Co-authored-by: Richard Kuo <rkuo@rkuo.com>
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
…ot-app#4737)

* make sure the permission client uses the proper retry handler

* fix client

---------

Co-authored-by: Richard Kuo <rkuo@rkuo.com>
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.

3 participants