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: convert []trace.Argument into map<string,EventData> #3510

Merged

Conversation

josedonizetti
Copy link
Collaborator

@josedonizetti josedonizetti commented Sep 27, 2023

This PRs converts []trace.Argument into map<string,EventData>, this code is temporary because later the event structure will be integrated into tracee, but I've created a test for all types to make sure we have cover all supported arguments.

pkg/server/grpc/event_data.go Outdated Show resolved Hide resolved
pkg/server/grpc/tracee.go Show resolved Hide resolved
pkg/server/grpc/tracee_test.go Outdated Show resolved Hide resolved
@josedonizetti josedonizetti force-pushed the add-event-data-to-stream-events branch 2 times, most recently from be28621 to 8ac236c Compare September 28, 2023 00:07
@josedonizetti josedonizetti marked this pull request as ready for review September 28, 2023 00:07
@josedonizetti josedonizetti changed the title wip fix: convert []trace.Argument into map<string,EventData> Sep 28, 2023
pkg/server/grpc/event_data.go Show resolved Hide resolved
pkg/server/grpc/tracee.go Outdated Show resolved Hide resolved
Comment on lines +52 to 57
err = grpcStream.Send(&pb.StreamEventsResponse{Event: eventProto})
if err != nil {
return err
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so, if we can't send is because the connection on the other side isn't there anymore for a a given reason, so we should stop sending and unsubscribe the client. WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, sounds reasonable

Copy link
Collaborator

@yanivagman yanivagman left a comment

Choose a reason for hiding this comment

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

LGTM

@josedonizetti josedonizetti merged commit 89b3348 into aquasecurity:main Sep 28, 2023
26 checks passed
@josedonizetti josedonizetti deleted the add-event-data-to-stream-events branch September 28, 2023 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants