-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Enable compiler warnings in xpack core plugin project #66899
Enable compiler warnings in xpack core plugin project #66899
Conversation
client/rest-high-level/src/main/java/org/elasticsearch/client/common/XContentSource.java
Outdated
Show resolved
Hide resolved
libs/x-content/src/main/java/org/elasticsearch/common/xcontent/ObjectPath.java
Outdated
Show resolved
Hide resolved
364943e
to
e369db6
Compare
Pinging @elastic/es-delivery (Team:Delivery) |
Hi @martijnvg , @pugnascotia , could you please review this PR? |
...main/java/org/elasticsearch/xpack/core/watcher/transform/chain/ExecutableChainTransform.java
Outdated
Show resolved
Hide resolved
...core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/XContentSource.java
Outdated
Show resolved
Hide resolved
...core/src/main/java/org/elasticsearch/xpack/core/watcher/support/xcontent/XContentSource.java
Outdated
Show resolved
Hide resolved
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 very much @vamuzumd, the PR needs a couple of tweaks but otherwise looks good.
5c775fd
to
c420a27
Compare
c6bcaa9
to
e32d7f1
Compare
Thanks for the feedback @pugnascotia ! |
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 apart from what @pugnascotia already mentioned
@elasticmachine test this please |
@vamuzumd there are compilation failures. I suggest running |
...re/src/test/java/org/elasticsearch/xpack/core/ml/dataframe/analyses/ClassificationTests.java
Outdated
Show resolved
Hide resolved
...n/core/src/test/java/org/elasticsearch/xpack/core/ml/dataframe/analyses/RegressionTests.java
Outdated
Show resolved
Hide resolved
.../test/java/org/elasticsearch/xpack/core/ml/inference/InferenceToXContentCompressorTests.java
Outdated
Show resolved
Hide resolved
.../core/src/test/java/org/elasticsearch/xpack/core/ml/inference/NamedXContentObjectsTests.java
Outdated
Show resolved
Hide resolved
@@ -81,6 +81,7 @@ | |||
private ArgumentCaptor<CreateIndexRequest> createRequestCaptor; | |||
private ArgumentCaptor<IndicesAliasesRequest> aliasesRequestCaptor; | |||
|
|||
@SuppressWarnings("unchecked") |
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.
We can use the anyActionListener()
trick here again, as well as defining a mockActionListener()
for the other compiler error.
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.
Sure, we could do that, but like the other case, this requires defining 4 helpers plus address the casting on line 100, hence leaving this as is. But please lmk if you think otherwise.
@elasticmachine ok to test |
@vamuzumd this is looking good, just a few things to fix up. I appreciate you tackling this work, some of the generics are...interesting 😱 |
99c0547
to
ac39aae
Compare
Seems like the test BootStrapTests.testTriggeredWatchLoading failed for elasticsearch-ci/2, which seems flaky and unrelated to my change based on stack trace. @pugnascotia, thoughts? Partial stacktrace java.lang.AssertionError: Count is 18 hits but 9 was expected. Total shards: 1 Successful shards: 1 & 0 shard failures: |
@pugnascotia, could you please review/sign-off this PR? Just hoping to avoid another merge conflict since the PR has a large number of files changed. |
Sorry @vamuzumd, I've been on vacation for the past week. |
@elasticmachine update branch |
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!
Thank you for your work @vamuzumd! |
@vamuzumd sorry for the noise, I should have added the right labels sooner. |
Co-authored-by: Elastic Machine <[email protected]>
Backported to |
This commit is part of issue #40366 to remove disabled lint warnings from gradle files. This PR renables Xlint warnings for XPack/plugin/core project by:-