Mixpanel integration: falsy variant values collapse into enabled-state

Aperta
#7,701 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@afsuyadi ci sta già lavorando.

Dal 8/6/2026.

  • #8104 di @genrichez — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
analytics

Direzione di ricerca

Inizia individuando l’integrazione Mixpanel e la mappatura di flag state e variant value alla event property. Riproduci il caso con flag abilitati e varianti false, empty, zero, None e non-falsy, quindi verifica la mappatura documentata per ogni caso. Il lavoro è completato quando il comportamento e la documentazione corrispondono e i clienti interessati sono stati informati prima del release.

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

Descrizione

How are you running Flagsmith
  • Self Hosted with Docker
  • Self Hosted with Kubernetes
  • SaaS at flagsmith.com
  • Some other way (add details in description below)
Describe the bug

When a flag is enabled and the variant value is falsy, the mixpanel integration incorrectly fallbacks the value to the flag state true instead of false.

The documentation is ambiguous, only stating if the flag has no remote config value, pass the boolean state

# Current mapping

  Flag state | Variant value              | Sent to Mixpanel
  -----------+----------------------------+----------------------
  ON         | True                       | true (value)
  ON         | False / None / 0 / ""      | true (enabled state)
  ON         | "hello" / 42               | the value
  OFF        | anything                   | false (enabled state)
Steps To Reproduce
  1. Activate Mixpanel integration in your environment
  2. Create a multivariate feature
  3. Enable the flag
  4. Set a variant value to be false
  5. Mixpanel will show the variant as true
Expected behavior

The mapping should be:

  Flag state | Variant value              | Sent to Mixpanel
  -----------+----------------------------+----------------------
  ON         | True                       | true (value)
  ON         | False / "" / 0             | false
  ON         | None / null                | true (enabled state)
  ON         | "hello" / 42               | the value
  OFF        | anything                   | false (enabled state)

The resolution of the issue includes:

  • Updating the doc to be exhaustive in relation to the behavior
  • Communicate with impacted customers before releasing
Screenshots

No response

Lingua principale
Python
Stelle
9.9k
Fork
658
Merge medio
1g 15h
PR unite (30g)
168

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 Flagsmith/flagsmith

Tutte le issue di Flagsmith/flagsmith

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.