-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose sync-metadata, call RPC with (re)connect #967
Conversation
59b6474
to
bddf91d
Compare
...flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/grpc/GrpcConnector.java
Outdated
Show resolved
Hide resolved
e61a462
to
3186010
Compare
7a47301
to
494c72a
Compare
We should also document this feature within the providers readme - i think this is important to be aware of. |
0891c8a
to
100b3e9
Compare
@@ -20,10 +22,11 @@ | |||
@Slf4j | |||
@SuppressWarnings({ "PMD.TooManyStaticImports", "checkstyle:NoFinalizer" }) | |||
public class FlagdProvider extends EventProvider { | |||
private static final String FLAGD_PROVIDER = "flagD Provider"; | |||
private static final String FLAGD_PROVIDER = "flagd Provider"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we drop the provider suffix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, probably. I'll update.
providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
…s/flagd/resolver/grpc/GrpcConnector.java Co-authored-by: Simon Schrottner <[email protected]> Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
…s/flagd/FlagdProvider.java Signed-off-by: Todd Baert <[email protected]>
b95d966
to
128c4a7
Compare
This PR:
getSyncMetadata
accessor, and updated when the stream is (re)established, from here it can be used in provider hooks, events, etcPlease note the call logic may look a bit strange, but I think it's optimal. We call the
getMetadata
RPC as soon as we initiate the stream, and ignore exceptions. This is because it's very unlikely that the metadata RPC will fail while the stream succeeds, and every attempt to reconnect the stream will also retry the metadata - so we should be good with this pattern. If for some reason the metadata call fails but we connect without an issue, we log it.