[Flags] feat: PROVIDER_NOT_READY state#2967
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/feature-flagging #2967 +/- ##
============================================================
+ Coverage 70.81% 70.83% +0.02%
============================================================
Files 840 840
Lines 30547 30559 +12
Branches 5167 5169 +2
============================================================
+ Hits 21629 21644 +15
Misses 7451 7451
+ Partials 1467 1464 -3
🚀 New features to boost your workflow:
|
| verify(mockInternalLogger).log( | ||
| eq(InternalLogger.Level.ERROR), | ||
| eq(InternalLogger.Target.USER), | ||
| any(), |
There was a problem hiding this comment.
nit: it is better to verify the message, otherwise assertion is too wide.
82cee14 to
719eea9
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
What does this PR do?
Implements provider readiness state tracking for the Flags SDK by adding the
PROVIDER_NOT_READYerror code and enforcing that flag resolution cannot occur untilsetEvaluationContext()has been called at least once.Motivation
The mobile API spec requires proper error handling when flags are evaluated before the provider is ready. This ensures:
Before this change, attempting to resolve flags before
setEvaluationContext()would returnFLAG_NOT_FOUNDerrors, which was misleading since the real issue was that the client wasn't ready yet.Review checklist (to be filled by reviewers)