Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 Error handling and add test coverage for Thrift2ProtoAdapter #950
Fix Error handling and add test coverage for Thrift2ProtoAdapter #950
Changes from all commits
8e2b988
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 1303 in src/main/java/com/uber/cadence/internal/compatibility/Thrift2ProtoAdapter.java
src/main/java/com/uber/cadence/internal/compatibility/Thrift2ProtoAdapter.java#L1303
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.
I'm not 100% sure how much we care about these, but if we do care about them, is there some kind of assertion we can add to ensure that they're mapped for all future fields too? (maybe reflection?)
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.
For any type that we have a mapper for we use MapperTestUtil to assert that all fields are set (or a select set are missing if we haven't updated the mappers for them). We do similar things with some of the types contained within the requests(decisions and history events) as well as enums.
These types don't actually exist in thrift (the thrift APIs return void, something we never do in gRPC) so there aren't any mappers. It seems very unlikely we'd add fields to these types until after we completely remove thrift, at which point this Thrift2Proto layer won't exist at all. So I don't think it's worth testing these ones the way all the others are tested.