open-feature / flagd

A feature flag daemon with a Unix philosophy
https://openfeature.dev
Apache License 2.0
453 stars 55 forks source link

fix: invalid scoped-sync responses for empty flags #1352

Closed toddbaert closed 1 week ago

toddbaert commented 1 week ago

Fixes an issue where invalid flag payloads were returned on sync requests with scopes if the flag set was empty.

Below is an example of the bug.

$ grpcurl -import-path /home/todd/temp -proto sync.proto -plaintext localhost:8015 flagd.sync.v1.FlagSyncService/FetchAllFlags
{
  "flagConfiguration": "{\"flags\":{}}"
}
$ grpcurl -import-path /home/todd/temp -proto sync.proto -plaintext -d '{"selector":"../config/samples/example_flags.flagd.json"}' localhost:8015 flagd.sync.v1.FlagSyncService/FetchAllFlags 
{}
netlify[bot] commented 1 week ago

Deploy Preview for polite-licorice-3db33c canceled.

Name Link
Latest commit 8a7e186c5e2e08a25fa984e635ffe719389b1fd1
Latest deploy log https://app.netlify.com/sites/polite-licorice-3db33c/deploys/6688315182deb60008b4614e