-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[java] add deprecation notices to Grid logs and Java stdout #10408
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #10408 +/- ##
=======================================
Coverage 46.30% 46.30%
=======================================
Files 86 86
Lines 5799 5799
Branches 277 277
=======================================
Hits 2685 2685
Misses 2837 2837
Partials 277 277 Continue to review full report at Codecov.
|
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.
Thank you @titusfortner! Using parameterized logging is better performance-wise rather than string concatenation. I made a quick fix for that and now SonarLint should be happy.
Appreciate the effort, especially the data-backed details in the pull request template. The changes look good to me 👍
SonarCloud Quality Gate failed. |
45effe5
to
d2dd2d6
Compare
Well... This code isn't right :( MutableCapabilities caps = new MutableCapabilities();
caps.setCapability("browserName", "firefox");
RemoteWebDriver driver = new RemoteWebDriver(caps);
|
So, this code is weird. So, passing in an Options instance will always add Fortunately, This should work for the scenario where the Java bindings are sending invalid capabilities, but I need to run a bunch more tests to make sure. I'm not certain how this applies to the scenario where something is sending commands to the grid, yet. |
67a4374
to
3aa1a05
Compare
I tested this a number of ways including building the grid with this code and testing it with Selenium 3 Ruby & Python bindings. This should do exactly what we want for local Java client code which always goes through this loop in an expected way. It will log results to console. For grid it is trickier because the messages are in the grid logs not stdout. Also, because of grid weirdness (https://gist.github.com/titusfortner/1956ca0e863b5fa7baff9a61ebbe135b), it won't always log a problem, even when the user is doing the wrong thing. Either way, I think this is the best we're going to get as far as warning users of the change, and the weirdness will get fixed when we start removing the extra stuff. |
673caeb
to
a14aae3
Compare
I moved this back to draft so we can figure out if we can log issues when people use |
SonarCloud Quality Gate failed. |
Implemented via a297017 |
Update
I had to change the code quite a bit because what Java was building and what the Grid was receiving turned out to be more different than I realized. So most of the discussion in this initial post is out of date.
As discussed in TLC meeting today, to address #10374
Note: this is in DRAFT until we add the documentation (and update the URL as desired) and write the blog post.This is what the output looks like: https://gist.github.com/titusfortner/f75a3bff9b1b9946687ae8069f112f7f
4 conditions:
One issue is for use case 2, if the user is working with Selenium 3.0 - 3.8.1 (handshake, but not fully w3c compliant), Selenium reports w3c mode, but will attempt to convert any commands that aren't w3c compliant. So these people might likely wouldn't get warnings, but would have code stop working after we remove deprecations. The bright side is that only 6% of downloads are in this range for Java, and the likelihood that these people have not updated their client version, but *have updated their Grid version is likely an extremely small cross-section