Skip to content

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Emerald-Z
Copy link
Member

@Emerald-Z Emerald-Z commented Jun 16, 2025

Modified all usages of additionalParams to use map[string]interface{} rather than map[string]string

edited all local tests as well

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jun 16, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 16, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 16, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 17, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 17, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jun 17, 2025
Copy link
Member

@gloriacai01 gloriacai01 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 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
Copy link
Member

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{}
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants