open-feature / open-feature/python-sdk
Supply the bound domain to provider initialization
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 111
- Forks
- 44
- Avg merge
- 2h 37m
- Merged PRs (30d)
- 14
Description
The spec now supplies the bound domain to a provider's initialize function, and adds an opt-in domain-scoped provider declaration that the API enforces by binding such a provider to at most one domain. This lets stateful providers (e.g. an OFREP static-context provider with a persistent cache) scope their state to a single, unambiguous domain.
What needs to happen
- Pass the bound
domain(if any) to the provider'sinitializewhen it's registered via the provider mutator - Extend the provider
initializeto accept the optionaldomain(non-breaking, additional optional parameter) - Add a way for a provider to declare itself
domain-scoped - Enforce that a
domain-scopedprovider is bound to at most onedomain, rejecting any attempt to bind an already-bound instance to anotherdomain - Associated testing and docs
Links
- Parent issue: https://github.com/open-feature/spec/issues/403
- Spec sections: 1.1 Flag evaluation, 2.4 Initialization
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.
Research direction
Start with the provider mutator and provider initialize API described in the issue, then trace how provider bindings are stored and validated. Add tests for optional domain passing, domain-scoped declarations, and rejection of a second domain binding; update the provider documentation. Done means existing providers remain compatible and the new constraints are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100