-
Notifications
You must be signed in to change notification settings - Fork 28
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
Organize chronicle exporter by http and grpc #2044
base: release/v1.67.0
Are you sure you want to change the base?
Conversation
8176098
to
c6e9f62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just me, but calling this file util_test.go makes me think that it's a test file for util.go, not a util file for test files. test_util.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's fair. It probably doesn't need to be a separate file at anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code ended up only being used only in the http tests, so I moved it there instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be a later adjustment, but worth trying to break this out into a GRPC protoMarshaler and an HTTP protoMarshaler? The methods on protoMarshaler are largely only used by one of the two workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're probably right. I'll take a closer look at this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split the marshaler into a base struct, and separate http and grpc marshalers, and moved them into an internal package to ensure testing is clean.
customerID, err := uuid.Parse(cfg.CustomerID) | ||
if err != nil { | ||
return nil, fmt.Errorf("parse customer ID: %w", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens in both exporters but is only used as a parameter to newProtoMarshaler - if we don't split protoMarshaler into two, worth getting rid of that parameter and just doing the UUID parsing in newProtoMarsheler?
7e1001a
to
77e1571
Compare
77e1571
to
5c7ebbb
Compare
5c7ebbb
to
3fcfd6b
Compare
104caa3
to
40fbb1f
Compare
* Properly shut down chronicleexporter zombie goroutine * Fix lint * Fix the same problem for the GRPC workflow
3fcfd6b
to
160c0d7
Compare
This PR contains many changes so it may be wise to chunk it out into smaller changes. However, I'm opening it as a draft in order to facilitate feedback on the overall direction.
Changes included:
Future work: