Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jcli could allow some form of list preprocessing #763

Open
2 tasks
NicolasDP opened this issue Sep 8, 2019 · 1 comment
Open
2 tasks

jcli could allow some form of list preprocessing #763

NicolasDP opened this issue Sep 8, 2019 · 1 comment
Labels
A-jcli Area: Command Line Interface and tooling enhancement New feature or request good first issue Good for newcomers

Comments

@NicolasDP
Copy link
Contributor

both /leaders/logs and fragment/logs returns a list of events that is not sorted or does not allow easy filtering.

  • something simple to start with could be to add to both of these commands a --sort-by=PARAM which would sort the list by decreasing order on the PARAM field of the item.
  • something else could be added: filter, that's more complicated because there is some form of more complex DSL to add. However one could start with the usual --last-updated-within='20min 39s' (there is a type for this kind of duration in jormungandr-lib::time).
@NicolasDP NicolasDP added enhancement New feature or request good first issue Good for newcomers A-jcli Area: Command Line Interface and tooling labels Sep 8, 2019
@edjroz
Copy link

edjroz commented Nov 7, 2020

🤔 Adding pagination to this logs processing would be pretty nice too.

I do have a question though, wouldn't sorting by any param be problematic ? given the fact that most of the params are strings would be sorted lexicographically and might cause issues ?

- created_at_time: "2019-08-19T12:25:00.417263555+00:00"
  enclave_leader_id: 1
  finished_at_time: "2019-08-19T23:19:05.010113333+00:00"
  scheduled_at_date: "0.3923"
  scheduled_at_time: "2019-08-19T23:18:35+00:00"
  wake_at_time: "2019-08-19T23:18:35.001254555+00:00"
  status:
    Block:
      chain_length: 201018
      block: d9040ca57e513a36ecd3bb54207dfcd10682200929cad6ada46b521417964174
      parent: cc72d4ca957b03d7c795596b7fd7b1ff09c649c3e2877c508c0466abc8604832

Also QQ when referring to fragment/logs through the CLI we are referring to messages ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-jcli Area: Command Line Interface and tooling enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants