-
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
feat: Add retry support in Action postprocessor #1017
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis update enhances the Composio toolset by introducing retry support in the Action postprocessor. A new Changes
🔗 Related PRs
InstructionsEmoji Descriptions:
Interact with the Bot:
Execute a command using the format:
Available Commands:
Tips for Using @bot Effectively:
Need More Help?📚 Visit our documentation for detailed guides on using Entelligence.AI. |
key: _KeyType, | ||
data: t.Dict, | ||
type_: te.Literal["pre", "post", "schema"], | ||
) -> t.Dict: | ||
) -> t.Union[t.Dict, _Retry]: | ||
processor = self._get_processor(key=key, type_=type_) | ||
if processor is not None: | ||
self.logger.info( |
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.
🤖 Bug Fix:
Ensure Compatibility with New Return Type
The change in the return type from t.Dict
to t.Union[t.Dict, _Retry]
is significant and requires careful handling to avoid runtime errors.
- Review Calling Code: Ensure all parts of the codebase that call this function are updated to handle both
t.Dict
and_Retry
types appropriately. - Update Documentation: Reflect the new return type in the function's documentation to inform other developers of the change.
- Enhance Testing: Add or update tests to cover scenarios where
_Retry
is returned, ensuring robust handling of this type.
This change is critical and should be managed with thorough testing and documentation updates to prevent logical errors. 🛠️
"Received RETRY from App schema processor function." | ||
" Schema pprocessors cannot be retried." | ||
) | ||
assert not isinstance(processed, _Retry) |
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.
assert not isinstance(processed, _Retry) |
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 3939a0d in 10 minutes and 19 seconds
More details
- Looked at
238
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. python/composio/tools/toolset.py:724
- Draft comment:
Typo in error message: 'pprocessors' should be 'processors'. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a retry mechanism for action postprocessors. However, there is a typo in the error message for schema processors that should be corrected.
2. python/composio/tools/toolset.py:736
- Draft comment:
Typo in error message: 'preprocessor' should be 'schema processor'. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a retry mechanism for action postprocessors. However, there is a typo in the error message for schema processors that should be corrected.
3. python/composio/tools/toolset.py:694
- Draft comment:
Typo in function name: '_process_respone' should be '_process_response'. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a retry mechanism for action postprocessors. However, there is a typo in the error message for schema processors that should be corrected.
Workflow ID: wflow_RgJp76D74M3IviRL
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
🔍 Review Summary
Purpose
Introduce retry support in the Action postprocessor to enhance the Composio toolset.
Key Changes
New Feature
_Retry
class andmax_retries
parameter toComposioToolSet
constructor.Enhancement
ComposioToolSet
to incorporate retry logic.Documentation
RETRY
to import list and__all__
declaration in__init__.py
files.Impact
Improves error handling and resilience in Composio toolset by allowing retry attempts in the Action postprocessor, enhancing overall user experience.
Original Description
No existing description found