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(audit): allow to send events with complex payload to kafka with avro #3827

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

erka
Copy link
Collaborator

@erka erka commented Jan 20, 2025

There is no easy way to provide all possible schemas for event payload.
As workaround if the payload map have complex type it will be converted
into json string if avro encoding is enabled.

fixes #3825

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 64.86%. Comparing base (ac008ce) to head (f9765ee).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/server/audit/kafka/avro.go 72.72% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3827      +/-   ##
==========================================
+ Coverage   64.80%   64.86%   +0.06%     
==========================================
  Files         171      171              
  Lines       17387    17397      +10     
==========================================
+ Hits        11267    11284      +17     
+ Misses       5423     5415       -8     
- Partials      697      698       +1     
Flag Coverage Δ
unittests 64.86% <75.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

There is no easy way to provide all possible schemas for event payload.
As workaround if the payload map have complex type it will be converted
into json string if avro encoding is enabled.

Signed-off-by: Roman Dmytrenko <[email protected]>
@erka erka force-pushed the rd/audit-kafka-avro branch from f891367 to f9765ee Compare January 20, 2025 20:49
@erka erka marked this pull request as ready for review January 20, 2025 20:50
@erka erka requested a review from a team as a code owner January 20, 2025 20:50
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 20, 2025
Copy link
Collaborator

@markphelps markphelps left a comment

Choose a reason for hiding this comment

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

Thank you @erka !! looks great

@erka erka merged commit b994a43 into main Jan 20, 2025
40 checks passed
@erka erka deleted the rd/audit-kafka-avro branch January 20, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[audit] Issue with audit event when create/edit Segment and Rollout with Kafka sink
2 participants