Skip to content
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

[2.x] Deprecate public methods and variables that contain 'master' terminology in 'client' directory (#3966) #3981

Merged

Conversation

tlfeng
Copy link
Collaborator

@tlfeng tlfeng commented Jul 22, 2022

Description

Backport PR #3966 / commit ccf1d15 to 2.x branch

Issues Resolved

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 client directory, and create alternatives.

List of public methods to be renamed in client directory:

public void setMasterTimeout(TimeValue clusterManagerTimeout)
public TimeValue masterNodeTimeout()
public TimeValue getMasterNodeTimeout()
public void setMasterNodeTimeout(@Nullable TimeValue clusterManagerNodeTimeout)
public void setMasterNodeTimeout(String clusterManagerNodeTimeout)
public boolean isMasterEligible()

List of public variables to be renamed in client directory:

public static final TimeValue DEFAULT_MASTER_NODE_TIMEOUT

Other changes:

The method Params withMasterTimeout(TimeValue masterTimeout) remains not changed, because master_timeout parameter of the REST APIs is not deprecated in version 2.x

Params withMasterTimeout(TimeValue masterTimeout) {

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2022

Codecov Report

Merging #3981 (d2fe0ef) into 2.x (0a42e6d) will increase coverage by 0.09%.
The diff coverage is 35.29%.

@@             Coverage Diff              @@
##                2.x    #3981      +/-   ##
============================================
+ Coverage     70.55%   70.64%   +0.09%     
- Complexity    56382    56445      +63     
============================================
  Files          4526     4526              
  Lines        271760   271785      +25     
  Branches      39978    39980       +2     
============================================
+ Hits         191733   192011     +278     
+ Misses        63869    63644     -225     
+ Partials      16158    16130      -28     
Impacted Files Coverage Δ
...rg/opensearch/client/ClusterRequestConverters.java 44.28% <0.00%> (ø)
...h/client/indices/GetComponentTemplatesRequest.java 0.00% <0.00%> (ø)
...ent/indices/GetComposableIndexTemplateRequest.java 0.00% <0.00%> (ø)
...rest/src/main/java/org/opensearch/client/Node.java 90.74% <0.00%> (-1.72%) ⬇️
...earch/client/indices/GetIndexTemplatesRequest.java 53.84% <22.22%> (-11.16%) ⬇️
...rg/opensearch/client/IndicesRequestConverters.java 70.67% <72.72%> (ø)
.../main/java/org/opensearch/client/NodeSelector.java 78.57% <75.00%> (+3.57%) ⬆️
.../main/java/org/opensearch/client/TimedRequest.java 93.33% <83.33%> (-6.67%) ⬇️
...luster/routing/allocation/RoutingExplanations.java 41.37% <0.00%> (-58.63%) ⬇️
.../admin/cluster/reroute/ClusterRerouteResponse.java 55.00% <0.00%> (-45.00%) ⬇️
... and 473 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

…ogy in 'client' directory (opensearch-project#3966)

* Deprecate public methods and variables that contain 'master' terminology in 'client' directory

Signed-off-by: Tianli Feng <[email protected]>

* Change 1 String type usages with 'master' to 'cluster manager'

Signed-off-by: Tianli Feng <[email protected]>
@tlfeng tlfeng force-pushed the 2.x-deprecate-master-method-client branch from dfc20c5 to d2fe0ef Compare July 22, 2022 23:11
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator Author

tlfeng commented Jul 22, 2022

In build 932, the test failure is reported in issue #3579

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng
Copy link
Collaborator Author

tlfeng commented Jul 23, 2022

In log 933, the same failure as above.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng tlfeng marked this pull request as ready for review July 23, 2022 00:41
@tlfeng tlfeng requested review from a team and reta as code owners July 23, 2022 00:41
@tlfeng tlfeng merged commit 257e3b8 into opensearch-project:2.x Jul 26, 2022
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-3981-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 257e3b8de96533b838ebf4d0c77b2bc1bf9d2ab1
# Push it to GitHub
git push --set-upstream origin backport/backport-3981-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-3981-to-2.x.

@tlfeng tlfeng added backport PRs or issues specific to backporting features or enhancments and removed backport 2.x Backport to 2.x branch labels Jul 26, 2022
@tlfeng tlfeng deleted the 2.x-deprecate-master-method-client branch July 30, 2022 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants