-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Deprecate public methods and variables that contain 'master' terminology in 'test/framework' directory #3978
Merged
tlfeng
merged 5 commits into
opensearch-project:main
from
tlfeng:deprecate-master-method-test
Jul 22, 2022
Merged
Deprecate public methods and variables that contain 'master' terminology in 'test/framework' directory #3978
tlfeng
merged 5 commits into
opensearch-project:main
from
tlfeng:deprecate-master-method-test
Jul 22, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
…Node Signed-off-by: Tianli Feng <[email protected]>
tlfeng
added
enhancement
Enhancement or improvement to existing feature or request
deprecate
v3.0.0
Issues and PRs related to version 3.0.0
backport 2.x
Backport to 2.x branch
v2.2.0
labels
Jul 21, 2022
Gradle Check (Jenkins) Run Completed with:
|
…tCluster Signed-off-by: Tianli Feng <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
In build 901:
Not reproducible locally. |
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #3978 +/- ##
============================================
+ Coverage 70.56% 70.58% +0.02%
+ Complexity 56780 56774 -6
============================================
Files 4573 4573
Lines 273323 273360 +37
Branches 40086 40086
============================================
+ Hits 192859 192962 +103
+ Misses 64239 64150 -89
- Partials 16225 16248 +23
Help us with your feedback. Take ten seconds to tell us how you rate us. |
kotwanikunal
approved these changes
Jul 22, 2022
@kotwanikunal Thank you so much for reviewing this large PR! 👍👍 |
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jul 22, 2022
…ogy in 'test/framework' directory (#3978) * Deprecate methods with 'master' name mainly in class 'InternalTestCluster', 'NodeRoles', and 'AbstractSnapshotIntegTestCase' * Deprecate variables contain 'master' in the name in class 'InternalTestCluster' Signed-off-by: Tianli Feng <[email protected]> (cherry picked from commit 5db75c1)
tlfeng
pushed a commit
that referenced
this pull request
Jul 22, 2022
…ogy in 'test/framework' directory (#3978) (#3987) * Deprecate methods with 'master' name mainly in class 'InternalTestCluster', 'NodeRoles', and 'AbstractSnapshotIntegTestCase' * Deprecate variables contain 'master' in the name in class 'InternalTestCluster' Signed-off-by: Tianli Feng <[email protected]> (cherry picked from commit 5db75c1) Co-authored-by: Tianli Feng <[email protected]> To support inclusive language, the `master` terminology is going to be replaced by `cluster manager` in the code base. This PR deprecate public and protected methods/variable that contains `master` terminology in the name in `test/framework` directory, and create alternatives. List of public methods in `test/framework` directory that renamed in this PR: ``` public static String blockMasterFromFinalizingSnapshotOnIndexFile(final String repositoryName) { public static String blockMasterOnWriteIndexFile(final String repositoryName) { public static void blockMasterFromDeletingIndexNFile(String repositoryName) { public static String blockMasterFromFinalizingSnapshotOnSnapFile(final String repositoryName) { public Client masterClient() { public Client nonMasterClient() { public boolean isMasterEligible() { public synchronized <T> T getCurrentMasterNodeInstance(Class<T> clazz) { public <T> Iterable<T> getDataOrMasterNodeInstances(Class<T> clazz) { public <T> T getMasterNodeInstance(Class<T> clazz) { public synchronized void stopCurrentMasterNode() throws IOException { public synchronized void stopRandomNonMasterNode() throws IOException { public String getMasterName() { public String getMasterName(@nullable String viaNode) { public List<String> startMasterOnlyNodes(int numNodes) { public List<String> startMasterOnlyNodes(int numNodes, Settings settings) { public int numMasterNodes() { public static Settings masterNode() public static Settings masterNode(final Settings settings) public static Settings masterOnlyNode() public static Settings masterOnlyNode(final Settings settings) public static Settings nonMasterNode() public static Settings nonMasterNode(final Settings settings) public Version masterVersion() ``` List of public variables in `test/framework` directory that renamed in this PR: (all in `org.opensearch.test.InternalTestCluster`) ``` public static final int DEFAULT_LOW_NUM_MASTER_NODES public static final int DEFAULT_HIGH_NUM_MASTER_NODES public static final int REMOVED_MINIMUM_MASTER_NODES ``` public that not renamed in this PR: ``` public static MasterService createMasterService(ThreadPool threadPool, ClusterState initialClusterState) public static MasterService createMasterService(ThreadPool threadPool, DiscoveryNode localNode) public abstract int numDataAndMasterNodes(); ``` Reason for the above are not deprecated and renamed: 1. The class `MasterService` is not deprecated, and needs to find a solution to deal with deprecating this class in the return value. 2. abstract methods will be deprecated in a separate PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 2.x
Backport to 2.x branch
deprecate
enhancement
Enhancement or improvement to existing feature or request
v2.2.0
v3.0.0
Issues and PRs related to version 3.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
To support inclusive language, the
master
terminology is going to be replaced bycluster manager
in the code base.This PR deprecate public and protected methods/variable that contains
master
terminology in the name intest/framework
directory, and create alternatives.List of public methods in
test/framework
directory that renamed in this PR:List of public variables in
test/framework
directory that renamed in this PR:(all in
org.opensearch.test.InternalTestCluster
)public that not renamed in this PR:
Reason for the above are not deprecated and renamed:
MasterService
is not deprecated, and needs to find a solution to deal with deprecating this class in the return value.Issues Resolved
A part of issue #3544
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.