Skip to content

[REFACTOR] Deprecate sync.GetMetadata and add equivalent field to sync.SyncFlags payload. #1584

@toddbaert

Description

@toddbaert

Requirements

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.

We should simply move the metadata into the stream response as an optional property. This should be done in a non-breaking way.

Requirements:

  • update proto
  • update flagd
    • serve the current contents of the GetMetadata payload in this new property in the sync stream
    • add a warning log when the old GetMetadata handler is called saying it's deprecated
    • both done with feat: add sync_context to SyncFlags #1642
  • update providers to use the new metadata field, but also use the old RPC for now (new field should "win")

cc @cupofcat @aepfli @chrfwow @beeme1mr @alexandraoberaigner

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions