improvement(logs): fixed logs for parallel and loop execution flow#2468
Merged
icecrasher321 merged 7 commits intostagingfrom Dec 23, 2025
Merged
improvement(logs): fixed logs for parallel and loop execution flow#2468icecrasher321 merged 7 commits intostagingfrom
icecrasher321 merged 7 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR improves error handling and logging for loop and parallel execution blocks by capturing validation errors at the block level and propagating them to the console and dashboard. Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor as DAGExecutor
participant LoopOrch as LoopOrchestrator
participant ParallelOrch as ParallelOrchestrator
participant Utils as SubflowUtils
participant Logger as BlockLog/ContextExtensions
Note over Executor: Execution Flow with Error Handling
Executor->>LoopOrch: setContextExtensions()
Executor->>ParallelOrch: setContextExtensions()
alt Loop Initialization
Executor->>LoopOrch: initializeLoopScope(ctx, loopId)
LoopOrch->>LoopOrch: Get loop config
alt ForEach Loop
LoopOrch->>Utils: resolveArrayInput(items)
Utils-->>LoopOrch: resolved items array
LoopOrch->>Utils: validateMaxCount(items.length, MAX_FOREACH_ITEMS)
alt Validation Fails
Utils-->>LoopOrch: error message
LoopOrch->>Utils: addSubflowErrorLog(ctx, loopId, error)
Utils->>Logger: Create BlockLog with error
Utils->>Logger: Call onBlockComplete with error
LoopOrch->>LoopOrch: Set validationError in scope
LoopOrch-->>Executor: Throw Error
else Validation Passes
Utils-->>LoopOrch: undefined (no error)
LoopOrch->>LoopOrch: Set scope.items and scope.item
end
end
alt For/DoWhile Loop
LoopOrch->>Utils: validateMaxCount(iterations, MAX_LOOP_ITERATIONS)
alt Validation Fails
Utils-->>LoopOrch: error message
LoopOrch->>Utils: addSubflowErrorLog(ctx, loopId, error)
Utils->>Logger: Create BlockLog with error
LoopOrch-->>Executor: Throw Error
end
end
end
alt Parallel Initialization
Executor->>ParallelOrch: initializeParallelScope(ctx, parallelId)
ParallelOrch->>ParallelOrch: Get parallel config
ParallelOrch->>Utils: resolveArrayInput(distribution)
alt Resolution Fails
Utils-->>ParallelOrch: Throw error
ParallelOrch->>Utils: addSubflowErrorLog(ctx, parallelId, error)
Utils->>Logger: Create BlockLog with error
ParallelOrch->>ParallelOrch: setErrorScope with validationError
ParallelOrch-->>Executor: Throw Error
end
ParallelOrch->>Utils: validateMaxCount(branchCount, MAX_PARALLEL_BRANCHES)
alt Validation Fails
Utils-->>ParallelOrch: error message
ParallelOrch->>Utils: addSubflowErrorLog(ctx, parallelId, error)
Utils->>Logger: Create BlockLog with error
ParallelOrch->>ParallelOrch: setErrorScope with validationError
ParallelOrch-->>Executor: Throw Error
end
end
Note over Logger: Errors now propagate to console and dashboard
|
Sg312
reviewed
Dec 19, 2025
domiverse
reviewed
Dec 20, 2025
Collaborator
|
@greptile |
waleedlatif1
pushed a commit
that referenced
this pull request
Dec 23, 2025
…2468) * fixed logs for parallel and loop execution flow * Fix array check for collection * fixed for empty loop and paralle blocks and showing input on dashboard * extracted utility functions * fixed the refrencing errors and making sure it propogates to the console * fix parallel * fix tests' --------- Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com> Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com> Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Loop/Parallel Block level errors captured.
Type of Change
Testing
Tested with @Sg312
Checklist