-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix: duplicate account connection on basic auth #1080
base: master
Are you sure you want to change the base?
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.
👍 Looks good to me! Reviewed everything up to 12ae898 in 7 seconds
More details
- Looked at
16
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. python/composio/cli/add.py:336
- Draft comment:
Ensure that removingsave_user_access_data
does not affect other parts of the code that might rely on it. The change seems correct as per the PR description, but double-check for any dependencies. - Reason this comment was not posted:
Confidence changes required:50%
The removal of thesave_user_access_data
call seems appropriate given the PR description, which states thatinitiate_connection()
now handles the creation of the connected account with the auth config properly. However, it's important to ensure that this change doesn't affect any other part of the code that might rely onsave_user_access_data
.
Workflow ID: wflow_N0y6TQHCMAEN0o4q
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -336,11 +336,6 @@ def _handle_basic_auth( | |||
force_new_integration=True, | |||
labels=labels, | |||
) |
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.
Consider adding a comment here explaining that user access data is already saved during connection initialization to prevent future reintroduction of duplicate calls.
Code Review SummaryThe changes look good and address the issue of duplicate account connection handling during basic authentication. Here's my assessment: Positive Points:
Suggestions:
Overall code quality: 8/10 - Clean, focused fix that improves code efficiency by removing redundant operations. |
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.
👍 Looks good to me! Incremental review on e821402 in 1 minute and 7 seconds
More details
- Looked at
75
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. python/composio/tools/base/runtime.py:314
- Draft comment:
The variableauth_params
is renamed toauth_param
in the PR, but the change is not applied consistently throughout the file. Ensure consistent naming to avoid confusion. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment appears to be incorrect. The variableauth_params
only appears once in the original code at line 317, and it was renamed toauth_param
. There are no other instances of this variable that were missed. The comment seems to have confusedauth_params
withconnection_params
, which is a different variable used for a different purpose.
Could there be other files where this variable is used that I'm not seeing? Couldconnection_params
actually be related toauth_params
in some way I'm missing?
No - the rule is to ignore cross-file issues, andconnection_params
is clearly a different variable used to store the actual connection parameters from the API response, whileauth_param
is a boolean flag used to track whether auth is needed.
The comment is incorrect - there is no inconsistency in the renaming as the variable only appears once. The comment should be deleted.
2. python/composio/tools/base/runtime.py:328
- Draft comment:
The variableauth_params
is renamed toauth_param
in the PR, but the change is not applied consistently throughout the file. Ensure consistent naming to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
3. python/composio/tools/base/runtime.py:392
- Draft comment:
The variableauth_params
is renamed toauth_param
in the PR, but the change is not applied consistently throughout the file. Ensure consistent naming to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_5QL4ps4ukSBNOxyB
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
initiate_connection()
now creates the connected account with the auth config properly. No need to create another one.Important
Fixes duplicate account connection issue in basic auth by removing redundant function call in
add.py
and refactoring related code.save_user_access_data()
call in_handle_basic_auth()
inadd.py
, preventing duplicate account connections._get_connected_account()
inruntime.py
to retrieve connected account details._get_auth_params()
inruntime.py
to useConnectedAccountModel
._handle_basic_auth()
inadd.py
to streamline connection process._build_executable_from_args()
inruntime.py
to handleconnected_account
parameter.This description was created by for e821402. It will automatically update as commits are pushed.