[Static-context Paradigm] How to handle errors in `on context changed`
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- api, backend-api-design
Research direction
Start with the provider context reconciliation section linked in the issue and review the existing setContext behavior for static-context providers. Compare the proposed error-handling options and determine the intended treatment of failed reconciliation. Done means the specification clearly defines the behavior and resulting provider or context state.
Written by the indexing model from the issue text.
Description
In static-context-paradigm (aka client paradigm), the provider context-changed handler runs to help reconcile the new global context with the provider's state (and in many cases the underlying SDK's state). This likely involves doing some kind of conversion of the context. It's reasonable for this function to throw an error, or otherwise signal an abnormal termination.
We haven't defined how this should be handled. I see the following options:
- throw/indicate an error in the
setContext, ie: bubble up the error, and leave the context unchanged- we'd have to make it clear this method could "fail"; I think this is still consistent with our paradigm of not throwing during evaluation since this isn't an evaluation
- transition the provider to an error state and run the error handlers
- in these case the OpenFeature context is left in an "unreconciled" state, which could be problematic
[!NOTE]
I don't believe this is relevant to dynamic-context aka server-side SDKs and providers, which do this sort of conversion within the evaluation flow.
cc @jonathannorris @moredip @lukas-reining @beeme1mr @fabriziodemaria @vahidlazio @thomaspoignant @kinyoklion
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 58
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-feature/spec
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
open-feature/spec#427 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
open-feature/spec#433 ·
-
enhancement question
Difficulty 5/5 Over a week Newbie friendliness 35/100
open-feature/spec#430 ·
-
enhancement question roadmap-proposal
Difficulty 5/5 Over a week Newbie friendliness 30/100
open-feature/spec#424 · 9 comments ·
-
open-feature/spec#417 · 8 comments · 1 assignee ·
All issues in open-feature/spec
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100