Skip to content

Conversation

@gargmanik13
Copy link
Contributor

@gargmanik13 gargmanik13 commented Aug 11, 2025

Created a new lib metadata-common and separated out IndexMetadata with required dependencies from the server

Description

  • Created a new library metadata-common under libs folder in the OpenSearch repo.
  • This will help to separate out the metadata related dependencies which are currently coupled with cluster management dependencies in the server package. It'll make the Cluster Manager more cloud native provider friendly and help to eventually run the CM in stateless mode.
  • As part of this change, moved IndexMetadata with required dependencies like - common, cluster.metadata etc.

Related Issues

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Dependencies moved for AliasMetadata:

Screenshot 2025-10-11 at 9 48 47 AM

Dependencies moved for IndexMetadata:

Screenshot 2025-10-11 at 9 49 09 AM

@github-actions
Copy link
Contributor

❌ Gradle check result for b73f35c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

…h required dependencies from the server

Signed-off-by: Manik Garg <gargmanik1317@gmail.com>
@github-actions
Copy link
Contributor

✅ Gradle check result for 5a865ad: SUCCESS

@codecov
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 53.99516% with 190 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.81%. Comparing base (f967a72) to head (5a865ad).
⚠️ Report is 93 commits behind head on main.

Files with missing lines Patch % Lines
...pensearch/cluster/metadata/core/IndexMetadata.java 0.00% 128 Missing ⚠️
...nsearch/cluster/metadata/core/MappingMetadata.java 0.00% 20 Missing ⚠️
...java/org/opensearch/action/support/ShardCount.java 77.08% 6 Missing and 5 partials ⚠️
...cluster/metadata/core/AbstractMappingMetadata.java 84.05% 6 Missing and 5 partials ⚠️
...g/opensearch/cluster/metadata/MappingMetadata.java 35.29% 11 Missing ⚠️
...rch/node/remotestore/RemoteStoreNodeAttribute.java 57.14% 3 Missing ⚠️
...g/opensearch/common/logging/DeprecationLogger.java 80.00% 0 Missing and 1 partial ⚠️
...pensearch/common/settings/SettingsFilterUtils.java 94.11% 0 Missing and 1 partial ⚠️
...va/org/opensearch/common/unit/MemorySizeValue.java 75.00% 0 Missing and 1 partial ⚠️
...rc/main/java/org/opensearch/node/NodeSettings.java 92.85% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19011      +/-   ##
============================================
- Coverage     72.96%   72.81%   -0.16%     
+ Complexity    69451    69351     -100     
============================================
  Files          5645     5657      +12     
  Lines        318787   319217     +430     
  Branches      46125    46140      +15     
============================================
- Hits         232610   232431     -179     
- Misses        67358    68023     +665     
+ Partials      18819    18763      -56     

☔ 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.

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added stalled Issues that have stalled and removed stalled Issues that have stalled labels Sep 11, 2025
@rajiv-kv
Copy link
Contributor

metadata-common library seems to be rooted on multiple packages. I see that other project in libs are typically rooted on a single package.

Can we evaluate if we can limit the metadata-commons library to package org.opensearch.cluster.metadata ?

@gargmanik13
Copy link
Contributor Author

gargmanik13 commented Oct 11, 2025

metadata-common library seems to be rooted on multiple packages. I see that other project in libs are typically rooted on a single package.

Can we evaluate if we can limit the metadata-commons library to package org.opensearch.cluster.metadata ?

That is not feasible as there are other common utils and classes required. Sharing a small dependency graph below.
Also, we cannot move these common classes to common-lib as discussed here earlier - #18844 (comment)

Update dependency graph of classes moved for AliasMetadata and IndexMetadata in PR description

Screenshot 2025-10-11 at 9 43 34 AM

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.

2 participants