-
Notifications
You must be signed in to change notification settings - Fork 113
Fix Error handling and add test coverage for Thrift2ProtoAdapter #950
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1324,6 +1324,65 @@ public final class ProtoObjects { | |
public static final UpdateDomainResponse UPDATE_DOMAIN_RESPONSE = | ||
UpdateDomainResponse.newBuilder().setDomain(DOMAIN).build(); | ||
|
||
public static final GetSearchAttributesRequest GET_SEARCH_ATTRIBUTES_REQUEST = | ||
GetSearchAttributesRequest.getDefaultInstance(); | ||
|
||
public static final RegisterDomainResponse REGISTER_DOMAIN_RESPONSE = | ||
RegisterDomainResponse.getDefaultInstance(); | ||
|
||
public static final DeprecateDomainResponse DEPRECATE_DOMAIN_RESPONSE = | ||
DeprecateDomainResponse.getDefaultInstance(); | ||
|
||
public static final SignalWorkflowExecutionResponse SIGNAL_WORKFLOW_EXECUTION_RESPONSE = | ||
SignalWorkflowExecutionResponse.getDefaultInstance(); | ||
|
||
public static final RequestCancelWorkflowExecutionResponse | ||
REQUEST_CANCEL_WORKFLOW_EXECUTION_RESPONSE = | ||
RequestCancelWorkflowExecutionResponse.getDefaultInstance(); | ||
|
||
public static final TerminateWorkflowExecutionResponse TERMINATE_WORKFLOW_EXECUTION_RESPONSE = | ||
TerminateWorkflowExecutionResponse.getDefaultInstance(); | ||
|
||
public static final GetClusterInfoRequest GET_CLUSTER_INFO_REQUEST = | ||
GetClusterInfoRequest.getDefaultInstance(); | ||
|
||
public static final RespondDecisionTaskFailedResponse RESPOND_DECISION_TASK_FAILED_RESPONSE = | ||
RespondDecisionTaskFailedResponse.getDefaultInstance(); | ||
|
||
public static final RespondActivityTaskCompletedResponse | ||
RESPOND_ACTIVITY_TASK_COMPLETED_RESPONSE = | ||
RespondActivityTaskCompletedResponse.getDefaultInstance(); | ||
|
||
public static final RespondActivityTaskCompletedByIDResponse | ||
RESPOND_ACTIVITY_TASK_COMPLETED_BY_ID_RESPONSE = | ||
RespondActivityTaskCompletedByIDResponse.getDefaultInstance(); | ||
|
||
public static final RespondActivityTaskFailedResponse RESPOND_ACTIVITY_TASK_FAILED_RESPONSE = | ||
RespondActivityTaskFailedResponse.getDefaultInstance(); | ||
|
||
public static final RespondActivityTaskFailedByIDResponse | ||
RESPOND_ACTIVITY_TASK_FAILED_BY_ID_RESPONSE = | ||
RespondActivityTaskFailedByIDResponse.getDefaultInstance(); | ||
|
||
public static final RespondActivityTaskCanceledResponse RESPOND_ACTIVITY_TASK_CANCELED_RESPONSE = | ||
RespondActivityTaskCanceledResponse.getDefaultInstance(); | ||
|
||
public static final RespondActivityTaskCanceledByIDResponse | ||
RESPOND_ACTIVITY_TASK_CANCELED_BY_ID_RESPONSE = | ||
RespondActivityTaskCanceledByIDResponse.getDefaultInstance(); | ||
|
||
public static final RespondQueryTaskCompletedResponse RESPOND_QUERY_TASK_COMPLETED_RESPONSE = | ||
RespondQueryTaskCompletedResponse.getDefaultInstance(); | ||
|
||
public static final ResetStickyTaskListResponse RESET_STICKY_TASK_LIST_RESPONSE = | ||
ResetStickyTaskListResponse.getDefaultInstance(); | ||
|
||
public static final RefreshWorkflowTasksRequest REFRESH_WORKFLOW_TASKS_REQUEST = | ||
RefreshWorkflowTasksRequest.getDefaultInstance(); | ||
|
||
public static final RefreshWorkflowTasksResponse REFRESH_WORKFLOW_TASKS_RESPONSE = | ||
RefreshWorkflowTasksResponse.getDefaultInstance(); | ||
|
||
Comment on lines
+1384
to
+1385
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
private ProtoObjects() {} | ||
|
||
private static Payload payload(String value) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.