ui icon indicating copy to clipboard operation
ui copied to clipboard

Sorting by "Duration" in Task Run view no longer works

Open jeffbrainerd opened this issue 4 years ago • 7 comments

Bug Description In the Flow Run details view, sorting on the Duration column no longer has any effect. I believe this stopped stopped working when "duration" was removed from the GraphQL flow run object.

Steps To Reproduce

  1. Go to the Flow Run details page of a running or completed flow run. Clicking on the Duration column header has no effect.

Browsers Tested:

  • [x] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Edge
  • [ ] IE

Notes Screen Shot 2020-09-29 at 3 34 11 PM

jeffbrainerd avatar Sep 29 '20 19:09 jeffbrainerd

This is a super useful way to sort so I really hope it comes back. Thanks!

jeffbrainerd avatar Sep 29 '20 19:09 jeffbrainerd

Hi @jeffbrainerd, thanks for bringing this to our attention! That's definitely a bug, will get it sorted ASAP 👍

znicholasbrown avatar Sep 29 '20 19:09 znicholasbrown

Thanks @znicholasbrown, appreciate it. By the way there's a related issue where task runs without an end time (like Cancelled or Skipped) have ongoing, very long durations. By "ongoing" I mean they are continually updating, even though the flow is done. Happy to open a separate bug but wanted to check first. Screen Shot 2020-09-29 at 3 56 02 PM

jeffbrainerd avatar Sep 29 '20 19:09 jeffbrainerd

Nope, no need to open a separate ticket @jeffbrainerd ! #267 should fix that second issue; I expect to release that within the hour.

To the duration sorting, it looks like that was broken by an API change that removed the duration field from the database; that field was removed in favor of client-side duration calculations, which is what you're seeing now. Since we apply server-side sorting to this table (because the number of potential runs can be quite high if and tasks are mapped), we can no longer sort by that field. However, we've got some incoming changes to mapping views that will let us sort these on the client in the way you expect; I'll leave this ticket open for now and will update it and you when those changes hit 😄

znicholasbrown avatar Sep 29 '20 21:09 znicholasbrown

Hey @znicholasbrown, I was wondering about this bug. Sorting by duration is still a super useful function we'd love to get back. Thanks!

jeffbrainerd avatar Dec 20 '20 01:12 jeffbrainerd

Waking up this older ticket.

Duration sorting is super helpful to track down Tasks that took longer than expected. We a particular flow that runs around 100 tasks. Many of those tasks end in 5 or 10 minutes. But several took an hour and one took over 4 hours. I was clicking through the tasks when I noticed this. But then the page refreshed and I was back to page 1... so I had to click through them all again.

shaleh avatar Jun 23 '21 17:06 shaleh

Hi @shaleh - thanks for raising; some of the API changes that would have enabled this ended up being too taxing on performance to make this feasible so at the moment this isn't something we can do given that durations are all calculated on the client and not on the Server. We're hoping to make improvements around all of this in the coming months but I don't have anything concrete yet.

In the meantime, the page refresh issue you described is definitely a bug that we can fix; I'll open a ticket for that to make sure the table doesn't reset.

znicholasbrown avatar Jun 23 '21 22:06 znicholasbrown