-
Notifications
You must be signed in to change notification settings - Fork 985
dev -> main (Nov 3rd) #1591
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
dev -> main (Nov 3rd) #1591
Conversation
…event cross-loop futures
fix(agents-api): Remove caching from secret retrieval functions
|
Claude finished @Ahmad-mtos's task —— View job Analyzing PR for Changelog Updates
Todo List:
Analyzing the pull request changes to determine if a changelog entry is needed... |
PR Compliance Guide 🔍(Compliance updated until commit 54da275)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit 54da275
|
||||||||||||||||||||||||||||||||||||||||||||||||
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.
Important
Looks good to me! 👍
Reviewed everything up to 54da275 in 1 minute and 1 seconds. Click for details.
- Reviewed
52lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/agents-api/agents_api/common/utils/secrets.py:18
- Draft comment:
Good update: the alru_cache decorator was removed and replaced with a clear docstring. Please ensure that the removal of caching won’t adversely affect performance if these secrets are fetched frequently. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. src/agents-api/agents_api/common/utils/secrets.py:45
- Draft comment:
The get_secrets_list function also has its caching decorator removed with an updated docstring. Confirm that the fallback execution (using connection_pool) functions as expected in all contexts. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_MCwr75cYd1PELEiY
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
PR Code Suggestions ✨No code suggestions found for the PR. |
Pull Request Review: Remove Async LRU Caching from Secret FunctionsSummaryThis PR removes async LRU caching from secret retrieval functions to prevent cross-loop futures issues in Temporal workflow execution. While the fix addresses a legitimate technical concern, there are several considerations to discuss. ✅ Positive Aspects
🔍 Areas of Concern1. Performance ImpactIssue: Removing caching could significantly impact performance, especially for frequently accessed secrets.
Recommendation: Consider implementing request-scoped caching or using Temporal's built-in caching mechanisms that are workflow-safe. 2. Missing Alternative SolutionsIssue: The PR removes caching entirely without exploring alternatives. Potential alternatives to consider:
3. Documentation GapIssue: While docstrings were added, there's no update to broader documentation about this architectural decision. Recommendation:
🐛 Potential Issues
💡 Suggestions for Improvement
🏗️ Architecture ConsiderationsThis change highlights a broader architectural challenge: balancing performance optimization with Temporal's execution model. Consider:
✔️ Testing RecommendationsBefore merging:
📊 Risk Assessment
Final RecommendationApprove with reservations - The fix addresses a legitimate issue, but the performance implications need careful consideration. I recommend:
The code quality is good and the fix is valid, but we should be proactive about potential performance degradation. Review based on AGENTS.md guidelines and best practices for the Julep codebase. |
PR Type
Bug fix
Description
Remove async LRU caching from secret retrieval functions
Prevent cross-loop futures issues in workflow execution
Add docstrings explaining caching removal rationale
Clean up unused imports and environment variables
Diagram Walkthrough
File Walkthrough
secrets.py
Remove caching decorators from secret functionssrc/agents-api/agents_api/common/utils/secrets.py
@alru_cachedecorator fromget_secret_by_name()andget_secrets_list()functionsasync_lruimport andsecrets_cache_ttlenvironment variablereference
prevent cross-loop futures
get_secrets_list()function signature for betterreadability
Important
Remove caching from
get_secret_by_nameandget_secrets_listinsecrets.pyto avoid cross-loop futures.alru_cachefromget_secret_by_nameandget_secrets_listinsecrets.pyto avoid cross-loop futures.get_secret_by_nameandget_secrets_listto reflect non-caching behavior.alru_cacheimport fromsecrets.py.secrets_cache_ttlimport fromsecrets.py.This description was created by
for 54da275. You can customize this summary. It will automatically update as commits are pushed.