-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(agents-api): resolve continue as new issue and add a start_workflow interceptor #1175
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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 6151c97 in 1 minute and 39 seconds
More details
- Looked at
107
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
9
drafted comments based on config settings.
1. agents-api/agents_api/clients/temporal.py:52
- Draft comment:
Using CustomClientInterceptor here is fine, but ensure it composes well with any other interceptors that may be added later (e.g., TracingInterceptor). - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. agents-api/agents_api/common/interceptors.py:296
- Draft comment:
Renaming to CustomWorkflowOutboundInterceptor is clearer, but ensure the distinction from the client interceptor class remains obvious. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. agents-api/agents_api/common/interceptors.py:315
- Draft comment:
The offload_to_blob_store decorator is commented out and replaced with inline offload logic. Confirm this change consistently applies the desired behavior. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
4. agents-api/agents_api/common/interceptors.py:382
- Draft comment:
In the new CustomOutboundInterceptor (client interceptor), the start_workflow interception applies inline offloading. Verify that handling of large payloads is consistent with workflow methods. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
5. agents-api/agents_api/clients/temporal.py:52
- Draft comment:
Ensure the interceptor list order is appropriate when mixing multiple interceptors (e.g. CustomClientInterceptor vs TracingInterceptor). - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
6. agents-api/agents_api/common/interceptors.py:293
- Draft comment:
Renaming to CustomWorkflowOutboundInterceptor is good, but consider a less ambiguous naming compared to the client-side CustomOutboundInterceptor to avoid confusion. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
7. agents-api/agents_api/common/interceptors.py:286
- Draft comment:
Remove the commented-out @offload_to_blob_store decorator on start_activity; if offload logic is now handled manually, clean up the code to avoid confusion. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
8. agents-api/agents_api/common/interceptors.py:333
- Draft comment:
Similarly, remove the commented-out @offload_to_blob_store decorator on start_child_workflow and ensure offload_if_large is applied consistently. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
9. agents-api/agents_api/common/interceptors.py:367
- Draft comment:
In CustomClientInterceptor, consider renaming the encapsulated CustomOutboundInterceptor to better differentiate it from the workflow interceptor variant, for clarity in client vs workflow outbound interception. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
Workflow ID: wflow_uXgtIi9RsSjJit5v
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@Ahmad-mtos can you explain the changes and the rationale behind each change? Also why the commented out offload decorators? |
@creatorrr changes: |
User description
…ow interceptor
PR Type
Enhancement, Bug fix
Description
Added a
CustomClientInterceptor
for Temporal client workflows.Enhanced workflow argument handling with
offload_if_large
.Fixed
continue as new
issue in Temporal workflows.Refactored and updated interceptors for better error handling.
Changes walkthrough 📝
temporal.py
Add CustomClientInterceptor to Temporal client
agents-api/agents_api/clients/temporal.py
CustomClientInterceptor
for client workflows.CustomClientInterceptor
to Temporal client interceptors.interceptors.py
Add and refactor Temporal workflow interceptors
agents-api/agents_api/common/interceptors.py
CustomClientInterceptor
andCustomOutboundInterceptor
.offload_if_large
.@offload_to_blob_store
decorators.Important
Add
CustomClientInterceptor
for workflow start operations and modify interceptors for large argument handling intemporal.py
andinterceptors.py
.CustomClientInterceptor
ininterceptors.py
to handlestart_workflow
with error handling and argument offloading.CustomWorkflowOutboundInterceptor
to handle large arguments instart_activity
andstart_child_workflow
.CustomOutboundInterceptor
toCustomWorkflowOutboundInterceptor
.CustomClientInterceptor
toget_client()
intemporal.py
to intercept client operations.offload_to_blob_store
decorator fromstart_activity
andstart_child_workflow
inCustomWorkflowOutboundInterceptor
.This description was created by
for 6151c97. It will automatically update as commits are pushed.