feat!: DISABLED is a successful evaluation (still defaults)#671
Conversation
93f5379 to
2f7ea06
Compare
There was a problem hiding this comment.
Code Review
This pull request modifies the JsonEvaluator in the flagd provider to return a ResolutionDetails object with a Reason.Disabled status instead of throwing a FeatureProviderException when a flag is disabled. The corresponding unit tests have been updated to verify that evaluating a disabled flag returns the correct default value, a disabled reason, and a null variant, even when targeting rules are present. There are no review comments to address.
|
Note on why we return The Java provider (open-feature/java-sdk-contrib#1800) returns We can't do the same in .NET. The provider interface uses non-nullable value types: Task<ResolutionDetails<bool>> ResolveBooleanValueAsync(string key, bool defaultValue, ...)
// ^^^^ can't be null
Go has the same constraint ( The correct fix would be adding substitution logic to the .NET SDK itself (when |
c7d1d77 to
7504696
Compare
…d flags Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
7504696 to
88ffaf7
Compare
reason=DISABLEDinstead oferrorCode=FLAG_NOT_FOUND. See the ADR.reason/errorCodeon disabled-flag evaluations.Related Issues
Closes #653
Part of open-feature/flagd#1965
Warning
This PR depends on #673 (RPC
flagd-selectorheader wiring) merging first; the cross-flagset disabled scenario in the RPC e2e suite will fail until that lands. All other RPC e2e + in-process scenarios pass.