Repository navigation
fix: catch NotImplementedError in track and the hook lifecycle - #349
Conversation
track now returns nil for a provider or propagator that raises NotImplementedError, and HookExecutor treats it like any other evaluation error, so error hooks run and finally hooks get the default details. Signed-off-by: Jose Colella <jose.colella@gusto.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 32 minutes. View limit details
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #349 +/- ##
=======================================
Coverage 99.54% 99.54%
=======================================
Files 32 32
Lines 879 879
=======================================
Hits 875 875
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The narrow rescue changes match the intended behavior and include targeted regression coverage, with no unresolved findings; tests were not executed.
No open issues 🎉
What changed in this PR
Closes the NotImplementedError handling gaps left after #346, extending the Ruby SDK’s non-raising client behavior.
Changes:
- Makes
trackreturn nil when the provider or context builder raisesNotImplementedError. - Routes
NotImplementedErrorthrough error hooks and supplies default evaluation details to finally hooks. - Adds regression coverage while preserving propagation of unrelated exceptions such as
Interrupt.
| File | Description |
|---|---|
spec/specification/tracking_spec.rb |
Tests tracking with a provider that raises NotImplementedError. |
spec/specification/flag_evaluation_api_spec.rb |
Tests error and finally hooks after a provider raises NotImplementedError. |
lib/open_feature/sdk/hooks/hook_executor.rb |
Includes NotImplementedError in lifecycle error handling. |
lib/open_feature/sdk/client.rb |
Includes NotImplementedError in tracking error handling. |
Review effort: Balanced
Summary
NotImplementedError. Copilot found these gaps in review, and the fixes landed on the branch just after it merged, so they missed 0.6.7.tracknow returns nil when the provider or the transaction-context propagator raisesNotImplementedError.NotImplementedErrornow runs error hooks, and finally hooks get the default details. Before, error hooks were skipped and finally hooks got nil.Interruptand other non-StandardErrorexceptions still propagate.🤖 Generated with Claude Code