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

Deprecate the "Master" nomenclature #307

Closed
2 tasks done
tlfeng opened this issue Mar 4, 2022 · 11 comments
Closed
2 tasks done

Deprecate the "Master" nomenclature #307

tlfeng opened this issue Mar 4, 2022 · 11 comments
Assignees
Labels
enhancement v2.3.0 'Issues and PRs related to version v2.3.0'

Comments

@tlfeng
Copy link

tlfeng commented Mar 4, 2022

Is your feature request related to a problem? Please describe.
OpenSearch repository is going to replace the terminology "master"with "cluster manager".
issue: opensearch-project/OpenSearch#472, with the plan for its terminology replacement.

Although the existing usages with "master" will be supported in OpenSearch version 2.x until further notice to keep the backwards compatibility, please prepare for the nomenclature change in advance, and replace all the usages with "master" terminology in the code base.

Describe the solution you'd like
Replace the terminology "master" with "cluster manager".

When being compatible with OpenSearch 2.0:

  • Replace "master" in code comment internal class name.

When being compatible with OpenSearch 3.0:

  • Replace "master" in the reference to OpenSearch Java API
    • clusterService.state().nodes().isLocalNodeElectedMaster() -> isLocalNodeElectedClusterManager() (new API is available in v2.2)
    • import org.opensearch.action.support.master.TransportMasterNodeAction -> import org.opensearch.action.support.clustermanager.TransportClusterManagerNodeAction (new API is available in v2.2)
    • [ ] import org.opensearch.action.support.master.AcknowledgedResponse -> import org.opensearch.action.support.clustermanager.AcknowledgedResponse (will be available in version 3.0 and track in separate issue)

Describe alternatives you've considered
None.

Additional context

@dblock
Copy link
Member

dblock commented Apr 18, 2022

For 2.0, at a minimum please ensure that the plugin is not calling any deprecated APIs in core or another plugin, and confirm below, then remove the 2.0.0 label. If you have time, do the complete deprecation as described in this issue.

@martin-gaievski
Copy link
Member

@dblock do we expect any more "deprecation" changes on core api for 2.0? For instance knn refers this package in import section, seems it's not deprecated yet.

@dblock
Copy link
Member

dblock commented Apr 18, 2022

Yes, thanks for point this out. I'll reopen this issue, now that we know that k-nn is referring to something with master in core and label it for 2.1. /cc: @tlfeng is there an issue or is deprecating of org.opensearch.action.support.master part of another issue in core?

@dblock dblock reopened this Apr 18, 2022
@dblock dblock added v2.1.0 and removed v2.0.0 labels Apr 18, 2022
@naveentatikonda
Copy link
Member

@tlfeng Besides these packages, knn also depends on these 2 methods masterOperation and clusterService.state().nodes().isLocalNodeElectedMaster(). Does any of these methods will be deprecated for 2.0 in opensearch-core?

@dblock
Copy link
Member

dblock commented Apr 18, 2022

@tlfeng Please confirm whether you expect any more deprecations in core after today? Is that a bug or a feature? :)

@tlfeng
Copy link
Author

tlfeng commented Apr 18, 2022

Hi @naveentatikonda The package and method names you pointed out will be replaced in OpenSearch 3.0. I haven't started yet, and will the update.
I called those public method and package from OpenSearch as "OpenSearch Java API", the replacement is tracked in issue opensearch-project/OpenSearch#1684. It will be ready before OpenSearch 3.0 and I will complete in advance.
If the issue is used for pending items for 2.0 release, then the issue is resolved.

@martin-gaievski There will be no more depredations, although the normal way to change public method or class names is deprecate old usage and create new usage. But there are too many method or class names to be deprecated (210 items, as shown in issue opensearch-project/OpenSearch#1684). So it's decided to rename the public method or class names in place in version 3.0 .

@Shivamdhar Shivamdhar added v3.0.0 and removed v2.1.0 labels Jul 7, 2022
@anasalkouz anasalkouz added 2.3.0 and removed v3.0.0 labels Aug 25, 2022
@anasalkouz
Copy link
Member

Java APIs completed and released on 2.2.
@naveentatikonda Could you please complete the remaining part from your end? let's target 2.3 for all usages.

@naveentatikonda
Copy link
Member

@anasalkouz Thanks for the update. Will incorporate those changes for 2.3

@anasalkouz
Copy link
Member

@naveentatikonda anything remaining? can you close the issue?

@naveentatikonda
Copy link
Member

naveentatikonda commented Sep 6, 2022

@naveentatikonda anything remaining? can you close the issue?

@anasalkouz Still these two packages needs to be updated. They are still not supported by opensearch core and is expected to be ready by 3.0 :

org.opensearch.action.support.master.AcknowledgedRequest -> org.opensearch.action.support.clusterManager.AcknowledgedRequest

org.opensearch.action.support.master.AcknowledgedResponse -> org.opensearch.action.support.clusterManager.AcknowledgedResponse

Also, does the whitelist changes needs to be shipped with 2.3 release or pushed to 3.0 release ?
I could see that the whitelist -> allowlist changes are not being supported by opensearch core in 2.x
https://github.com/naveentatikonda/k-NN/runs/8214687056?check_suite_focus=true

@tlfeng
Copy link
Author

tlfeng commented Sep 19, 2022

@naveentatikonda k-NN repository have done with all changes required for 2.x release, and the remaining effort will be tracked in separate issue as part of 3.0. Thank you!

The remaining effort means the following Java APIs

org.opensearch.action.support.master.AcknowledgedRequest
  -> org.opensearch.action.support.clusterManager.AcknowledgedRequest

org.opensearch.action.support.master.AcknowledgedResponse
  -> org.opensearch.action.support.clusterManager.AcknowledgedResponse

Map<ScriptContext<?>, List<Whitelist>> getContextWhitelists()
 -> Map<ScriptContext<?>, List<Allowlist>> getContextAllowlists()
 
org.opensearch.painless.spi.Whitelist -> Allowlist
org.opensearch.painless.spi.WhitelistLoader -> AllowlistLoader

@heemin32 heemin32 added the v2.3.0 'Issues and PRs related to version v2.3.0' label Nov 2, 2022
@heemin32 heemin32 removed the 2.3.0 label Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement v2.3.0 'Issues and PRs related to version v2.3.0'
Projects
None yet
Development

No branches or pull requests

7 participants