fix: normalize rollout distribution buckets#5581
Merged
Merged
Conversation
Port rollout bucket logic from Rust client to Go server. Previously, bucket boundaries were calculated by directly accumulating rollout percentages. Now, each distribution's rollout is normalized relative to the total rollout sum, ensuring proportional bucket distribution even when distributions don't sum to 100. The last bucket is always set to totalBucketNum (1000) to ensure complete coverage of the bucket space. Signed-off-by: Roman Dmytrenko <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #5581 +/- ##
==========================================
+ Coverage 60.39% 60.40% +0.01%
==========================================
Files 141 141
Lines 13993 13998 +5
==========================================
+ Hits 8451 8456 +5
Misses 4821 4821
Partials 721 721
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
erka
marked this pull request as draft
March 19, 2026 12:14
erka
marked this pull request as ready for review
March 19, 2026 13:53
markphelps
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port rollout bucket logic from Rust client to Go server implementation.
Previously, bucket boundaries were calculated by directly accumulating rollout percentages. Now, each distribution's rollout is normalized relative to the total rollout sum, ensuring proportional bucket distribution even when distributions don't sum to 100.
The last bucket is always set to totalBucketNum (1000) to ensure complete coverage of the bucket space.