Skip to content

Added support for range version support in semver #18557

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shrugarg-amzn
Copy link

Description

This PR fixes the SemverRange implementation to properly handle version range expressions and comparisons. The changes include:

  1. Proper implementation of range parsing and validation
  2. Correct handling of inclusive/exclusive bounds in version ranges
  3. Added proper validation for invalid inputs
  4. Ensured correct version comparisons within ranges

Related Issues

Resolves #18554

N/A

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.

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Plugins labels Jun 19, 2025
Copy link
Contributor

✅ Gradle check result for 7f1658f: SUCCESS

Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 89.39394% with 7 lines in your changes missing coverage. Please review.

Project coverage is 72.65%. Comparing base (7c8f01b) to head (4355487).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...rc/main/java/org/opensearch/semver/expr/Range.java 85.71% 1 Missing and 4 partials ⚠️
...c/main/java/org/opensearch/semver/SemverRange.java 93.54% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18557      +/-   ##
============================================
- Coverage     72.68%   72.65%   -0.03%     
- Complexity    68130    68141      +11     
============================================
  Files          5540     5541       +1     
  Lines        313379   313442      +63     
  Branches      45472    45487      +15     
============================================
- Hits         227785   227742      -43     
- Misses        67070    67132      +62     
- Partials      18524    18568      +44     

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

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
Copy link
Contributor

✅ Gradle check result for e2dc61a: SUCCESS

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
Copy link
Contributor

✅ Gradle check result for 4355487: SUCCESS

@shrugarg-amzn shrugarg-amzn marked this pull request as ready for review June 20, 2025 08:14
@shrugarg-amzn shrugarg-amzn requested a review from a team as a code owner June 20, 2025 08:14
@shrugarg-amzn
Copy link
Author

@saratvemulapalli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add range support in SemVer
1 participant