Skip to content

Upgrade to OpenSearch 3.x APIs and align with cluster manager terminology #3

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

marevol
Copy link
Contributor

@marevol marevol commented May 15, 2025

This pull request introduces several updates across the project, including upgrading dependencies, adding new features, and refactoring imports to align with updated APIs. The most significant changes involve upgrading to OpenSearch 3.0.0, updating dependencies, and adding placeholders for new API methods related to views and ingestion.

Dependency and Version Upgrades:

  • Updated the JDK version in .github/workflows/maven.yml from 17 to 21 to align with modern Java standards. ([.github/workflows/maven.ymlL23-R26](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-5dbf1a803ecc13ff945a08ed3eb09149a83615e83f15320550af8e3a91976446L23-R26))
  • Upgraded the project version in pom.xml to 3.0.0-SNAPSHOT, along with updates to dependencies such as OpenSearch (3.0.0), JUnit Jupiter (5.12.2), Testcontainers (1.21.0), and JUnit Platform Launcher (1.12.2). ([[1]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8L8-R8), [[2]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8L39-R42), [[3]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8L195-R195))

New Features (Placeholders for APIs):

  • Added placeholders for new API methods in HttpAbstractClient, HttpClient, and HttpIndicesAdminClient to support view management (createView, getView, updateView, deleteView) and ingestion control (pauseIngestion, resumeIngestion, getIngestionState). These methods currently throw UnsupportedOperationException. ([[1]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-c176ad038255d1f0a0f2563b0d1b0c4e1085c58ae5a8f809c343ad7084474f3fR2073-R2154), [[2]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-41e385a94d02cc8a9e1a653fa1fe60a7404dfa8410f44047f4c2f34c278aa85fR1101-R1123), [[3]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-0f536e391ef241aa338b692e0c4fb5ae9b58d4f589a0dac87b3b62d2f36c1755R686-R766))

Refactoring and API Alignment:

  • Refactored imports across multiple files to replace master terminology with clustermanager, aligning with OpenSearch 3.0.0's updated API. ([[1]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-c176ad038255d1f0a0f2563b0d1b0c4e1085c58ae5a8f809c343ad7084474f3fL408-R415), [[2]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-41e385a94d02cc8a9e1a653fa1fe60a7404dfa8410f44047f4c2f34c278aa85fL276-R280), [[3]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-9284170a24dd71b5855eb70ef2b7b2e5d6031b5b0e0f205c0dcf1e0fe3941d7fL23-R23), [[4]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-b7e6ee4aabbc730b906eaec2fa087247b0a2889a6ddea4ebb2e44b400cfd7078L22-R22))
  • Replaced deprecated org.opensearch.client imports with org.opensearch.transport.client in HttpAbstractClient, HttpAdminClient, and HttpIndicesAdminClient for better compatibility with OpenSearch 3.0.0. ([[1]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-c176ad038255d1f0a0f2563b0d1b0c4e1085c58ae5a8f809c343ad7084474f3fL421-L426), [[2]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-8f4771492c5c6a23b1788f86bfcf7a127dd987a59b9e87586ae051410e01efbfL18-R20), [[3]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-0f536e391ef241aa338b692e0c4fb5ae9b58d4f589a0dac87b3b62d2f36c1755L112-R125))

