-
Notifications
You must be signed in to change notification settings - Fork 319
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
Feature/add systems test for limits #1703
Conversation
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.
❌ Changes requested. Reviewed everything up to 02bc99c in 1 minute and 22 seconds
More details
- Looked at
2282
lines of code in30
files - Skipped
1
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. py/sdk/v3/users.py:207
- Draft comment:
Ensurerefresh_token
handles cases whereself.client._refresh_token
is not set, as it currently assumes the token is always present. - Reason this comment was not posted:
Comment did not seem useful.
2. py/sdk/v3/users.py:105
- Draft comment:
Setself.client.access_token
andself.client._refresh_token
toNone
before making the request in thedelete
method to ensure tokens are cleared even if the request fails. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment suggests a change in the order of operations for clearing tokens. The current implementation clears tokens after the request, which might be intentional to ensure tokens are only cleared if the request succeeds. The comment does not provide strong evidence that the current implementation is incorrect or that the suggested change is necessary.
The comment assumes that clearing tokens before the request is a better approach without providing evidence. The current implementation might be intentional to handle token clearance only after a successful request.
The comment could be suggesting a valid improvement if the intention is to ensure tokens are cleared regardless of request success. However, without evidence or context, it's speculative.
The comment lacks strong evidence for the suggested change and seems speculative. It should be deleted as it does not clearly indicate a required code change.
Workflow ID: wflow_M8f5GH016VbkBHPf
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
self.client.access_token = None | ||
self.client._refresh_token = None | ||
return response | ||
|
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.
The logout
method should return a response even when self.client.access_token
is not present. Add a return statement to ensure consistent behavior.
Important
Add system test for rate limits, update configurations, and enhance integration tests for rate limiting and user permissions.
rate_limit_dependency
to multiple routes inbase_router.py
,chunks_router.py
,collections_router.py
,conversations_router.py
,documents_router.py
,graph_router.py
,indices_router.py
,logs_router.py
,prompts_router.py
,retrieval_router.py
,system_router.py
, andusers_router.py
.base_router.py
.r2r_azure_with_test_limits.toml
for testing limits.action.yml
to user2r_azure_with_test_limits
configuration.test_collections.py
,test_collections_users_interaction.py
,test_conversations.py
,test_documents.py
,test_retrieval.py
,test_retrieval_advanced.py
, andtest_users.py
to verify rate limiting and user permissions.pytest-xdist
for parallel test execution inpyproject.toml
.chunks.py
andretrieval_router.py
for debugging purposes.user_limits
type indatabase.py
todict[UUID, LimitSettings]
.This description was created by for 02bc99c. It will automatically update as commits are pushed.