littlehorse-enterprises / littlehorse

This repository contains the code for the LittleHorse Server, Dashboard, CLI, and Java/Go/Python SDK's. Brought to you by LittleHorse Enterprises LLC
https://littlehorse.dev/
Other
119 stars 11 forks source link

Dashboard: Handle Multiple NodeRun's on One Node #1092

Open muhammadqamar opened 2 weeks ago

muhammadqamar commented 2 weeks ago

Currently, on the dashboard, the task node behaves inconsistently when there are multiple TaskRuns associated with a single task node. When a user clicks on the node and expands to inspect the TaskRun, only information for a single, random TaskRun is displayed.

Image

Expected Behavior:

When there are multiple TaskRuns for a task node, we should improve the user experience by:

  1. Hiding the task arguments (args)
  2. Displaying a paginated list of all TaskRuns associated with the task node.
  3. Making each TaskRun in the list clickable, which will navigate the user to a new route (e.g., /wfrun/:id/taskrun/:id).

Proposed Solution:

This will make it easier for users to navigate and inspect the details of multiple TaskRuns without being overwhelmed by excessive information on the Task node view.

coltmcnealy-lh commented 2 weeks ago

This ticket is about any case in which a single Node can have multiple NodeRuns in a ThreadRun. There are two cases right now which cause this:

  1. A loop in the ThreadSpec
  2. Using rpc RescueThreadRun which causes the failed NodeRun to be run again.

Therefore I think the title of the ticket is wrong. We don't want to show multiple TaskRuns. We want to show multiple NodeRuns which occurred for the same Node. The NodeRuns should be ordered by the position field: lower position means they were created first.

muhammadqamar commented 2 weeks ago

This ticket is about any case in which a single Node can have multiple NodeRuns in a ThreadRun. There are two cases right now which cause this:

  1. A loop in the ThreadSpec
  2. Using rpc RescueThreadRun which causes the failed NodeRun to be run again.

Therefore I think the title of the ticket is wrong. We don't want to show multiple TaskRuns. We want to show multiple NodeRuns which occurred for the same Node. The NodeRuns should be ordered by the position field: lower position means they were created first.

Thanks @coltmcnealy-lh. me and @mijailr had a detail call again on that and we discussed couple of use cases and also some limitation as well. we will share shortly