Ruby, PHP, Elixir and Edge SDKs: flag evaluation does not send the user's attributes

Aperta
#1,720 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
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
elixir, php, ruby, typescript

Direzione di ricerca

Start with the evaluation request in Ruby client.rb around lines 60–71, PHP, Elixir, and Edge client.ts around line 161; compare how Python, JavaScript, and Go send context. Add the requested exact-URL regression tests for each SDK, checking special characters, cache keys, and errors or logs, and replace each SDK page's limit sentence. The work is done when all four SDKs send encoded attributes and their tests pass.

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

Descrizione

bug post-launch

The Ruby, PHP, Elixir and Edge SDKs do not send the user's attributes when they evaluate a flag, so a flag targeting rule on attributes never matches from them. The user gets the global rollout answer instead (it fails closed).

Where: each builds GET /api/v1/feature-flags/evaluate/{key} with the user id only (Ruby client.rb around lines 60-71; PHP has no attributes parameter; Elixir and Edge (client.ts around line 161) likewise).

Who sees it: nobody yet through a published package: none of the four is published, and each SDK page already states the limit (docs/sdk/ruby.md around line 108, docs/sdk/php.md around lines 100-102, docs/sdk/elixir.md around line 138, docs/sdk/edge.md around line 290). Python, JavaScript, Go, React, React Native and both OpenFeature providers send context on flag evaluation. Java and .NET have their own issues.

Fix (per SDK):

  • Ruby: send context (URL-encoded JSON of the attributes) on flag evaluation; leave it out when there are no attributes.
  • PHP: same.
  • Elixir: same.
  • Edge: same.
  • Each with an exact-URL regression test (an attribute value containing +, &, =, #, a space and a non-ASCII character), the cache key kept as user + flag, no query string in errors or logs, and its page's limit sentence replaced.

Release note: each SDK's first publish waits for its part of this fix. That includes Edge, which already has an npm publish path.

Lingua principale
Python
Stelle
0
Fork
4
Merge medio
5h 36m
PR unite (30g)
509

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 Controlvar/controlvar

Tutte le issue di Controlvar/controlvar

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.