Mixpanel integration: falsy variant values collapse into enabled-state

Abierto
#7,701 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@afsuyadi ya está trabajando en esto.

Desde el 8/6/2026.

  • #8104 de @genrichez — cerrado sin fusionar

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
analytics

Línea de trabajo

Comienza localizando la integración con Mixpanel y el mapeo de flag state y variant value a la event property. Reproduce el caso con flags habilitados y variantes false, empty, zero, None y non-falsy, y después verifica el mapeo documentado para cada caso. Se considera terminado cuando el comportamiento y la documentación coinciden y se ha comunicado la situación a los clientes afectados antes del release.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
9.9k
Forks
658
Merge medio
1 d 15 h
PR fusionados (30 d)
168

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Flagsmith/flagsmith

Todos los issues de Flagsmith/flagsmith

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.