Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix #34: Data returned by graphQuery should return map[string]<non-pointer>type to be able to be serialized into structpb.Value#46

Merged
ytsarev merged 3 commits intoupbound:mainupbound/function-msgraph:mainfrom
jonasz-lasut:fix/#34-pointer-to-string-structpb-valuejonasz-lasut/function-msgraph:fix/#34-pointer-to-string-structpb-valueCopy head branch name to clipboard
Aug 27, 2025
Merged

Fix #34: Data returned by graphQuery should return map[string]<non-pointer>type to be able to be serialized into structpb.Value#46
ytsarev merged 3 commits intoupbound:mainupbound/function-msgraph:mainfrom
jonasz-lasut:fix/#34-pointer-to-string-structpb-valuejonasz-lasut/function-msgraph:fix/#34-pointer-to-string-structpb-valueCopy head branch name to clipboard

Conversation

@jonasz-lasut
Copy link
Contributor

Description of your changes

Fixes #34
Current tests were passing because the query values in tests are mocked and returned correctly as map[string]string however the queryResults in fn.go are returned as map[string]*string which can't be serialized into structpb.Value. I've added ptr.Derefs on all result values, tests did not require any updates as they were returning correct data type already.

I have:

  • Read and followed Crossplane's contribution process.
    - [] Added or updated unit tests for my change.

Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix!

@ytsarev ytsarev merged commit e1083b8 into upbound:main Aug 27, 2025
5 checks passed
@jonasz-lasut jonasz-lasut deleted the fix/#34-pointer-to-string-structpb-value branch August 27, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pointer to string cannot be put into structpb.Value

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.