-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
MINOR: Use JDK 11 in Vagrant after dropping JDK 8 #17576
Conversation
@dongnuo123 do you have a link trying this on branch builder? |
The branch builder is fine. The successful run is with the pr's change. But we need to run the whole suite of system tests to make sure the change doesn't break anything. Just triggered https://semaphore.ci.confluent.io/workflows/ccd7d20c-5752-47a1-8b9b-590bc77d7988?pipeline_id=a10cc826-0c91-4dd3-8d2c-fdae0373a446 |
Thanks @dongnuo123 for opening this! Let's confirm all the system tests look good before merging. |
We are planning to drop JDK 11 for server modules (https://issues.apache.org/jira/browse/KAFKA-16096), and the base image for E2E has already been updated to use JDK 17 (#17520). Therefore, maybe Vagrant should be updated to JDK 17 directly in this PR? |
I wasn't sure if there would be any incompatibilities if we drop older java versions with some of the older versions of Kafka used in the tests. But I suppose if we do see issues, maybe we don't need to test such old versions either. Looking at the test results, there were about 20 failures with java 11, and most looked unrelated to the change in jdk. @dongnuo123 do you want to try updating to java 17? |
In the container E2E tests, we've dropped some older versions as per KAFKA-14560. I think we can make similar changes for Vagrant. |
https://semaphore.ci.confluent.io/jobs/98fe335d-7619-47bc-a9b8-4c8449ec745a |
Looking at the test results, seems there were issues with tests up to 2.3.1. @chia7712 are we planning to drop up to that version? For comparison, with java 11, I only saw issues with 0.8.2.2 (which also fails for 17) |
Sorry, I can't access the Confluent link. Could you please share the details of the issue with me? Additionally, the new base line is 2.1 so 2.3.1 should work in compatibility tests.
What kind of issue are you referring to? The issue with upgrading to JDK 11 is that brokers older than version 1.0 can't run on JDK 11 (see KAFKA-5076), but #17427 has already removed them. |
@chia7712 you should be able to see this one: http://confluent-open-source-kafka-branch-builder-system-test-results.s3-us-west-2.amazonaws.com/trunk/2024-10-23--001.98fe335d-7619-47bc-a9b8-4c8449ec745a--1729721446--confluentinc--update-vagrant-jdk-version--8e89cc0d04/report.html sanity_checks.test_performance_services still runs with 0.8.2.2 and fails Most of the tests 2.0.x-2.3.x I mentioned fail because the server can't start up. I didn't dig deeper into why yet. |
Digging deeper, looks like an issue with ZK -- the brokers see and on ZK some connection/EOF exceptions |
open https://issues.apache.org/jira/browse/KAFKA-17879 for it |
I notice another issue and https://issues.apache.org/jira/browse/KAFKA-17883 will fix it |
@chia7712 any ideas about the ZK issues I saw in 2.0-2.3? I can try to do some more debugging as well. |
It seems Zookeeper client 3.4.x can't run under JDK 17 ... https://issues.apache.org/jira/browse/ZOOKEEPER-3779 I have opened https://issues.apache.org/jira/browse/KAFKA-17888 to fix it |
Awesome! Thanks @chia7712! Is there a way to set a jdk for specific tests? 🤔 |
Maybe we should pre-download different JDK versions and install them in /opt/..., similar to the Kafka versions. We could then enhance fix_opts_for_new_jvm to configure JAVA_HOME based on the Kafka version. |
@jolshan We'll file a PR later, and I think we can align the JDK folder structure with Vagrant by using /opt/jdk/$JDK_MAJOR. This means there will be two JDK folders: |
see #17625 |
We are removing zookeeper, so let's not spend time on getting it to run. Let's just move to jdk11 in the tests for now, and once the removal is fully done we can go to jdk17 (assuming Kafka 3.3 can run on that JDK) Please remember that the first production KRaft version with 3.3, and we do not support upgrades from versions earlier than that. (We will test older clients, of course, but clients don't use ZK.) |
Looks like we should just convert the streams, connect, and clients tests to not use ZK 👍 |
tests/setup.py
Outdated
@@ -51,7 +51,7 @@ def run_tests(self): | |||
license="apache2.0", | |||
packages=find_packages(), | |||
include_package_data=True, | |||
install_requires=["ducktape==0.12.0", "requests==2.31.0", "psutil==5.7.2"], | |||
install_requires=["ducktape==0.8.14", "requests==2.24.0", "psutil==5.7.2"], |
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.
Let's also remember to revert this :) and keep 0.12
several PRs landed recently:
still waiting for part 1 |
Do you mean that we don't need to test the new client (4.0) producing and consuming from older brokers (2.1 to 2.3)? |
For clients, I have this massive PR opened (but it's WIP). It removes ZK from as many places as easily possible for system and integration tests. |
This is a fair question. 2.3 was released in mid-2019, so more than 5 years ago at this point. When 2.3 was released, we didn't test it against Kafka 0.7, which at that point was 7 years old. So there is some precedent? If we do choose to keep around testing of new clients against very old Kafka brokers, we probably should consider forking the KafkaService class in the python code. Otherwise the KafkaService will become increasingly hard to evolve. |
I took a look at KIP-896 and it does specify that we should support Kafka 2.1... hmm... |
OK here is what I'm thinking:
|
So basically I'm proposing:
|
If the ZooKeeper version in the list is the one used by the Kafka release, it might be slightly different from the version in the source code. kafka 2.1 ~ 2.3 -> zk 3.4.14 Additionally, I propose to manually upgrade the zk version from kafka 2.4 -> zk 3.5.7 kafka 2.5 -> zk 3.5.8 kafka 2.4 ~ 2.8 -> zk 3.5.9 |
I prefer using a single JDK version (17) to run all E2E tests after we address ZOOKEEPER-3779 for Kafka versions 2.1 to 2.3.
Maybe we should use ZooKeeper 3.5.7 instead, if the workaround for ZOOKEEPER-3779 is acceptable. I ran client_compatibility_produce_consume_test.py after manually upgrading ZooKeeper to 3.5.7 (see this comment), and it works well. |
That's fine. The ZooKeeper server 3.4.9 is compatible with all the clients shipped in Kafka 2.x
We don't need to fix ZOOKEEPER-3779 because we're never going to use ZooKeeper with java 14. ZooKeeper is the past, not the future.
Those old Kafka versions don't support JDK17. You need to run them with jdk8.
ZK 3.5.7 is not compatible with Kafka 2.1 Please read KIP-902 |
Pardon me, is there any other issue, aside from ZOOKEEPER-3779, that prevents Kafka versions [2.1, 2.2, 2.3] from running on JDK 17?
Do you mean Kafka versions [2.1, 2.2, 2.3] can't use the ZooKeeper 3.5.7 client? If so, I didn't see that mentioned in KIP-902. Additionally, it seems that PR #6802, which upgraded ZooKeeper from 3.4.x to 3.5.x, didn't change the use of ZooKeeper APIs (except for running the ZooKeeper main, which is unrelated to the E2E compatibility test we're discussing). It seems to me that the root cause is the |
@cmccabe Are there any concerns with replacing zk 3.4.x jar with zk 3.5 jar for Kafka versions 2.1, 2.2, and 2.3? With this change, we can simplify the software versions used in E2E tests as follows:
Please correct me if I misunderstand anything :) |
…DK 8" to allow system tests to run
Hey folks, where do we stand here? Do we want to close this PR in favor of the other one or something else? |
If the approach of upgrading the ZK client to 3.5.x is acceptable, this PR can include the following changes:
|
@chia7712 sorry for the delay, we had a holiday in the US yesterday. I think the approach sounds fine, but wasn't sure if we typically updated ZK like this without a KIP or anything. It is also a bit odd since it will only be used in tests. But reading on the previous messages, it seems like this is the only way forward for these older versions that require ZK? If so, then it seems like our best bet to unblock these tests. |
KIP-902 does have a chart in it that indicates the older kafka versions aren't compatible, so I think we should sort that area out before proceeding. |
Yes, that approach can simplify our E2E environment, as we can use
Pardon me, are we taking about this chart? If so, the chart is about which version of the ZooKeeper client is used by Kafka and the compatibility between the ZooKeeper client and server versions. Additionally, we don't test rolling upgrades from versions 2.1 to 2.3 to newer versions. The main concern with replacing the ZooKeeper 3.4 client JAR with the 3.5 JAR is whether the ZooKeeper 3.5 client introduces API changes. The answer is yes—some APIs have been moved to The following table is the env used to running Kafka in E2E.
Note that the |
There are some typo in there, we update the zookeeper version is 3.5.7, so the table which is the env used to running Kafka in E2E will be:
|
If we've merged #17625 then this should be ok to merge too? Did we want to change it back to 17? |
So we should do that all together in a separate pr for 17? And close this one for 11? |
yes! |
Opened a new PR with jdk 17 and zk versions replaced #17861 |
We have dropped JDK 8 and now use JDK 11 as the minimum version. This PR updates the
jdk_major
andjdk_full
versions used by Vagrant to JDK 11.Committer Checklist (excluded from commit message)