Skip to content

[FEATURE] add sync_context to SyncFlags payload #1635

Closed

Description

@toddbaert

Requirements

open-feature/flagd-schemas#183 deprecated the GetMetadata call. Now the sync stream can return the same data, saving providers an RPC call. Providers will do exactly the same thing with this information as they currently do with the GetMetadata call.

Requirements:

  • implement sync_context field in SyncFlags, which has the same payload as GetMetadata
  • keep GetMetadata for now, for reverse compatibility
  • add associated tests

Activity

  1. added
    enhancement
    good first issue
    help wanted
    on May 29, 2025
  2. changed the title [-][FEATURE] add sync_context[/-] [+][FEATURE] add sync_context to SyncFlags payload[/+] on May 29, 2025
  3. bbland1 commented on Jun 16, 2025

    @bbland1
    Member

    @aepfli thanks for the review on the PR!

    I wanted to just ask questions for my understanding (I am new to the gRPC world and the .proto files so I am learning as I worked on this issue), the sync.proto that is established has sync_context there and numbered(???) stating I believe it is new & optional can be passed and older clients and they will ignore it. If any of that is wrong let me know. 😅

    but I know your comment was knowing if the data was in the payload or the other call needs to be made, would documenting the change and making sure for new clients only use the new way while older clients possibly slowly migrate until fully removed be a viable solution (it may not be if I missed some context, which is why I wanted to ask lol.

  4. aepfli commented on Jun 17, 2025

    @aepfli
    Member

    that is correct, but the sync_context will actually supersede the GetMetadata-Request, and for me currently, it is not clear how we will migrate the clients in a non-breaking way. Our providers currently fetch first the metadata and afterwards the sync endpoint. We can not remove the metadata request at the beginning, because we don't know which version of flagd is running, or if there will be data in the sync payload. So this generates a little bit of confusion for me, how we want to try to solve this, or ensure this behavior. ;)

  5. bbland1 commented on Jun 17, 2025

    @bbland1
    Member

    @aepfli Ohhhh, that makes a lot of sense, and definitely filled in some missing context bu-dum-tss 😅. I was understanding it as the SyncFlags is called first or the base every time and then GetMetadata was called to fill in that missing info from previous versions. I didn’t realize it was called first.

    Since we don’t currently know which version is being ran there’s confusion on even to check which method is the one to use, and not wanting to break it until people migrate is the important part. I’m with you now, thanks!

  6. added a commit that references this issue on Jul 4, 2025
    07a45d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuehack.commit.pushhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions