Skip to content

fix: normalize rollout distribution buckets#5581

Merged
kodiakhq[bot] merged 2 commits into
v2from
feat/normalize-rollout-buckets
Mar 19, 2026
Merged

fix: normalize rollout distribution buckets#5581
kodiakhq[bot] merged 2 commits into
v2from
feat/normalize-rollout-buckets

Conversation

@erka

@erka erka commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

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.

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]>
@erka
erka requested a review from a team as a code owner March 18, 2026 12:36
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 18, 2026
@erka erka changed the title feat: normalize rollout distribution buckets fix: normalize rollout distribution buckets Mar 18, 2026
@erka erka added the v2 Flipt v2 label Mar 18, 2026
@codecov

codecov Bot commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.40%. Comparing base (894551c) to head (e6b58db).
⚠️ Report is 3 commits behind head on v2.

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              
Flag Coverage Δ
integrationtests 34.35% <100.00%> (+0.02%) ⬆️
unittests 51.54% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erka
erka marked this pull request as ready for review March 19, 2026 13:53
@erka erka added the automerge Used by Kodiak bot to automerge PRs label Mar 19, 2026
@kodiakhq
kodiakhq Bot merged commit dd02c14 into v2 Mar 19, 2026
33 checks passed
@kodiakhq
kodiakhq Bot deleted the feat/normalize-rollout-buckets branch March 19, 2026 16:06
@github-project-automation github-project-automation Bot moved this to Done in Flipt V2 Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Used by Kodiak bot to automerge PRs size:M This PR changes 30-99 lines, ignoring generated files. v2 Flipt v2

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants