Closed jrhee17 closed 2 months ago
@KarboniteKream would you check the breaking change that may affect your service?
Thanks, I'll test it today. You just want to make sure that TTEXT
still works for our CMS APIs?
Serialized messages using TTextProtocol
+ typdef Enum
+ useNamedEnums=true
using thrift compiler >=0.19 can't be read using messages compiled with an older version (<0.19).
e.g. If a client with (TTextProtocol
+ typdef Enum
+ useNamedEnums=true
+ >=0.19
generated message) sends a request to a server (<0.19) then the server won't be able to parse the message.
This may or may not be a problem depending on your use-case.
In this specific case, the client and the server are using the same Thrift version, so this should not be causing issues.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 74.76%. Comparing base (
3596b3b
) to head (50290a2
). Report is 3 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Motivation:
Support for thrift 0.19/0.20 has been requested internally.
Notably, there has been two changes upstream.
For the first change, test files have been modified so that HttpClient/Jakarta related classes can be overwritten.
The second change is interesting because generated messages for
typdef
enums are now correctly set as anEnumMetadata
. As a result of this, usingTTextProtocol
withuseNamedEnums=true
now yields the correct output (typedef
enums serialized as the enum name). This is consistent with the other enum serialization results as well.One downside of this is older version messages (generated with thrift<0.19) cannot deserialize a typedef enum field by enum name. This is because a
FieldValueMetaData
is used, and it is not possible to know which enum the field is linked to unless we parse the thrift file manually.Modifications:
ServletTestUtils
so thatThriftOverHttpClientTServletIntegrationTest
can be shared across modules.ApacheClientUtils
so thatThriftDocServiceTest
,ThriftOverHttp1Test
can be shared across modules.Base64
librarytypdef
enums are now correctly set, soTTextProtocolTest#tTextNamedEnumProtocolReadWriteTest
has been modified to check if the generatedtypedef
value is a enum ordinal or name.Result: