You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix bug where named exceptions translated to ApplicationError.UNKNOWN
Summary:
Tests were showing services throwing `ApplicationError.UNKNOWN` when a named thrift exception was expected.
This is a result of `types/cython_python_type` resolving to `object` when in-place migrate enabled. In the two places changed in this diff, the python type is needed, not the cython type.
For regular build, `types/cython_python_type` and `types/python_type` are equivalent, so there is no change to trunk behavior.
The other flavor of issues is being careful about py3 vs python type before/after thrift-python converter. The inter-conversion is cheap, but have to get it right.
Reviewed By: prakashgayasen
Differential Revision: D72479041
fbshipit-source-id: 21363b1c7ed2844a8ca5ed6210098eed51c8abaf
Copy file name to clipboardExpand all lines: third-party/thrift/src/thrift/compiler/generate/templates/py3/stream/cython_cpp_value_to_python_value.mustache
result = ServerStream_cint32_t._fbthrift_create(cmove(createAsyncIteratorFromPyIterator[cint32_t](result, get_executor(), &getNextGenerator_PubSubStreamingService_servicethrows)))
result = ServerStream_cint32_t._fbthrift_create(cmove(createAsyncIteratorFromPyIterator[cint32_t](result, get_executor(), &getNextGenerator_PubSubStreamingService_servicethrows2)))
result = ServerStream_cint32_t._fbthrift_create(cmove(createAsyncIteratorFromPyIterator[cint32_t](result, get_executor(), &getNextGenerator_PubSubStreamingService_boththrows)))
result = ServerStream_cint32_t._fbthrift_create(cmove(createAsyncIteratorFromPyIterator[cint32_t](result, get_executor(), &getNextGenerator_PubSubStreamingService_responseandstreamservicethrows)))
result = ServerStream_cint32_t._fbthrift_create(cmove(createAsyncIteratorFromPyIterator[cint32_t](result, get_executor(), &getNextGenerator_PubSubStreamingService_responseandstreamboththrows)))
0 commit comments