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
{{ message }}
Repository navigation
[flagd] use sync_context field instead of GetMetadata #1509
[flagd] use sync_context field instead of GetMetadata
Background
Currently, to support static context enrichment via attributes sent from flagd, in-process providers call sync.GetMetadata along with starting the stream. This is not ideal. The stream isn't valid without the metadata response (since it could result in rules not functioning as expected due to missing attributes) and the metadata response is useless without the stream.
This has been implemented in flagd with this PR.
We need to absorb this change by making use of this new field in in-process providers
Requirements
while initializing the SyncFlags stream, continue to call getMetadata, but override it with the results from the sync_context field, if present (it's optional, so its presence can be checked).
Activity
sync.GetMetadataand add equivalent field tosync.SyncFlagspayload. flagd#1584[-]Java:[/-][+][flagd] use `sync_context` field instead of `GetMetadata`[/+]sync.GetMetadataand add equivalent field tosync.SyncFlagspayload. flagd#1584