Skip to content

Conversation

@aparajita31pandey
Copy link
Contributor

@aparajita31pandey aparajita31pandey commented Nov 9, 2025

Description

This change #18557 added support for range version support in semver. This range semver only works for opensearch.version field in plugin-descriptor.properties and doesn't work for dependencies in plugin-descriptor.properties. This PR adds similar support for dependencies too.

Using dependencies={ opensearch: "[2.0.0, 3.9.0)" }, gives below error

Exception in thread "main" java.lang.IllegalArgumentException: Exactly one range is allowed to be specified in dependencies for the plugin [" + name + "]
at org.opensearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:327)
at org.opensearch.tools.cli.plugin.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:797)
at org.opensearch.tools.cli.plugin.InstallPluginCommand.installPlugin(InstallPluginCommand.java:846)
at org.opensearch.tools.cli.plugin.InstallPluginCommand.execute(InstallPluginCommand.java:277)
at org.opensearch.tools.cli.plugin.InstallPluginCommand.execute(InstallPluginCommand.java:251)
at org.opensearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:110)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)

Related Issues

Builds on #1707

Check List

  • Functionality includes testing.

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.

Signed-off-by: Aparajita Pandey <[email protected]>
@aparajita31pandey aparajita31pandey requested a review from a team as a code owner November 9, 2025 10:03
@aparajita31pandey aparajita31pandey marked this pull request as draft November 9, 2025 10:03
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

❌ Gradle check result for 1a8aeb4: 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?

Signed-off-by: Aparajita Pandey <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

❌ Gradle check result for fe6f629: 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?

Signed-off-by: Aparajita Pandey <[email protected]>
@aparajita31pandey aparajita31pandey changed the title Support RangeSemver for Dependencies in PluginDescriptor Support range semver for dependencies in plugin-descriptor Nov 9, 2025
@aparajita31pandey aparajita31pandey changed the title Support range semver for dependencies in plugin-descriptor Support range semver for dependencies in plugin-descriptor.properties Nov 9, 2025
Signed-off-by: Aparajita Pandey <[email protected]>
@aparajita31pandey aparajita31pandey marked this pull request as ready for review November 9, 2025 17:26
Signed-off-by: Aparajita Pandey <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

✅ Gradle check result for c63c9f4: SUCCESS

@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.20%. Comparing base (022d594) to head (c63c9f4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19939      +/-   ##
============================================
- Coverage     73.27%   73.20%   -0.08%     
+ Complexity    71563    71553      -10     
============================================
  Files          5785     5785              
  Lines        326822   326826       +4     
  Branches      47294    47295       +1     
============================================
- Hits         239484   239255     -229     
- Misses        68111    68350     +239     
+ Partials      19227    19221       -6     

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

Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

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

Thank you for this fix @aparajita31pandey !

@cwperks cwperks merged commit bf0820f into opensearch-project:main Nov 10, 2025
33 checks passed
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Dec 5, 2025
…opensearch-project#19939)

* DependenciesRangeSemver

Signed-off-by: Aparajita Pandey <[email protected]>

* spotlessApply

Signed-off-by: Aparajita Pandey <[email protected]>

* testCase

Signed-off-by: Aparajita Pandey <[email protected]>

* ChangeLog

Signed-off-by: Aparajita Pandey <[email protected]>

* correct changeLog

Signed-off-by: Aparajita Pandey <[email protected]>

---------

Signed-off-by: Aparajita Pandey <[email protected]>
liuguoqingfz pushed a commit to liuguoqingfz/OpenSearch that referenced this pull request Dec 15, 2025
…opensearch-project#19939)

* DependenciesRangeSemver

Signed-off-by: Aparajita Pandey <[email protected]>

* spotlessApply

Signed-off-by: Aparajita Pandey <[email protected]>

* testCase

Signed-off-by: Aparajita Pandey <[email protected]>

* ChangeLog

Signed-off-by: Aparajita Pandey <[email protected]>

* correct changeLog

Signed-off-by: Aparajita Pandey <[email protected]>

---------

Signed-off-by: Aparajita Pandey <[email protected]>
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