feat: State change notification for flags client (for OpenFeature)#3042
Merged
Merged
Conversation
Implements state observation API for FlagsClient: - Add FlagsClientState sealed class (NotReady, Reconciling, Ready, Stale, Error) - Add FlagsStateListener interface for state change callbacks - Add StateObservable interface bundling getCurrentState, addListener, removeListener, and Flow - Implement FlagsStateManager with ExecutorService for ordered state notifications - Add synchronized blocks for defensive thread safety - Expose state via client.state property - Add StateFlow support for Kotlin coroutines - Ensure Java compatibility - Update NoOpFlagsClient with Ready state - Add comprehensive tests PR #3025
typotter
marked this pull request as ready for review
December 8, 2025 16:46
|
🎯 Code Coverage 🔗 Commit SHA: d6a97bf | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/flags-ofeat #3042 +/- ##
=======================================================
+ Coverage 71.10% 71.30% +0.19%
=======================================================
Files 860 862 +2
Lines 31311 31365 +54
Branches 5275 5277 +2
=======================================================
+ Hits 22263 22362 +99
+ Misses 7556 7521 -35
+ Partials 1492 1482 -10
🚀 New features to boost your workflow:
|
0xnm
approved these changes
Dec 9, 2025
0xnm
left a comment
Member
There was a problem hiding this comment.
I'm not quite sure about the need of cherry-picking.
What we usually do is simply keeping feature branches up-to-date with develop branch by merging develop branch into the feature branch, so I guess we could do this instead.
But this approach is not blocking to me.
jonathanmos
approved these changes
Dec 9, 2025
Contributor
Author
|
Thanks Nikita. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR cherry-picks the state management implementation from PR #3025 onto the
feature/flags-ofeatbranch.This intermediate PR enables PR #2998 (OpenFeature provider) to depend on state management functionality without polluting its diff with unrelated state management commits.
What's Included
State management infrastructure for FlagsClient:
FlagsClientStatesealed class (NotReady, Ready, Reconciling, Stale, Error)StateObservableinterface (getCurrentState, addListener, removeListener)FlagsStateManagerinternal implementationFlagsStateListenercallback interfaceDependencies
None - this is a clean cherry-pick of merged state management work.
Review Strategy
This is a dependency branch for stacked PRs:
Review notes:
🤖 Generated with Claude Code