-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(child-workflow): nested spans handoff #2966
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR fixes the nested trace spans handoff in child workflow error cases by introducing a proper Key changes:
The fix ensures that when nested workflows fail, their execution traces are properly propagated up through parent workflows for debugging and observability. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant PE as Parent Executor
participant WH as WorkflowHandler
participant CE as Child Executor
participant BE as BlockExecutor
PE->>WH: execute(workflow block)
WH->>CE: execute child workflow
alt Child workflow succeeds
CE-->>WH: ExecutionResult with logs
WH->>WH: captureChildWorkflowLogs()
WH-->>PE: Return success with childTraceSpans
else Child workflow fails
CE-->>WH: throw error with executionResult
WH->>WH: Extract childTraceSpans from error.executionResult
WH->>WH: Create ChildWorkflowError
WH-->>BE: throw ChildWorkflowError
BE->>BE: Check ChildWorkflowError.isChildWorkflowError()
BE->>BE: Extract childTraceSpans to errorOutput
BE->>BE: Set blockLog.output with errorOutput
BE->>BE: Set block state with errorOutput
alt Has error port
BE-->>PE: Return errorOutput with childTraceSpans
else No error port
BE-->>PE: throw error with childTraceSpans preserved
end
end
|
|
@cursor review |
|
@cursor review |
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.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
|
@cursor review |
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.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Summary
Nested spans handoff in error case for workflow in workflow block.
Type of Change
Testing
Tested manually
Checklist