You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by apatenge July 24, 2024
Hi OpenFeature .NET team,
I am wondering if there is a bug in the handling of the meta data between the resolver and the feature client interface.
I have created an own provider for my system and when I handover the metadata to the ResolutionDetails in the resolver it disappears on the way to the feature client.
I guess I found the reason for it. In the ResolutionDetailsExtensions the meta data is not passed through. It seems it is forgotten be added to the parameters of the FlagEvaluationDetails there.
I got me the source code of the latest release 1.5.1 and changed it as the following:
From: return new FlagEvaluationDetails<T>(details.FlagKey, details.Value, details.ErrorType, details.Reason, details.Variant, details.ErrorMessage);
To: return new FlagEvaluationDetails<T>(details.FlagKey, details.Value, details.ErrorType, details.Reason, details.Variant, details.ErrorMessage, details.FlagMetadata);
With that change it seems to work properly.
Could you please check for this and prove my change? Maybe I am wrong and my way to use it is wrong.
If not and this is correct, would there be a possibility to release a new version (1.5.2 ?!) with that change and provide this as Nuget package?
I would like to use the official package instead of my custom version.
Many thanks.
Regards,
André
The text was updated successfully, but these errors were encountered:
…tails to FlagEvaluationDetails (#285)
## This PR
When converting the ResolutionDetails to FlagEvalutionDetails we aren't
passing the FlagMetadata to the new object.
### Related Issues
Fixes [#1234523](#281)
### Notes
This PR is done on a common merge base so we can merge it into v1 as
well
### Follow-up Tasks
N/A
### How to test
Unit test added to covert the missing test case
---------
Signed-off-by: Benjamin Evenson <2031163+benjiro@users.noreply.github.com>
…agEvaluationDetails (#282)
## This PR
When converting the ResolutionDetails to FlagEvalutionDetails we aren't
passing the ImmutableMetadata to the new object.
### Related Issues
Fixes [#281](#281)
### Notes
This PR is done on a common merge base so we can merge it into v1 as
well
### Follow-up Tasks
N/A
### How to test
Unit test added to covert the missing test case
---------
Signed-off-by: Benjamin Evenson <2031163+benjiro@users.noreply.github.com>
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Discussed in #280
Originally posted by apatenge July 24, 2024
Hi OpenFeature .NET team,
I am wondering if there is a bug in the handling of the meta data between the resolver and the feature client interface.
I have created an own provider for my system and when I handover the metadata to the ResolutionDetails in the resolver it disappears on the way to the feature client.
I guess I found the reason for it. In the ResolutionDetailsExtensions the meta data is not passed through. It seems it is forgotten be added to the parameters of the FlagEvaluationDetails there.
See here: https://github.com/open-feature/dotnet-sdk/blob/main/src/OpenFeature/Extension/ResolutionDetailsExtensions.cs
I got me the source code of the latest release 1.5.1 and changed it as the following:
From:
return new FlagEvaluationDetails<T>(details.FlagKey, details.Value, details.ErrorType, details.Reason, details.Variant, details.ErrorMessage);
To:
return new FlagEvaluationDetails<T>(details.FlagKey, details.Value, details.ErrorType, details.Reason, details.Variant, details.ErrorMessage, details.FlagMetadata);
With that change it seems to work properly.
Could you please check for this and prove my change? Maybe I am wrong and my way to use it is wrong.
If not and this is correct, would there be a possibility to release a new version (1.5.2 ?!) with that change and provide this as Nuget package?
I would like to use the official package instead of my custom version.
Many thanks.
Regards,
André
The text was updated successfully, but these errors were encountered: