langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
48.59k stars 6.96k forks source link

Parallel branches are wrongly displayed in the Tracing UI and one step keeps running forevever #9556

Open fniu opened 2 hours ago

fniu commented 2 hours ago

Self Checks

Dify version

0.9.2

Cloud or Self Hosted

Cloud

Steps to reproduce

A set of parallel branches (1-B, 1-C and 1-D) comes at a Template node. Everythings works fine except for the UI, e.g., the Template node is missing for Branch-1-B, the steps for the Template node keeps running forever.

Screenshot 2024-10-21 114536

✔️ Expected Behavior

Every branch should end with the node "TEMPLATE", and should stop showing "Running" when the workflow is ended.

❌ Actual Behavior

Explained above and with a screenshot.

dosubot[bot] commented 2 hours ago

I found a similar unsolved discussion regarding issues with parallel execution in the workflow. In version 0.8.0, there was a problem where the issue classifier was treated as a parallel execution branch, which might be related to the problem you're experiencing [1].

Regarding the Tracing UI, the structure and logic for displaying parallel branches are managed by the TracingPanel component. It uses a function buildLogTree to construct a tree of nodes from a list of NodeTracing objects. This tree structure is used to render the UI, and parallel nodes are displayed with a collapsible UI element [2].

For the issue of a node remaining in the 'Running' state indefinitely, I couldn't find specific conditions or errors that cause this. However, it might be related to how the platform handles the execution and termination of parallel branches, using events and a queue system to manage execution and status updates [3].

If the problem persists, it might be worth checking if there are any updates or patches available for version 0.9.2 that address these issues.

To continue talking to Dosu, mention @dosu.