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

Fix logs tail issue when there are no logs #744

Merged
merged 6 commits into from
Apr 20, 2023
Merged

Fix logs tail issue when there are no logs #744

merged 6 commits into from
Apr 20, 2023

Conversation

sergiught
Copy link
Contributor

🔧 Changes

This PR fixes an issue with the auth0 logs tail command when there are no logs returned in the first api call, due to the fact that we're trying to send an empty lastLogID in the query params.

An unexpected error occurred while getting logs: 400 Bad Request: The query 'log_id:[ TO *]' cannot be parsed. Please revise the query or visit https://auth0.com/docs/logs/log-search-query-syntax for help.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@sergiught sergiught marked this pull request as ready for review April 19, 2023 14:22
@sergiught sergiught requested a review from a team as a code owner April 19, 2023 14:22
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 93.75% and project coverage change: +0.47 🎉

Comparison is base (f6112ce) 71.67% compared to head (817a6eb) 72.14%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #744      +/-   ##
==========================================
+ Coverage   71.67%   72.14%   +0.47%     
==========================================
  Files          89       89              
  Lines       11159    11158       -1     
==========================================
+ Hits         7998     8050      +52     
+ Misses       2658     2608      -50     
+ Partials      503      500       -3     
Impacted Files Coverage Δ
internal/cli/logs.go 97.93% <93.75%> (+36.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

internal/cli/logs_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@willvedd willvedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed fixed on a tenant that was having this issue 👍

@sergiught sergiught merged commit 26f9c4c into main Apr 20, 2023
@sergiught sergiught deleted the patch/fix-logs branch April 20, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants