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 PercentageFilter inequality bound #156

Merged

Conversation

neiljohari
Copy link
Contributor

@neiljohari neiljohari commented Dec 3, 2021

NextDouble() ∈ [0, 1). We use a strict inequality, so a 0% rollout value sporadically returns true as 0⩽0.

The fix is to use a non-strict inequality, <. The upper bound still works: 0.999... < 1.

We noticed this internally because feature flags were occasionally tripping even with 0% rollout. This appears to be the root cause.

NextDouble() ∈ [0, 1). We use a strict inequality, so a 0%
value sporadically returns true as 0⩽0.

The fix is to use a non-strict inequality, <. The upper bound still works: 0.999... < 1.
@neiljohari
Copy link
Contributor Author

Additionally, the CLA GHA didn't appear to trip. This PR is provided as part of my employment with https://github.com/roblox, I have the needed authorization to sign the CLA so please do send me a link to an agreement I can sign!

@jimmyca15
Copy link
Member

@neiljohari The license check mentions that all CLA requirements are met. Have you already contributed to other Microsoft repos?

@neiljohari
Copy link
Contributor Author

@jimmyca15 Thanks for the super speedy response! I don't believe I have previously contributed, I think this is my first one

@jimmyca15 jimmyca15 merged commit e3eb4da into microsoft:main Dec 3, 2021
@jimmyca15
Copy link
Member

I took a look. The license check did run. For small enough changes it doesn't prompt CLA sign.

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