WIP: Optimize `GitalyClient.feature_enabled?`
What does this MR do?
-
Don't run Random.rand()
if we're at 100% (Gitaly only)
100 < 100
is always false so we might be hitting NFS here even at 100% ifRandom.rand()
returns 1 ... -
Reset the percentage when setting the feature to 100%/true
(ALL Features...)
Previously when a feature was at 50%,!feature-set feature true
did nothing since the PercentageGate wasn't being reset. -
Enable a feature if set to a percentage.
Are there points in the code the reviewer needs to double check?
The percentage reset in the API-change could probably need an extra eye. Not sure who to ping.
Why was this MR needed?
Annoyance, mainly
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-qa
manual pipeline job)
Edited by Kim Carlbäcker