Enable compiler warnings in xpack core plugin project#66899
Enable compiler warnings in xpack core plugin project#66899pugnascotia merged 18 commits intoelastic:masterfrom
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
pugnascotia
left a comment
There was a problem hiding this comment.
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 ! |
breskeby
left a comment
There was a problem hiding this comment.
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
| private ArgumentCaptor<CreateIndexRequest> createRequestCaptor; | ||
| private ArgumentCaptor<IndicesAliasesRequest> aliasesRequestCaptor; | ||
|
|
||
| @SuppressWarnings("unchecked") |
There was a problem hiding this comment.
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.
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 |
|
Thank you for your work @vamuzumd! |
|
@vamuzumd sorry for the noise, I should have added the right labels sooner. |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
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:-