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

Handle instances where scope is returned as array in log entries #194

Merged
merged 3 commits into from
Apr 17, 2023

Conversation

ewanharris
Copy link
Contributor

🔧 Changes

This implements a custom UnmarshalJSON function for the Log type that will handle the differing types of scope. Although this is documented to be a string it appears in some instances (from checking, only fsa type events) to be an array of strings.

Unlike other instances where we have to implement this functionality, we do not need to implement a MarshalJSON function as we can only read the Log type, i.e. there is no create or update functionality exposed.

📚 References

#189

🔬 Testing

Covered by unit tests

📝 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)

@ewanharris ewanharris requested a review from a team as a code owner April 17, 2023 14:09
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 82.14% and project coverage change: -0.06 ⚠️

Comparison is base (d27ed55) 94.92% compared to head (4bb7ab4) 94.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
- Coverage   94.92%   94.87%   -0.06%     
==========================================
  Files          38       38              
  Lines        6858     6886      +28     
==========================================
+ Hits         6510     6533      +23     
- Misses        278      282       +4     
- Partials       70       71       +1     
Impacted Files Coverage Δ
management/log.go 67.39% <82.14%> (+22.94%) ⬆️

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.

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.

Great work. Will fix the auth0 logs list and auth0 logs tail commands in the Auth0 CLI.

@ewanharris ewanharris changed the title Handle instances where scope is returned as an array in log entries Handle instances where scope is returned as array in log entries Apr 17, 2023
@ewanharris ewanharris merged commit 8f9db60 into main Apr 17, 2023
@ewanharris ewanharris deleted the fix/189-log-scope-differences branch April 17, 2023 14:29
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