Skip to content

fix: handle already quoted protojson wkt#1294

Merged
noahdietz merged 3 commits intogoogleapis:mainfrom
noahdietz:already-quote-wkt
Apr 18, 2023
Merged

fix: handle already quoted protojson wkt#1294
noahdietz merged 3 commits intogoogleapis:mainfrom
noahdietz:already-quote-wkt

Conversation

@noahdietz
Copy link
Contributor

@noahdietz noahdietz commented Apr 12, 2023

Since protojson encodes WKT with quotations already, quoting it again actually breaks parsing. This blocks gapic-generator-go's adoption of the latest release: https://github.com/googleapis/gapic-generator-go/actions/runs/4669784400/jobs/8268694956?pr=1276.

Only wrap with quotes if it isn't already.

@noahdietz noahdietz enabled auto-merge (squash) April 18, 2023 22:27
Copy link
Contributor

@vchudnov-g vchudnov-g left a comment

Choose a reason for hiding this comment

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

Oh, this is getting called when parsing body fields as well? When working on #1282 I somehow convinced myself this wasn't getting called in that case and removed code I originally had to check for pre-existing parsing. Ooops. Thanks for fixing this. (And apologies for not seeing the post-merge comments on that PR; thanks for pinging me.)

@noahdietz noahdietz merged commit f74f03d into googleapis:main Apr 18, 2023
@noahdietz
Copy link
Contributor Author

Oh, this is getting called when parsing body fields as well?

I don't think so! The test error I linked to was using a Standard Update, which encodes the update_mask in the query params.

Thanks for fixing this. (And apologies for not seeing the post-merge comments on that PR; thanks for pinging me.)

All good! GitHub Notifications are kind of all over the place, I don't mind pinging (probably should've started with that tbh)

@noahdietz noahdietz deleted the already-quote-wkt branch April 18, 2023 23:57
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.

2 participants