akuity / kargo

Application lifecycle orchestration
https://kargo.akuity.io/
Apache License 2.0
1.6k stars 137 forks source link

Image history randomly sorted. Changes on every refresh #2767

Open jessesuen opened 5 days ago

jessesuen commented 5 days ago

Description

The image history is randomly listed and changes on every refresh:

https://github.com/user-attachments/assets/9a1f8290-bd35-486a-92a5-4225c7d6b0a3

We should sort by semantic version if we detect that they are semvers (we can just look at the first one to determine this), and then fall back to lexographical if it's not a semvers.

Version

v0.9.0
krancour commented 5 days ago

The data structure that drives this is composed on the back end since #2389. I looked at this briefly today, hoping it would be a quick fix, but it's quite complex as it turns out, and I believe the structure of this data will have to be revised (to be less map-centric and more list-centric). @Marvin9 and I will have to tag-team this so the front-end and back-end agree on the new data structure.

Marvin9 commented 4 days ago

@krancour Do you know why did we move this calculation from UI to backend?

As I dig into this, what I see is, API construct the view for UI but then there is no reaction of any changes (eg. new freight, freight moves to stage) from either side to re-construct or update the view. Thats what lead to refresh page every time to see any changes

krancour commented 4 days ago

iirc, @rbreeze had said that UI performance improved a lot by offloading this to the back end.