Feature Flags API has "stickiness" values as uppercase text, however UnleaseClient expects camelCase
Summary
Trying to use a "rollout" strategy leads to errors in the UnleashClient integration (python):
Steps to reproduce
- create a feature flag with a "Percent rollout" strategy, based on "User ID"
- use UnleashClient (4.2.0) to check the feature-flag
- error:
Error checking feature flag: 'USERID'
Example Project
https://gitlab.com/ofer.koren/gitlab/-/feature_flags/1/edit
client=UnleashClient(
url="https://gitlab.com/api/v4/feature_flags/unleash/24758814",
app_name='dev',
environment='tlv',
disable_metrics=True,
disable_registration=True,
instance_id="GZXM3DCq34iHAzHX47jc")
client.initialize_client()
client.is_enabled("demo-flag", dict(userId='my-user'))
Error checking feature flag: 'USERID'
Debugging through the UnleashClient code, it's apparent that stickiness
is expected to be userId
instead of USERID
.
What is the current bug behavior?
UnleashClient errors when checking on the feature flag:
Error checking feature flag: 'USERID'
What is the expected correct behavior?
no errors
Edited by Ofer Koren