You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API call returns a member list in a different order between runs. We should sort it before printing the result in order to ease diff between two runs.
To provide more information, the CLI returns the API result using the printer package (printer). The sort must be done for the printer.Table.
To abstract the things, the printer expects a pointer to a struct or an array of pointers, this is how swagger returns the things. For the table, we first extract the headers (exported struct fields name) and from this headers we extract the associated values.
| ID | MEMBER |
|----|--------|
| 1 | foo |
| 3 | bar |
| 2 | foobar |
The issue is that the values are not in the same order between each run, so it's not easy to run deterministic tasks (like diff / sorting) between two outputs.
The easiest solution I have currently in mind, would be to pass (CLI flag with default value for each services ?) to the printer.Options the column on which one we want to sort the output and it would make sense for the next iterations on the printer.Table since we would like to be able to select the columns to display.
The API call returns a member list in a different order between runs. We should sort it before printing the result in order to ease diff between two runs.
NB: Can be extrapolated to other
list
commands.[doc]
The text was updated successfully, but these errors were encountered: