Hey all, I have a question, when using the Python ...
# ask-questions
p
Hey all, I have a question, when using the Python SDK (
growthbook==1.3.1
) with
GrowthBookClient
and
client.initialize()
, I get an "Unknown feature" warning when evaluating a feature that’s defined in the dashboard but disabled in all environments. • Is this the expected behavior? • Or does it suggest the SDK isn’t updating feature definitions properly? Notably, value changes (e.g.
true
false
) are reflected fine, but when a feature is disabled, it seems to stop updating in the SDK’s cache. Would appreciate any clarification! Thanks!
s
This is the expected behavior. If the feature is completely disabled, it's not included in the SDK payload at all, which would result in the Unknown feature error.
p
shouldn't that be the case in case if I disable the feature as well? current behaviour it keeps last value in the cache until service restarts
s
ah, gotcha. So you're saying that when you enable the feature, your in-memory cache via the Python SDK isn't updated? Are you able share your implementation?
p
If the feature is disabled, the latest value remains in the cache and isn't removed. the key point might be understanding what it actually means when a feature is 'disabled.' Especially for boolean features, the toggle can give the impression of an on/off switch. However, it's more nuanced 'disabled' means the feature is in an 'UNKNOWN' state, rather than explicitly set to false and when 'enabled' then the value gets resolved based on the default and rules... Is that the correct interpretation?
s
When a feature is disabled, it should evaluate to None and then default to whatever your fallback value is. Behind the scenes, a disabled feature doesn't show up in the SDK payload at all. That means that it would show up in the payload returned from the call to
<https://cdn.growthbook.io/api/features/sdk-XYZ>
. But it sounds like it's perhaps the case that the Python SDK isn't reflecting that.
👍 1
p
yes indeed, if it's not in the payload I would expect it to be removed from the cache
s
Let me have our SDK engineer check it out. I'll follow up
thankyou 1