Skip to content

Add OpenSearch 3.x support#7356

Merged
yurishkuro merged 1 commit intojaegertracing:mainfrom
Parship999:OpenSearch-3.x-support-to-Jaeger
Jul 23, 2025
Merged

Add OpenSearch 3.x support#7356
yurishkuro merged 1 commit intojaegertracing:mainfrom
Parship999:OpenSearch-3.x-support-to-Jaeger

Conversation

@Parship999
Copy link
Copy Markdown

Which problem is this PR solving?

Description of the changes

  • Updated version detection in internal/storage/elasticsearch/config/config.go
  • updated version detection in internal/storage/elasticsearch/client/cluster_client.go
  • updated intgration test logic in internal/storage/integration/elasticsearch_test.go
  • added OpenSearch 3.x mock response in cluster_client_test.go
  • added test case "success with opensearch 3" that expects version 7
  • added OpenSearch 3.x mock response and test case in config_test.go
  • Created docker-compose/opensearch/v3/docker-compose.yml for testing with OpenSearch 3.x

How was this change tested?

  • All tests passed successfully (cluster client version detection tests (including new openSearch 3.x test), configuration tests (including new OpenSearch 3.x test))

Checklist

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>
@Parship999 Parship999 requested a review from a team as a code owner July 21, 2025 06:10
@Parship999 Parship999 requested a review from joe-elliott July 21, 2025 06:10
@dosubot dosubot bot added area/storage docker Pull requests that update Docker code labels Jul 21, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.47%. Comparing base (b059cc6) to head (7536198).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7356   +/-   ##
=======================================
  Coverage   96.47%   96.47%           
=======================================
  Files         378      378           
  Lines       22999    23003    +4     
=======================================
+ Hits        22189    22193    +4     
  Misses        613      613           
  Partials      197      197           
Flag Coverage Δ
badger_v1 9.10% <0.00%> (-0.01%) ⬇️
badger_v2 1.74% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 11.81% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-auto 1.73% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.73% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 11.81% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-auto 1.73% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.73% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 16.60% <0.00%> (-0.01%) ⬇️
elasticsearch-7.x-v1 16.65% <0.00%> (-0.01%) ⬇️
elasticsearch-8.x-v1 16.79% <0.00%> (-0.01%) ⬇️
elasticsearch-8.x-v2 1.74% <0.00%> (-0.01%) ⬇️
grpc_v1 10.33% <0.00%> (-0.01%) ⬇️
grpc_v2 1.74% <0.00%> (-0.01%) ⬇️
kafka-3.x-v1 9.26% <0.00%> (-0.01%) ⬇️
kafka-3.x-v2 1.74% <0.00%> (-0.01%) ⬇️
memory_v2 1.74% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 16.69% <0.00%> (-0.01%) ⬇️
opensearch-2.x-v1 16.69% <0.00%> (-0.01%) ⬇️
opensearch-2.x-v2 1.74% <0.00%> (-0.01%) ⬇️
opensearch-3.x-v2 1.74% <0.00%> (?)
query 1.74% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.48% <0.00%> (-0.01%) ⬇️
unittests 95.46% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Parship999
Copy link
Copy Markdown
Author

@yurishkuro could you please review it?

@yurishkuro yurishkuro added the changelog:new-feature Change that should be called out as new feature in CHANGELOG label Jul 23, 2025
@yurishkuro yurishkuro changed the title Added OpenSearch 3.x support to Jaeger Add OpenSearch 3.x support Jul 23, 2025
@yurishkuro yurishkuro added this pull request to the merge queue Jul 23, 2025
@yurishkuro
Copy link
Copy Markdown
Member

nice job!

@yurishkuro
Copy link
Copy Markdown
Member

@jkowall changes like this make me want to drop ES support completely. Somehow OpenSearch can run on a 10y old driver, but ES requires major driver upgrade for every major version, as if it's so easy to do when a project wants to support more than one ES version.

Merged via the queue into jaegertracing:main with commit 4d6ac93 Jul 23, 2025
64 of 65 checks passed
return 0, fmt.Errorf("invalid version format: %s", version[0])
}
if strings.Contains(info.TagLine, "OpenSearch") && (major == 1 || major == 2) {
if strings.Contains(info.TagLine, "OpenSearch") && (major == 1 || major == 2 || major == 3) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the condition should be just if strings.Contains(info.TagLine, "OpenSearch") { as every opensearch version only supports ES 7, otherwise when OpenSearch 4.x is released it will break again. In case OpenSearch 4.x supports ES 8 it would have to be added explicitly anyway.

@Liubey
Copy link
Copy Markdown

Liubey commented Jul 24, 2025

@yurishkuro When will this code be released? thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage changelog:new-feature Change that should be called out as new feature in CHANGELOG docker Pull requests that update Docker code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support OpenSearch 3.x

4 participants