-
Notifications
You must be signed in to change notification settings - Fork 45.8k
feat(backend): Speed up graph create/update #10025
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
feat(backend): Speed up graph create/update #10025
Conversation
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
Here's the code health analysis summary for commits Analysis Summary
|
The PR addresses reducing DB calls for graph operations as stated in the title. The changes include adding a credentials caching function and refactoring the credentials manager. The description clearly explains the changes and references issue #10024. The author has marked that they've made a test plan but has not completed testing according to that plan, as the 'tested my changes' checkbox is unchecked. All changes pass the user_id correctly in the credentials manager functions, maintaining security. The PR title follows conventional commit format with the correct type and scope. |
The PR meets most of the requirements, but the checklist is not completely filled out. In the test plan section, there are checkboxes that remain unchecked, indicating that the author has not yet tested their changes according to the plan they defined. The PR follows proper title formatting with 'feat(backend)' as the type and scope. The description clearly explains the purpose (speeding up graph operations with authenticated blocks) and lists the specific changes made. The code changes appear to properly handle user_id in credential management, which was an important requirement. All changes appear to be within scope of the PR title. |
The PR meets most of the requirements. The title follows conventional commit format with the type 'feat' and scope 'backend'. The description clearly references issue #10024 and explains the intent of the changes (speeding up graph update/create calls with authenticated blocks). The changes listed in the PR description match what's shown in the diff - extracting a |
If you read this, it works :) |
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.
LGTM
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.
LGTM!
on_graph_activate
,on_graph_deactivate
#10024Caching the repeated DB calls by the graph lifecycle hooks significantly speeds up graph update/create calls with many authenticated blocks (~300ms saved per authenticated block)
Changes 🏗️
IntegrationCredentialsManager.cached_getter(user_id)
in lifecycle hooksrefresh_if_needed(..)
method out ofIntegrationCredentialsManager.get(..)
get_credentials
parameter touser_id
Checklist 📋
For code changes: