auth0-cli icon indicating copy to clipboard operation
auth0-cli copied to clipboard

logs ls --number has no effect

Open jonaustin opened this issue 2 years ago • 6 comments

Checklist

  • [X] I have looked into the README and have not found a suitable solution or answer.
  • [X] I have looked into the documentation and have not found a suitable solution or answer.
  • [X] I have searched the issues and have not found a suitable solution or answer.
  • [X] I have upgraded to the latest version of this project and the issue still persists.
  • [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • [X] I agree to the terms within the Auth0 Code of Conduct.

Description

❯ auth0 logs ls --number 100000 |wc -l

=== xxxx.us.auth0.com logs

     101
❯ auth0 logs ls |wc -l

=== xxx.us.auth0.com logs

     101

Poked at the code, and there's simply no code that loops over pages: https://github.com/auth0/auth0-cli/blob/main/internal/cli/logs.go#L172-L189

Expectation

Passing in -n/--number >100 should fetch more than 100 log entries.

Reproduction

auth0 logs ls --number 100000

Auth0 CLI version

❯ auth0 -v auth0 version 1.3.0 2bd069cfc1ee0501ed039fc80b2e550447c8ef14

jonaustin avatar Dec 06 '23 18:12 jonaustin

This is fixed in #939 but still waiting on a release.

willvedd avatar Dec 20 '23 18:12 willvedd

@willvedd Why is the maximum only 1000?

That greatly reduces the utility of this in my mind; i.e. it's still not really all that useful if it can only go back 1000 log entries.

jonaustin avatar Dec 20 '23 19:12 jonaustin

Arbitrarily set at 1000 for practically; there is no technical limitation. IMO, this will satisfy most (but obviously not all) use cases around logs. And we need to bound at some point.

It would help to understand the workflow you're trying to achieve. Short of upping the limit a little, we're unlikely to immediately implement but it is still important for us to know the features you want for the CLI.

willvedd avatar Dec 21 '23 14:12 willvedd

I would also like to see a higher number, but primarily so that I can determine easily how many particular errors of a specific kind have occurred. If a utility for the CLI allowed you to do this, it would probably be okay to cap the total number returned at 1000.

There doesn't seem to be a query to do this with the Lucene filters.

For example, I was trying to use the -n to do things like this: auth0 logs list --filter "type: f AND date:[2023-01-01 TO 2024-01-05]" | wc -l

DannyPat44 avatar Jan 04 '24 22:01 DannyPat44

@DannyPat44 Sorry for the late response, We started looking again into the issue.. We understand your feature requirement, what upper limit estimate is adequate for log entries in your case, So that we can check on its feasibility from our end. Thanks!

ramya18101 avatar Oct 04 '24 14:10 ramya18101

@DannyPat44 Hello again. We are actively working to clear our backlog and open issues. We'd be happy to hear if this is still something that we can fix to improve your experience while using the cli.

Let us know you inputs.

duedares-rvj avatar Oct 21 '24 12:10 duedares-rvj

@DannyPat44, we are closing this issue, For any further queries please open a new issue or reopen this.

ramya18101 avatar Oct 30 '24 05:10 ramya18101