Skip to content
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

fix: Fix remaining REST transport issues #1428

Merged
merged 4 commits into from Sep 6, 2022
Merged

Conversation

vam-google
Copy link
Contributor

@vam-google vam-google commented Sep 1, 2022

This change depends on googleapis/python-api-core#428 and needs api-core-2.9.0 to be released

This includes:

  1. Use message-based transcoding logic instead of dictionary-based. This fixes multiple bugs caused by dict-json-object representation mismatches fro protobuf objects. This also removes a lot of json->dict->object->proto-plus object conversion overhead, which was slow and very error-prone. Now all transcodding and rest-transport-specific logic is executed in terms of native protobuf (_pb) stubs objects. No dicts, no proto-plus, no unnecessary conversions.
  2. Fix for non-proto-plus objects in rest.py transport and in tests. This essential for APIs which have IAM methods defined on their surface.
  3. Fix support for Any field in tests
  4. Fix creation of mock_values (do mock_value1 instead of mock_value_1, since mock_value_1 causes issues for FieldMask mocks

This includes:
1) Use message-based transcoding logic instead of dictionary-based. This fixes multiple bugs caused by dict-json-object representation mismatches fro protobuf objects. This also removes a lot of `json->dict->object->proto-plus` object conversion overhead, which was slow and very error-prone. Now all transcodding and rest-transport-specific logic is executed in terms of native protobuf (`_pb`) stubs objects. No dicts, no proto-plus, no unnecessary conversions.
2) Fix for non-proto-plus objects in rest.py transport and in tests. This essential for APIs which  have IAM methods defined on their surface.
3) Fix support for Any field in tests
4) Fix creation of mock_values (do `mock_value1` instead of `mock_value_1`, since `mock_value_1` causes issues for FieldMask mocks
@vam-google vam-google requested review from a team as code owners September 1, 2022 23:08
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Sep 1, 2022
@vam-google
Copy link
Contributor Author

The showcase tests need to wait till api-core-2.9.0 gets released to pypi

@parthea parthea added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 6, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 6, 2022
@parthea parthea merged commit d30a80e into googleapis:main Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants