Skip to content

Make `/features` API accept percentage as float to enable 0.01%

What does this MR do and why?

The integer gives accuracy of 1%. The flipper happily supports fractional percentages allowing to enable ex. 1 in 10k as 0.01%.

This is helpful as part of phased rollout by groupsharding for #345118 (closed). This allows us to enable feature flag for a fractional percentages (0.01% or 0.0001%).

This is implemented as-is .include?('.') to replicate exact behavior being done by Flipper to consider integer vs float differences.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Dylan Griffith

Merge request reports

Loading