-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
Require Java 11 #12843
Require Java 11 #12843
Conversation
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## trunk #12843 +/- ##
=======================================
Coverage 56.51% 56.51%
=======================================
Files 86 86
Lines 5255 5255
Branches 187 187
=======================================
Hits 2970 2970
Misses 2098 2098
Partials 187 187 ☔ View full report in Codecov by Sentry. |
This test is using the NettyClient directly, this should be fixed:
Does it make sense to have a bazel file in the jdk folder or could this just be part of the parent "../remote/http"? |
I don't know? I mostly copied what I saw Netty had done in the places that seemed to make sense. If you think we should change something, we probably should because I don't really know what I'm changing. 😆 |
I am no bazel expert too, there might be a reason for it :D |
I did some changes to make the bazel build work, i hope this is okay for you |
The "bazel way" is a build file per java package, so the |
The |
I had to remove the htmlunit-driver dependency to get rid of the asynchttpclient, this added a circular dependency what should be avoided. Beside some helper classes i could not find any use of the htmlunit-driver so i hope this is fine. Lets wait what the CI will tell us. |
Looks like we can transition those things when we require Java 17 next year: https://openjdk.org/jeps/380 |
@rbri is htmlunit-driver also moving to Java 11 requirement for the net release? Will that address the circular dependencies? |
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 don't understand why we need to make so many changes in a PR for this. We have always mentioned that moving completely to Java 11 is an iteration process.
Why don't we change the default http client, target Java 11 and that's it. The rest can be iterated little by little.
Long PRs are just too hard to review.
The circular dependency is now gone due to removal of the htmlunit-driver dependency. |
@diemol you are right about large PRs, but i think this PR is now ready. The CI is failing but this would also happen if only the default client has been changed. There is only one additional change here, the removal of the old netty client and it's dependencies (by removing the htmlunit-driver support). |
However, almost all CI workflows in Java are failing. We cannot merge like that. |
Yeah, I didn't want to keep distributing a library with a vulnerability, which is why I removed the netty client instead of just changing the default. Thanks @joerg1985 for doing all the work to clean up after me. 😁 I'll take a look at the failures tomorrow |
Okay then there should be single PRs created for all of the changes. |
java/src/org/openqa/selenium/remote/http/netty/NettyDomainSocketClient.java
Outdated
Show resolved
Hide resolved
java/test/org/openqa/selenium/remote/http/netty/NettyDomainSocketTest.java
Show resolved
Hide resolved
This also impacts the changes done as part of #11606. Hence the failing "DevToolsReuseTest" test. Earlier, this was not a problem since we used one instance of AsyncHttpClient and it was only closed when the JVM shuts down. With the JdkHttpClient, we use a new instance as required and close it too. Changes in #11345, which assigns the client to null is while closing causing the test failure and preventing re-use. It was done to prevent memory leaks. I am not sure about the right approach to address it. We might need to discuss/brainstorm over it. |
@pujagani is there a bug report for that? I can imagine that someone might bump into that situation when using the Java 11 client. |
Ok, the So I think we need a different test if we need a test for it. |
ff5f88e
to
b89ed8e
Compare
@diemol I don't think there is one. Will double check else I will create it and link it here. |
This is passing all the tests and looks right to me. The only issue is that I removed |
#12882 - Created an issue to track the regression |
I looked into it, but I don't think the current test can be modified without having another client library. Since Java HTTP Client does not support UNIX sockets. |
@joerg1985 Regarding the htmlunit-driver i think i have no chance - i have to move to Java 11. I like to stay with the support of the latest selenium version. |
But we're testing with java 17 and I think Java 17 does support it? Can we create an implementation in test code only? |
Ahh yes! I think that can be done. I am not sure how can we create an implementation in test code only but will be happy to take a took. |
* [java] require Java 11 * [java] remove netty http client and use native java client by default * [java] updated the list of exports * [java] use the default http client in tests * [java] removed --remote-allow-origins=* for the netty client * [java] removed the asynchttpclient and htmlunit-driver dependencies --------- Co-authored-by: Jörg Sautter <[email protected]>
…iumHQ#12843) Workaround was made as part of the fix (3f7f57c) the bug SeleniumHQ#11750 which was specific for netty client only. Since SeleniumHQ#12843 the netty client was removed.
… (#14134) * [java] Revert workaround for old netty http client (addendum to #12843) Workaround was made as part of the fix (3f7f57c) the bug #11750 which was specific for netty client only. Since #12843 the netty client was removed. * Running format script --------- Co-authored-by: Diego Molina <[email protected]> Co-authored-by: Diego Molina <[email protected]>
…iumHQ#12843) (SeleniumHQ#14134) * [java] Revert workaround for old netty http client (addendum to SeleniumHQ#12843) Workaround was made as part of the fix (3f7f57c) the bug SeleniumHQ#11750 which was specific for netty client only. Since SeleniumHQ#12843 the netty client was removed. * Running format script --------- Co-authored-by: Diego Molina <[email protected]> Co-authored-by: Diego Molina <[email protected]>
I'm sure there's a lot more that can be cleaned up that I'm missing, but I think this is the first step.
Description
Motivation and Context
Fixes #11526