Skip to content

Conversation

@CJCombrink
Copy link
Contributor

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

- 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
Copy link
Contributor Author

@CJCombrink CJCombrink Jun 6, 2025

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

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

@jimexist jimexist Jun 6, 2025

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


{
std::shared_ptr<TSocket> socket(new TSocket("localhost", port));
std::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port));
Copy link
Contributor Author

@CJCombrink CJCombrink Jun 6, 2025

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
Copy link
Member

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 fishy added c++ github_actions Pull requests that update GitHub Actions code labels Jun 6, 2025
@fishy fishy requested a review from jimexist June 6, 2025 16:00
Copy link
Member

@fishy fishy left a 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

@CJCombrink
Copy link
Contributor Author

lgtm modulo the java version change

@fishy Thanks for you review thus far.
As mentioned, I want to drop the java change but something needs to be fixed to fix the java/kotlin cross tests.

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.

@CJCombrink
Copy link
Contributor Author

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)

...
java-cpp                binary            zlib-ip                  success
java-cpp                binary            zlib-ip-ssl              failure(-6)
...
java-cpp                binary            framed-ip                success
java-cpp                binary            framed-ip-ssl            failure(-6)
...

@fishy
Copy link
Member

fishy commented Jun 11, 2025

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")

@CJCombrink
Copy link
Contributor Author

There's probably some known issue with java cross test ssl handling

Thanks for the info, it does in deed look like a known issue.
I am trying to spend some time to figure out why does cpp <-> cpp not all work and then perhaps see where I am at and maybe mark the ssl ones as know issues.

- 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) {
Copy link
Contributor Author

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?

Copy link
Member

@Jens-G Jens-G Jun 12, 2025

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) {
Copy link
Contributor Author

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

@CJCombrink
Copy link
Contributor Author

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))

@CJCombrink
Copy link
Contributor Author

Hoping for some answers but closing this PR for the more cleaned up #3167

@CJCombrink CJCombrink closed this Jun 12, 2025
@CJCombrink CJCombrink mentioned this pull request Jun 19, 2025
5 tasks
@CJCombrink CJCombrink deleted the test/add_cpp_cross_tests branch November 6, 2025 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants