Hey there,
My team's adopting the latest Flipt provider sdk version 0.1.3.
We try to get variant attachment for requests which do not hit any variant. The rules we defined work as expected via Flipt Playground on Flipt UI and via Flipt API call, but failed via Flipt provider sdk.
According to Flipt UI, the response should fallback to the default variant and get its metadata including the attachment.
However, it does not work as expected on Flipt UI. Instead, it returns only "null" value.
// response not as expected
:FlagEvaluationDetails(flagKey=my_flag_key, value=null, variant=null, reason=DEFAULT, errorCode=null, flagMetadata=dev.openfeature.sdk.ImmutableMetadata@xx)
The issue is possibly caused by the code logic here
Expectation:
GIVEN a variant flag is created and rules with default rule are defined
WHEN a request with context does not hit any variant of a flag
THEN the metadata of the default variant should be returned
Code to reproduce:
FlagEvaluationDetails<Value> flagEvaluationDetails = client.getObjectDetails(flagKey, null, evaluationContext);
ImmutableMetadata configMeta = flagEvaluationDetails.getFlagMetadata();