Skip to content

unikraft <resource> ls collapses columns weirdly #372

Description

@jedevc

tableutils should be able to allocate priorities to columns. So that we can:

  • Remove columns that are below a certain size
  • Have weighted truncation - e.g. having some fields truncate faster than others
  • Avoid truncating some fields unless absolutely not possible like name
  • Also columns shouldn't jump around excitedly on --watch and similar. They should be as stable as possible.

I think this likely involves rewriting how we have a tab-based writer, and instead using a more complex struct for writing tabular data.

The outcomes:

  • "idendifying" information (metro, name, uuid) columns are never collapsed
  • simple columns are never collapsed (memory, vcpus, etc)
  • once columns go below a certain size, they could be removed.

I would expect a couple of iterations on this one. Probably the first step is to find a new way to do this with a table writer, and injecting some metadata about which columns should never be collapsed. This would solve the first case - then, we could go about doing the other items. I would also be curious as to what other tools with tabular views like this do here (e.g. kubectl, docker, etc).

Internal issue: https://linear.app/unikraft/issue/TOOL-673/cli-should-have-weighted-column-shrinking

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions