Closed
Description
Hello guys!
In the latest version (0.4.0), the fetch_{result_type}_{suffix}
evaluation methods are not functioning as expected. This issue appears to stem from a call to an undefined method evaluation_context
in the OpenFeature::SDK
. Below is the problematic code:
def fetch_#{result_type}_#{suffix}(flag_key:, default_value:, evaluation_context: nil)
built_context = EvaluationContextBuilder.new.call(api_context: OpenFeature::SDK.evaluation_context, client_context: self.evaluation_context, invocation_context: evaluation_context)
resolution_details = @provider.fetch_#{result_type}_value(flag_key:, default_value:, evaluation_context: built_context).
evaluation_details = EvaluationDetails.new(flag_key:, resolution_details:)
#{"evaluation_details.value" if suffix == :value}
end
There is a problematic line in the code:
built_context = EvaluationContextBuilder.new.call(api_context: OpenFeature::SDK.evaluation_context, client_context: self.evaluation_context, invocation_context: evaluation_context)
Any call to fetch_{result_type}_{suffix}
throws the following error:
NoMethodError: undefined method `evaluation_context' for module OpenFeature::SDK
Metadata
Metadata
Assignees
Labels
No labels