Skip to content

Sorting events by Last Seen incorrectly sorts seconds #3294

@byoungstrom

Description

@byoungstrom




Describe the bug
When using the event view and sorting by Last Seen, events are not correctly sorted by time. With a descending sort order, I see events with a high number of seconds, followed by events that happened more recently, then followed by events that happened minutes ago.

It looks like events that happened <120seconds ago are sorted into a different bucket than those occurring >=120 seconds ago.

To Reproduce
Steps to reproduce the behavior:

  1. Go to ':events'
  2. Ctrl+L to sort by last seen
  3. Make some change in the cluster
  4. Observe events being shown out of order

Historical Documents
Sorting works as expected in 0.40.10

Expected behavior
To see events in chronological order when sorting by last seen

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: linux
  • K9s: 0.50.4
  • K8s: 1.30.4

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingin-progressMark issue as being worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions