Skip to content

Migrate IndexToolsAdapter to OS Java client#25030

Merged
moesterheld merged 6 commits intomasterfrom
os3/index-tools-adapter
Mar 3, 2026
Merged

Migrate IndexToolsAdapter to OS Java client#25030
moesterheld merged 6 commits intomasterfrom
os3/index-tools-adapter

Conversation

@moesterheld
Copy link
Contributor

Description

Migrates IndexToolsAdapter to OS Java client

/nocl internal change

Motivation and Context

closes #25016

How Has This Been Tested?

added new IT

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@moesterheld moesterheld changed the title Migrage IndexToolsAdapter to OS Java client Migrate IndexToolsAdapter to OS Java client Feb 17, 2026
Copy link
Contributor

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 migrates the IndexToolsAdapter for OpenSearch 3 from the deprecated Rest high-level client to the official OpenSearch Java client. The migration maintains full backward compatibility while modernizing the underlying client implementation.

Changes:

  • Replaced IndexToolsAdapterOS2 with IndexToolsAdapterOS using the official OpenSearch Java client
  • Added comprehensive integration tests for IndexToolsAdapter across all storage backends
  • Updated module bindings and test infrastructure to use the new implementation

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
graylog2-server/src/test/java/org/graylog2/indexer/IndexToolsAdapterIT.java New abstract integration test base class with comprehensive test coverage for count and fieldHistogram methods
graylog-storage-opensearch3/src/test/java/org/graylog/storage/opensearch3/testing/AdaptersOS.java Updated test adapter factory to instantiate IndexToolsAdapterOS with OfficialOpensearchClient
graylog-storage-opensearch3/src/test/java/org/graylog/storage/opensearch3/IndexToolsAdapterOSIT.java New OpenSearch3-specific integration test implementation extending base test class
graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3/OpenSearch3Module.java Updated dependency injection binding to use IndexToolsAdapterOS instead of IndexToolsAdapterOS2
graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3/IndexToolsAdapterOS2.java Removed deprecated implementation using Rest high-level client
graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3/IndexToolsAdapterOS.java New implementation using official OpenSearch Java client with equivalent functionality
graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/IndexToolsAdapterOS2IT.java Added integration tests for OpenSearch2 adapter for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@todvora todvora left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@moesterheld moesterheld merged commit 256a90c into master Mar 3, 2026
23 checks passed
@moesterheld moesterheld deleted the os3/index-tools-adapter branch March 3, 2026 14:45
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.

Migrate IndexToolsAdapter to OS java client

3 participants