Skip to content
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

[Backport 2.x] [Remove] Deprecated Fractional ByteSizeValue support (#9005) #9007

Merged
merged 3 commits into from
Jul 31, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Jul 31, 2023

Backport 0b1f875 from #9005.

Also adds a couple missing items from the changelog.

…ect#9005)

This commit removes the deprecation warning for fractional bytes size
values and, instead, throws an OpenSearchParseException if a user
passes in a fraction byte value (e.g., 5.2b).. This leniency was
deprecated a long time ago in Legacy 6.2 so the removal should come
as no surprise to users.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 0b1f875)
@nknize nknize added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments v2.10.0 labels Jul 31, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@nknize nknize added the blocked Identifies issues that are blocked label Jul 31, 2023
@nknize
Copy link
Collaborator Author

nknize commented Jul 31, 2023

Blocked by #9011

Unblocked by merging fix.

This fixes a bug where the Setting#byteSizeSetting static method
returned fractional byte values when calling .toString inside the
lambda. The change is to directly return the bytes value as a string
instead of using ByteSizeValue#toString which tries to be smart and
by pretty printing in a more human-friendly format.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@nknize nknize removed the blocked Identifies issues that are blocked label Jul 31, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #9007 (03772f7) into 2.x (547f166) will decrease coverage by 0.08%.
Report is 1 commits behind head on 2.x.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                2.x    #9007      +/-   ##
============================================
- Coverage     70.83%   70.76%   -0.08%     
+ Complexity    57398    57364      -34     
============================================
  Files          4747     4747              
  Lines        271199   271196       -3     
  Branches      40003    40003              
============================================
- Hits         192116   191907     -209     
- Misses        62591    62833     +242     
+ Partials      16492    16456      -36     
Files Changed Coverage Δ
...n/java/org/opensearch/common/settings/Setting.java 85.87% <100.00%> (ø)
...java/org/opensearch/common/unit/ByteSizeValue.java 99.08% <100.00%> (+0.86%) ⬆️

... and 492 files with indirect coverage changes

@nknize nknize merged commit 6e47095 into opensearch-project:2.x Jul 31, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments enhancement Enhancement or improvement to existing feature or request v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants