-
Notifications
You must be signed in to change notification settings - Fork 122
DATA-2715: Change collector additional params to take in any instead of only strings #5058
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
base: main
Are you sure you want to change the base?
Conversation
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.
Great work Emerald! just had some very minor comments
if err := mimeType.UnmarshalTo(mimeStr); err != nil { | ||
return nil, err | ||
var mimeStr string | ||
// Try to unmarshal as StringValue first |
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.
lets add a comment about why we're unmarshaling as string first and then as value
@@ -70,9 +70,23 @@ func convertStringToAnyPB(str string) (*anypb.Any, error) { | |||
return anyVal, nil | |||
} | |||
|
|||
func convertMapToAnyPBMap(params map[string]interface{}) (map[string]*anypb.Any, error) { | |||
methodParams := map[string]*anypb.Any{} |
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.
question for my own understanding: why did we create this new function? is it different than the existing one we have?
Modified all usages of additionalParams to use map[string]interface{} rather than map[string]string
edited all local tests as well