-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Replace LegacyESVersion.fromString with Version.fromString #18567
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
base: main
Are you sure you want to change the base?
Conversation
❌ Gradle check result for 4dbba59: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@@ -349,7 +348,7 @@ public void validateRole(List<DiscoveryNodeRole> roles) { | |||
* The version that {@link #REMOTE_CLUSTER_CLIENT_ROLE} is introduced. Nodes before this version do not have that role even | |||
* they can connect to remote clusters. | |||
*/ | |||
public static final Version REMOTE_CLUSTER_CLIENT_ROLE_VERSION = LegacyESVersion.fromString("7.8.0"); |
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.
REMOTE_CLUSTER_CLIENT_ROLE_VERSION
and LEGACY_ROLES
(L354) are not used in the code base. Let's remove these variables entirely.
Thanks @quangdutran for the changes. In DiscoveryNodeRole.java, the usages are probably dead-code and you can safely delete those consumers of LegacyESVersion usage. In test classes, I don't have any comments - LGTM. One more thing you should do is to delete the class LegacyESVersion.java which I assume should not have any usage in the package. Given its not a publicly exposed class, it should be safe to delete without any issues. Deleting it will also ensure that we didn't missed any usage of it. |
There's a meta parent task #18387, which covers the work that needs to be done to safely remove |
Thanks @msfroh for the clarification. In that case, @quangdutran please address the comment on DiscoveryNodeRole.java and get the CI to pass - rest everything LGTM! |
❌ Gradle check result for 7c3566a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for e1122c0: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
I don't know why the test is kinda flaky and random. I tried gradle check locally and it did not report any failure but the pipeline just fails with random tests, which are not really related to my change IMO. Latest fail because of Could you give me an advice on this? |
Unfortunately, we do have some tests that fail randomly. I just retriggered the test run to see if we have better luck next time. It looks like at some point, Incidentally, specific line that's failing on |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18567 +/- ##
============================================
- Coverage 72.80% 72.75% -0.05%
+ Complexity 68437 68397 -40
============================================
Files 5563 5563
Lines 314174 314172 -2
Branches 45554 45554
============================================
- Hits 228726 228583 -143
- Misses 66871 67019 +148
+ Partials 18577 18570 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The detect breaking changes workflow is failing with:
We know that So, do we add it back to make our tools happy and only remove it in 4.0? Maybe. At the very least, we need to do a better job of flagging the things that should be removed in the next major version. We clearly didn't remove enough stuff in 2.0 or 3.0 (since this should have been removed in 2.0). I really disagree with the API BWC policy that we've decided to enforce, but of course, I'm approaching it from the perspective of a core developer whose hands are tied, rather than from the perspective of a plugin developer who potentially experiences toil when core APIs change. |
Tl;dr: I hate this, but I think we need to add back that stupid, useless, unused field in order to make our tools happy. |
Signed-off-by: Du Tran <[email protected]>
…nused constant Signed-off-by: Du Tran <[email protected]>
…nge verification Signed-off-by: Du Tran <[email protected]>
❌ Gradle check result for 74fce13: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
Replace LegacyESVersion.fromString with Version.fromString
Related Issues
Resolves #18392
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.