-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Try to add cpp cross tests #3164
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
Conversation
- v0.16 is for those that does not support UUID type but that was added
- It appears that IPv6 is resolved in some cases causing the server to fail to start
- One can consider limiting this
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| # here we intentionally use an older version so that we also verify Java 17 compiles to it |
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.
Is this comment actually true?
I know Java compiled on an old version should work with newer versions: This is not the first time I run into the issue with a old version trying something compiled with a new version.
The logs print this:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/thrift/test/TestClientKt has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Which proves the statement wrong
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.
the comment about java 17 is probably a typo? the one we want to make sure is probably java 7 not 17?
I can't remember the exact details but I think we do want to maintain compatibility with older lts java versions.
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.
cc @jimexist to chime in.
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.
it was not a typo.
that UnsupportedClassVersionError likely from kotlin lib which isn't configured with the same compiler flags as the java lib project?
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.
@jimexist Thanks for dropping in and the update: I want to drop this change from my PR since it does not belong, but what is the correct fix for this that should go into the repo to ensure that java/kotlin tests pass without this issue?
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 created a ticket: THRIFT-5879: java and kotlin cross tests fail in the GitHub action
|
|
||
| { | ||
| std::shared_ptr<TSocket> socket(new TSocket("localhost", port)); | ||
| std::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port)); |
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.
This appears to be an issue with localhost getting resolved to the IPv6 address ::1 and stuff breaks.
I am actually reconsidering this commit and instead for the pipeline purge the IPv6 ::1 localhost from the /etc/hosts file in the pipeline.
Or one that knows more about IPv6 and the socket libs used can perhaps see if this can be fixed in the library; I don't know enough of IPv6 and the libraries used to know if this is even an option
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| # here we intentionally use an older version so that we also verify Java 17 compiles to it |
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.
the comment about java 17 is probably a typo? the one we want to make sure is probably java 7 not 17?
I can't remember the exact details but I think we do want to maintain compatibility with older lts java versions.
fishy
left a comment
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.
lgtm modulo the java version change
@fishy Thanks for you review thus far. The C++ SSL cross tests all still fail and I need some help to get past that. The worst case would be to mark them as known failures but ideally I would like to solve the issue. |
|
Specifically the part that I expect to work that is not is the java Server and C++ Client for SSL. For example in the cross tests logs (re-ordered them a bit to match pairs) |
|
There's probably some known issue with java cross test ssl handling. If you look at other cross tests, or history or cross tests of prior runs, it seems to only work between java-java and java-kotlin, and never worked with other languages. (by "never worked" I actually meant "have not worked for a looooong time") |
Thanks for the info, it does in deed look like a known issue. |
- Without this the protocol went into an infinite loop due to virtual function calls that recursed to itself - Best case was a crash, worst case was process got stuck
- Looked at all the protocols to check if they had the correct calls
| return proto_->writeBinary(str); | ||
| } | ||
|
|
||
| uint32_t THeaderProtocol::writeUUID(const TUuid& uuid) { |
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.
@Jens-G This is a bugfix for the THeaderProtocol.
Can I just create a Jira Ticket for it and we close it part of this PR (once I get there) or do I need to pull this out into a new PR for the issue?
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.
Can I just create a Jira Ticket for it and we close it part of this PR
I think either way is fine.
| return rv; | ||
| } | ||
|
|
||
| uint32_t readUUID(TUuid& uuid) { |
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 just saw this as missing, I will see if it makes sense to add a test for this protocol since I see there aren't any
- Easier to follow what was added and what not
|
I am starting to clean this up and split out the relevant parts to relevant PRs. @jimexist I still need some guidance on what is the correct fix for the kotlin error (#3164 (comment)) @Jens-G Can I bundle the two fixes into one PR that also adds the cross tests (#3164 (comment), #3164 (comment)) |
|
Hoping for some answers but closing this PR for the more cleaned up #3167 |
This PR tries to enable cpp cross tests
I am not sure if all of this is needed but I need help getting past the ssl issues, I have tried many, many times (Build#25 already) and SSL is outside of my comfort zone.
See some of my comments on my internal PR: CJCombrink#3
It appears to be something about either expired or self signed certificates or both 🤷
Any help will be appreciated