Minor Additions:

  • Added new imports for ScaleIndexRequestBuilder and ingestion-related classes in HttpAbstractClient and HttpIndicesAdminClient to support future functionality. ([[1]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-c176ad038255d1f0a0f2563b0d1b0c4e1085c58ae5a8f809c343ad7084474f3fR287), [[2]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-0f536e391ef241aa338b692e0c4fb5ae9b58d4f589a0dac87b3b62d2f36c1755R79), [[3]](https://github.com/codelibs/fesen-httpclient/pull/3/files#diff-0f536e391ef241aa338b692e0c4fb5ae9b58d4f589a0dac87b3b62d2f36c1755R97-R102))

@marevol marevol requested a review from Copilot May 15, 2025 07:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the project to OpenSearch 3.x APIs and updates terminology from "master" to "clustermanager," while introducing placeholder implementations for new view management and ingestion control features. Key changes include dependency and version upgrades (including the JDK update to 21), refactoring of imports to align with the new APIs, and the addition of new API method placeholders that currently throw UnsupportedOperationException.

Reviewed Changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/java/org/codelibs/fesen/client/action/HttpPutRepositoryAction.java Updated import from master to clustermanager terminology.
src/main/java/org/codelibs/fesen/client/action/HttpPutPipelineAction.java Similar update for action support import.
src/main/java/org/codelibs/fesen/client/action/HttpPutMappingAction.java Replaced deprecated import reference.
src/main/java/org/codelibs/fesen/client/action/HttpPutIndexTemplateAction.java Refactored import to clustermanager.
src/main/java/org/codelibs/fesen/client/action/HttpNodesStatsAction.java Updated API calls to adjust for new constructor signatures.
src/main/java/org/codelibs/fesen/client/action/HttpIndicesAliasesAction.java Adjusted import references.
src/main/java/org/codelibs/fesen/client/action/HttpGetIndexAction.java Added new contexts field with a placeholder comment.
src/main/java/org/codelibs/fesen/client/action/HttpDeleteStoredScriptAction.java Updated deprecated import reference.
src/main/java/org/codelibs/fesen/client/action/HttpDeleteSnapshotAction.java Refactored import to clustermanager.
src/main/java/org/codelibs/fesen/client/action/HttpDeleteRepositoryAction.java Updated import for repository deletion.
src/main/java/org/codelibs/fesen/client/action/HttpDeletePipelineAction.java Adjusted import for pipeline deletion.
src/main/java/org/codelibs/fesen/client/action/HttpDeleteIndexTemplateAction.java Updated index template deletion import.
src/main/java/org/codelibs/fesen/client/action/HttpDeleteIndexAction.java Refactored import reference.
src/main/java/org/codelibs/fesen/client/action/HttpClusterRerouteAction.java Updated import for cluster reroute actions.
src/main/java/org/codelibs/fesen/client/HttpIndicesAdminClient.java Added new imports and placeholder API methods for view and ingestion functionality.
src/main/java/org/codelibs/fesen/client/HttpClient.java Inserted new placeholders for search view and list view names functionality.
src/main/java/org/codelibs/fesen/client/HttpAdminClient.java Changed client imports to transport client.
src/main/java/org/codelibs/fesen/client/HttpAbstractClient.java Refactored imports and added placeholder methods for view and ingestion management.
.github/workflows/maven.yml Updated the JDK configuration from version 17 to 21.
Files not reviewed (1)
  • pom.xml: Language not supported
Comments suppressed due to low confidence (2)

src/main/java/org/codelibs/fesen/client/HttpAbstractClient.java:2074

  • [nitpick] It is recommended to add a TODO comment or reference (e.g., a JIRA ticket) in the placeholder methods for view management and ingestion control to clearly indicate that these features are pending implementation.
public void createView(org.opensearch.action.admin.indices.view.CreateViewAction.Request request, ActionListener<org.opensearch.action.admin.indices.view.GetViewAction.Response> listener) {

src/main/java/org/codelibs/fesen/client/action/HttpNodesStatsAction.java:387

  • Confirm that the added '0' parameter in the SearchTaskStats constructor aligns with the new OpenSearch 3.x API requirements; if so, consider adding a brief comment explaining this change for future maintainers.
return new SearchBackpressureStats(new SearchTaskStats(0, 0, 0, Collections.emptyMap()),

@@ -95,13 +97,14 @@ protected static GetIndexResponse fromXContent(final XContentParser parser) thro
if (indexEntry.dataStream != null) {
dataStreams.put(indexName, indexEntry.dataStream);
}
// TODO contexts
Copy link
Preview

Copilot AI May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Provide additional context or a reference ticket for the 'contexts' placeholder to clarify future plans for processing context data.

Copilot uses AI. Check for mistakes.

@marevol marevol merged commit c76ddb2 into main May 15, 2025
1 check passed
@marevol marevol deleted the feature/opensearch3 branch June 21, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant