Closed toddbaert closed 8 months ago
I will start working on this
I will start working on this
Amazing... let me know if you have any questions or want to meet up to think through anything.
One thing I'm so far not sure on is the use of connect... if it costs nothing, I'm fine with it... but if it's adds a lot of complexity we can re-evaluate cc @beeme1mr .
Update - 01.03.2024
/flagd.sync.v1.FlagSyncService
)Update - 04.03.2024
WIP PR #1237 for early builds. However, #1234 must be considered first and diff is huge as this is based on #1234
After some deep dive, found out it would require client migrations if we wants to build this with connect support. This is because a connect server cannot work with a grpc client directly. This is highlighted at migration guide [1] as well as connect's solution to bridge the gap - vanguard-go [2]
So I will differ use connect protocol, so support both web and server clients (optional, but suggested)
to another time
[1] - https://connectrpc.com/docs/go/grpc-compatibility#migration [2] - https://github.com/connectrpc/vanguard-go?tab=readme-ov-file#why-vanguard
After some deep dive, found out it would require client migrations if we wants to build this with connect support. This is because a connect server cannot work with a grpc client directly. This is highlighted at migration guide [1] as well as connect's solution to bridge the gap - vanguard-go [2]
So I will differ
use connect protocol, so support both web and server clients (optional, but suggested)
to another time[1] - https://connectrpc.com/docs/go/grpc-compatibility#migration [2] - https://github.com/connectrpc/vanguard-go?tab=readme-ov-file#why-vanguard
I support this decision. Please just make it clear in any doc, etc. We COULD multiplex it in the future to even do it non breaking if we add it.
After some deep dive, found out it would require client migrations if we wants to build this with connect support. This is because a connect server cannot work with a grpc client directly. This is highlighted at migration guide [1] as well as connect's solution to bridge the gap - vanguard-go [2] So I will differ
use connect protocol, so support both web and server clients (optional, but suggested)
to another time [1] - https://connectrpc.com/docs/go/grpc-compatibility#migration [2] - https://github.com/connectrpc/vanguard-go?tab=readme-ov-file#why-vanguardI support this decision. Please just make it clear in any doc, etc. We COULD multiplex it in the future to even do it non breaking if we add it.
Agree, I have completed all other task goals with PR #1237
Requirements
Problem
Currently, flagd doesn't support the flagd.sync.proto. This means that flagd cannot directly serve in-process providers. Users can still use in process providers by implementing a server that serves this proto, which is great if they are interested in building a custom control plane, perhaps with a UI. However, it's perfectly reasonable for users to want to use flagd itself with in-process providers.
Proposal
Support serving the flagd.sync.proto in flagd. When a sync client connects, it can use its
selector
field to select a source flagd is already watching (an http endpoint, file, or CR instance). If noselector
is specified, the client will get a merged representation of all sources flagd is watching (using the same merge logic as flagd). Note that unlike the flagd proxy, dynamically watching additional sources would not be supported. The sync endpoint would run on a separate port from the evaluation endpoint.Benefits
Tasks
selector
as described above to select source (or merge all source if not supplied)