Commit 9d18379
committed
Fix user profile tracking in get_variation_for_feature
CRITICAL FIX: Restore user profile service integration that was broken
after holdout refactor. The get_variation_for_feature method was calling
get_decision_for_flag without creating or managing user_profile_tracker,
which broke sticky bucketing for all single-feature decision methods.
Changes:
- Create user_profile_tracker when user_profile_service is available
- Load user profile before calling get_decision_for_flag
- Pass user_profile_tracker to get_decision_for_flag (instead of None)
- Save user profile after decision is made
- Matches pattern used in get_variations_for_feature_list
Impact:
- Restores sticky bucketing for is_feature_enabled, get_feature_variable, etc.
- Fixes user profile e2e test failures
- All 734 tests passing
Aligned with Swift SDK behavior while maintaining backward compatibility.1 parent 8b301a8 commit 9d18379
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
677 | 690 | | |
678 | 691 | | |
679 | 692 | | |
680 | | - | |
681 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
682 | 700 | | |
683 | 701 | | |
684 | 702 | | |
| |||
0 commit comments