-
Notifications
You must be signed in to change notification settings - Fork 14
[dotnet] Enable ffe for dotnet #6066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
eeb052a to
ba3c3c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8627086261
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "BOOLEAN" => await _client.GetBooleanValueAsync(request.Flag, Convert.ToBoolean(request.DefaultValue), context), | ||
| "STRING" => await _client.GetStringValueAsync(request.Flag, request.DefaultValue?.ToString(), context), | ||
| "INTEGER" => await _client.GetIntegerValueAsync(request.Flag, Convert.ToInt32(request.DefaultValue), context), | ||
| "NUMERIC" => await _client.GetDoubleValueAsync(request.Flag, Convert.ToDouble(request.DefaultValue), context), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle JsonElement defaults for non-string flag types
Here defaultValue is declared as object, so ASP.NET Core’s JSON binding will deserialize booleans/numbers into JsonElement, not bool/int/double. Convert.ToBoolean/ToInt32/ToDouble does not accept JsonElement, so any BOOLEAN/INTEGER/NUMERIC evaluation throws and is caught, returning the default without calling OpenFeature (reason becomes "ERROR"). That means non-string flags can never be evaluated (and exposure events won’t be generated) for requests that send JSON booleans or numbers.
Useful? React with 👍 / 👎.
Motivation
Changes
Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present