dify icon indicating copy to clipboard operation
dify copied to clipboard

failed nodes were not updated in workflow_node_executions

Open Kevin9703 opened this issue 9 months ago • 1 comments

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.

Image

Image

✔️ 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.

Kevin9703 avatar Apr 28 '25 09:04 Kevin9703

To address the issue where failed nodes are not updated in the workflow_node_executions table, you can check the following:

  1. Node Status Update Logic: Ensure that the logic for updating the node status from "running" to "failed" is correctly implemented. The CodeNode class in the backend should handle exceptions and update the node status to FAILED when an error occurs during execution. This is typically done in the _run method, where a NodeRunResult with the status set to FAILED should be returned if an error is encountered [1].

  2. 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.tsx file should ensure that inputs are displayed using a CodeEditor component in read-only mode when a node fails. Verify that the logic for rendering inputs is correctly implemented and that the nodeInfo.inputs is being passed to the CodeEditor [2].

  3. 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 as failBranch, 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

dosubot[bot] avatar Apr 28 '25 09:04 dosubot[bot]