Skip to content

[flagd] use sync_context field instead of GetMetadata #278

@toddbaert

Description

@toddbaert

[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).
  • associated tests

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions