[FSSDK-11572] Python: Update impression event handling and send notification for global holdout#469
Conversation
…ication for global holdout
There was a problem hiding this comment.
What Changed in PR #469:
-- decision_service.py - CHANGED
holdouts = project_config.get_holdouts_for_flag(feature.id) # ← Using ID now
-- project_config.py - CHANGED
def get_holdouts_for_flag(self, flag_id: str) -> list[HoldoutDict]:
return self.flag_holdouts_map.get(flag_id, []) # ← Looking up by ID
What DIDN'T Change:
-- project_config.py init - NOT CHANGED (still in codebase)
if applicable_holdouts:
self.flag_holdouts_map[feature.key] = applicable_holdouts # ← Still using KEY!
The Problem:
-- Map is built with KEYS:
flag_holdouts_map = {
"checkout_flag": [holdout1, holdout2], # ← Key = "checkout_flag"
"payment_flow": [holdout3] # ← Key = "payment_flow"
}
-- Code is looking up by IDs:
holdouts = flag_holdouts_map.get("123456", []) # ← ID = "123456"
-- Result: [] (empty!) because "123456" != "checkout_flag"
Impact: Holdouts will NEVER be found. All lookups return empty list. Holdout decisions
will never happen.
|
Also consistency issue:
|
Summary
Test plan
PR checks
Issues