failed nodes were not updated in workflow_node_executions
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.3.0
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
When a node in the workflow fails, its status stays as "running" and the node’s input isn't visible.
✔️ Expected Behavior
The node’s status should be "failed" and its input should be visible.
❌ Actual Behavior
The node’s status remains "running" and its input is not visible.
To address the issue where failed nodes are not updated in the workflow_node_executions table, you can check the following:
-
Node Status Update Logic: Ensure that the logic for updating the node status from "running" to "failed" is correctly implemented. The
CodeNodeclass in the backend should handle exceptions and update the node status toFAILEDwhen an error occurs during execution. This is typically done in the_runmethod, where aNodeRunResultwith the status set toFAILEDshould be returned if an error is encountered [1]. -
Visibility of Node Inputs: The visibility of node inputs when a node fails is managed in the frontend. The
web/app/components/workflow/run/node.tsxfile should ensure that inputs are displayed using aCodeEditorcomponent in read-only mode when a node fails. Verify that the logic for rendering inputs is correctly implemented and that thenodeInfo.inputsis being passed to theCodeEditor[2]. -
Error Handling Mechanism: Check if the error handling mechanism is properly configured to handle exceptions like
TypeError. The system should capture such errors and update the node status accordingly. Ensure that the error handling strategies, such asfailBranch, are correctly set up to manage node failures and provide appropriate UI feedback [3].
By reviewing these areas, you should be able to identify and resolve the issue with node status updates and input visibility when a node fails.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other