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

fix 0% distribution issues #213

Merged
merged 1 commit into from
Jan 28, 2020
Merged

fix 0% distribution issues #213

merged 1 commit into from
Jan 28, 2020

Conversation

khepin
Copy link
Contributor

@khepin khepin commented Jan 28, 2020

The current implementation skips over distributions that have a 0% rollout and build a buckets array.
The buckets array is accessed by index, but since we skip all 0% distributions, the index of the loop can get out of sync with the last index of the buckets array, creating index out of range errors.

This adds 2 tests specific for the issue and fixes them.

Let me know if this needs updating / re-working.

@markphelps
Copy link
Collaborator

Thanks @khepin! Great find and fix! Will cut a new release with this fix now

Thanks again

@markphelps markphelps merged commit 98b3687 into flipt-io:master Jan 28, 2020
@markphelps
Copy link
Collaborator

@all-contributors please add @khepin for code

@allcontributors
Copy link
Contributor

@markphelps

I've put up a pull request to add @khepin! 🎉

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