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
A warning is logged to the console for every feature flag with a targeting rule defined when performing a bulk evaluation. This only affects the ResolveAll endpoint.
Here's an output of the logs.
playground-flagd-1 | 2023-09-19T00:56:01.691Z warn eval/json_evaluator.go:366 overwriting $flagd properties in the context {"component": "evaluator", "evaluator": "json"
Expected Behavior
The warning log should only occur when the incoming context includes the property $flagd.
Steps to reproduce
Start the latest version of flagd. In this example, the test bed image is used but the same behavior is visible in flagd as well.
docker run --rm -it -p 8013:8013 ghcr.io/open-feature/flagd-testbed:latest
Run the ResolveAll command
curl -X POST "http://localhost:8013/schema.v1.Service/ResolveAll" \
-d '{"context":{}}' -H "Content-Type: application/json"
The text was updated successfully, but these errors were encountered:
Oh my. I guess this is probably because maps are passed as reference, and we are adding the $flagd properties to the map which then is found in all the references. Probably setFlagdProperties should return a new map?
Observed behavior
A warning is logged to the console for every feature flag with a targeting rule defined when performing a bulk evaluation. This only affects the
ResolveAll
endpoint.Here's an output of the logs.
Expected Behavior
The warning log should only occur when the incoming context includes the property
$flagd
.Steps to reproduce
Start the latest version of flagd. In this example, the test bed image is used but the same behavior is visible in flagd as well.
Run the
ResolveAll
commandThe text was updated successfully, but these errors were encountered: