OpenFeature: route type mismatch and missing targeting key errors through error hooks

Aperta
#215 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
elixir
Ambito
backend, testing

Direzione di ricerca

Start by reviewing follow-up #214 and the PostHog OpenFeature provider, then inspect the OpenFeature Elixir SDK's hook lifecycle for :type_mismatch and :targeting_key_missing. Coordinate the upstream SDK change, update the provider and minimum dependency version as needed, and add real-client integration tests with recording hooks covering both errors and ordinary disabled flags.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement feature/feature-flags

Context

Follow-up to #214 (https://github.com/PostHog/posthog-elixir/pull/214).

The new OpenFeature provider surfaces :type_mismatch and :targeting_key_missing as successful resolution tuples containing reason: :error and the appropriate error_code. In open_feature 0.1.3, these run after hooks rather than error hooks. Python and Node throw the corresponding OpenFeature errors, which their SDKs route to error hooks.

Expected behavior

When a flag is read with an incompatible type or no targeting key/default distinct ID is available:

  • Return the caller's default with the appropriate OpenFeature error code.
  • Invoke registered error hooks, not successful after hooks.
  • Preserve finally hook execution.
  • Do not route ordinary disabled/unmatched flags through error hooks.

Approach

Coordinate an upstream Elixir OpenFeature SDK change to support these error categories and route them through its error-hook lifecycle while preserving their codes. Then update the PostHog provider and minimum supported dependency version as needed. Simply raising a generic exception is insufficient if it changes the public error code to :general.

Add integration tests using the real OpenFeature client and recording hooks for both error cases and ordinary disabled flags.

This is a follow-up and should not block #214.

Lingua principale
Elixir
Stelle
66
Fork
33
Merge medio
1g 22h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PostHog/posthog-elixir

Tutte le issue di PostHog/posthog-elixir

Issue simili

Altre issue su Elixir

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.