-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: Add rate-limiting to Teams API request #4854
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
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
Added rate limiting to MS Teams connector API requests to prevent hitting service limits, specifically for message replies fetching.
- Implemented rate limiting decorator in
backend/onyx/connectors/teams/connector.py
to restrict Teams API calls to 50 requests per 60 seconds - Should consider adding scale testing infrastructure to properly validate rate limiting behavior
- Lack of testing capabilities for rate limiting implementation poses potential risk
1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile
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.
left some nits
* Add rate-limiting to Teams API request * Add comment for rate-limiting * Implement rate-limiting for office365 library. * Remove hardcoded value * Fix nits on PR
Description
This PR adds rate-limiting to API requests made to MS Teams.
Addresses: https://linear.app/danswer/issue/DAN-2063/add-rate-limiting-to-ms-teams-connector-apis.
How Has This Been Tested?
The only way to test this would be through scale-testing, which we don't have just yet.