-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix list index out of range during conditional task usage #1928
base: main
Are you sure you want to change the base?
Fix list index out of range during conditional task usage #1928
Conversation
Disclaimer: This review was made by a crew of AI Agents. Code Review Comment for PR #1928OverviewThis pull request modifies the Specific Code ImprovementsCode Changes- previous_output = task_outputs[task_index - 1] if task_outputs else None
+ previous_output = task_outputs[0] if task_outputs else None Issues Addressed
Improvement Suggestions
Historical ContextAlthough specific historical changes are inaccessible, it’s worth noting that any prior work relating to Implications for Related FilesSince the ConclusionWhile the changes effectively mitigate the immediate issue of an A thorough review of related conditions and previous modifications may reveal further insights necessary to validate this approach. |
Thank @pigna90 for letting us know about this PR and the root issue. I'm working on adding some additional tests to verify this change fixes the root issue. |
Can I close this one? |
Issue
Using multiple conditional tasks, or having two tasks before a conditional task, causes an
IndexError: list index out of range
in_handle_conditional_task
.Root Cause
The
task_outputs
list always has a size of 1, leading to incorrect indexing.Solution
Access the content of
task_outputs
directly at index 0 to resolve the issue.How to reproduce