CJCombrink opened a new pull request, #3144:
URL: https://github.com/apache/thrift/pull/3144

   <!-- Explain the changes in the pull request below: -->
     Trying to get cross tests to work:
   
   @Jens-G I am trying to investigate a possible issue with the UUID type 
between implementations.
   These are some changes I had to make to get me going. If you perhaps have 
some time to look through and maybe comment or consider why the CI build does 
not need these changes.
   
   I am following the steps as per [Raw Commands for Building with 
Docker](https://github.com/apache/thrift/tree/master/build/docker#raw-commands-for-building-with-docker)
   
   ```
   docker build --build-arg uid=$(id -u) --build-arg gid=$(id -g) -t 
thrift-jammy build/docker/ubuntu-jammy
   docker run -v $(pwd):/thrift/src -it thrift-jammy /bin/bash
   build/docker/scripts/cross-test.sh
   ```
   
   My current observation is that the Java and Swift implementation of UUID is 
not correct as per the spec: [Universal unique identifier 
encoding](https://github.com/apache/thrift/blob/master/doc/specs/thrift-binary-protocol.md#universal-unique-identifier-encoding)
   
   My current test includes running one server and running another client. 
   What I observe: I check the UUID being sent by the client and the UUID as 
reported by the server. In all cases the expectation is that what is sent is 
received and then returned. This however is not the case. 
   
   For all of these I am running the C++ server: 
`/thrift/src/test/cpp/TestServer --port=37471`
   | Language | Client Sent | Server Received | cmd | 
   | --- | --- | --- | --- |
   | C++ | `00112233-4455-6677-8899-aabbccddeeff` | 
`00112233-4455-6677-8899-aabbccddeeff`  | `/thrift/src/test/cpp/TestClient 
--port=37471` | 
   | Java | `00112233-4455-6677-8899-aabbccddeeff` | 
**`8899aabb-ccdd-eeff-0011-223344556677`** | 
`/thrift/src/lib/java/build/runclient --port=37471` |
   | go | `00112233-4455-6677-8899-aabbccddeeff` | 
`00112233-4455-6677-8899-aabbccddeeff` | `/thrift/src/test/go/bin/testclient 
--port=37471` |
   | swift | `00112233-4455-6677-8899-aabbccddeeff` | 
**`8899aabb-ccdd-eeff-0011-223344556677`** | 
`thrift/src/test/swift/CrossTests/.build/x86_64-unknown-linux-gnu/debug/TestClient
 --port=37471`
   | .NET | `00112233-4455-6677-8899-aabbccddeeff` | 
`00112233-4455-6677-8899-aabbccddeeff` | 
`/thrift/src/test/netstd/Client/bin/Release/net9.0/Client` | 
   
   - 'Client Sent' is the string that is hard coded in the client, and printed 
on the console when the client is run
   - 'Server Received' is what the server interpreted and printed to the console
    
   That about covers the php support except for Haxe and Delphi as per the 
[LANGUAGES.md](https://github.com/apache/thrift/blob/master/LANGUAGES.md) (I am 
having trouble building Delphi as seen in the cross-test.sh script.
   
   From the above at least the C++, go and .NET implementations are compatible 
(and I would argue correct)
   
   NB: This is not about what the client sends and receives: The client that 
sends the UUID receives the same UUID which means the server re-transmits 
as-is. The issue is about what one langauge sends (encode) and what another 
language receives (decode).
   
   **Where to from here?** 
   
   1. First I would like someone else to look into this and confirm or deny my 
hypothesis
   2. If there is a mismatch, irrespective of which implementation is correct, 
this is a problem and should be addressed.
       - I don't know if this can be changed, it probably depends on the how 
strict is the spec and how wide is adoption
       - I know of projects using the C++ and go side already (with interop) 
    3. I need UUIDs to work for C++, Java, JS (no support yet), python (no 
support yet)
   
   
   <!-- We recommend you review the checklist/tips before submitting a pull 
request. -->
   
   - [ ] Did you create an [Apache 
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?  
([Request account here](https://selfserve.apache.org/jira-account.html), not 
required for trivial changes)
       - No, I first want engagement on this before making a ticket
   - [ ] If a ticket exists: Does your pull request title follow the pattern 
"THRIFT-NNNN: describe my issue"?
   - [ ] Did you squash your changes to a single commit?  (not required, but 
preferred)
   - [ ] Did you do your best to avoid breaking changes?  If one was needed, 
did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere 
in the commit message to free up build resources.
   
   <!--
     The Contributing Guide at:
     https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
     has more details and tips for committing properly.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@thrift.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to