fix: Correct logic for evaluation blocked for ERROR and STALE providers#96
Conversation
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
There was a problem hiding this comment.
Code Review
This pull request updates the EvaluateFlag method in ClientAPI to explicitly handle different provider statuses. It replaces the generic non-ready check with specific logic for ProviderStatus::kNotReady and ProviderStatus::kFatal, ensuring that a fatal provider state returns the appropriate ErrorCode::kProviderFatal. I have no feedback to provide as there were no review comments to evaluate.
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
toddbaert
left a comment
There was a problem hiding this comment.
Could possibly benefit from test coverage but I'll let you decide if the tradeoff is worth it.
…ix_provider_evaluation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesProvider Fatal Error Code Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
97527dc to
9a98411
Compare
…ture/cpp-sdk into fix_provider_evaluation
9a98411 to
a43a6e7
Compare
🤖 I have created a release *beep* *boop* --- ## [0.1.1](v0.1.0...v0.1.1) (2026-06-23) ### Bug Fixes * Correct logic for evaluation blocked for ERROR and STALE providers ([#96](#96)) ([9610f71](9610f71)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
This PR
Fixes the flag evaluation which was incorrectly blocked when the feature provider was in
ERRORorSTALEstates.Previously, the SDK short-circuited evaluation for any provider status other than
READY. This PR updates theEvaluateFlaglogic to strictly follow the OpenFeature specification by:PROVIDER_NOT_READYerror code only when the provider isNOT_READY(Requirement 1.7.6).PROVIDER_FATALerror code only when the provider is in aFATALerror state (Requirement 1.7.7).READY,ERROR, andSTALEstates, ensuring cached values can still be returned when appropriate.Related Issues
Fixes #69
Notes
Follow-up Tasks