Hi,
During flag evaluation the transaction context is merged into the evaluation context here:
|
merged_context = self._before_hooks_and_merge_context( |
However the
hook_context.evaluation_context is created before this, so it doesn't contain the attributes or targeting key that exists in the propagated transaction context. This is unexpected. I believe that the
_before_hooks_and_merge_context should be called inside
_establish_hooks_and_provider so that the
evaluation_context field in the
hook_context can be up to date with all the attributes.
Hi,
During flag evaluation the transaction context is merged into the evaluation context here:
python-sdk/openfeature/client.py
Line 778 in 288bd6b
However the
hook_context.evaluation_contextis created before this, so it doesn't contain the attributes or targeting key that exists in the propagated transaction context. This is unexpected. I believe that the_before_hooks_and_merge_contextshould be called inside_establish_hooks_and_providerso that theevaluation_contextfield in thehook_contextcan be up to date with all the attributes.