open-feature / open-feature/python-sdk
Supply the bound domain to provider initialization
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 111
- Forks
- 44
- Ø Merge
- 2 Std. 37 Min.
- Gemergte PRs (30 T.)
- 14
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem im Issue beschriebenen Provider-Mutator und der Provider-Initialisierungs-API und verfolge anschließend, wie Provider-Bindings gespeichert und validiert werden. Füge Tests für die Übergabe einer optionalen Domain, Domain-bezogene Deklarationen und die Ablehnung eines zweiten Domain-Bindings hinzu; aktualisiere die Provider-Dokumentation. Erledigt ist die Aufgabe, wenn bestehende Provider kompatibel bleiben und die neuen Einschränkungen abgedeckt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100