Mixpanel integration: falsy variant values collapse into enabled-state

Aberta
#7,701 3 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@afsuyadi já está trabalhando nisso.

Desde 8/6/2026.

  • #8104 de @genrichez — fechado sem integrar

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
python
Domínio
analytics

Direção de pesquisa

Comece localizando a integração com o Mixpanel e o mapeamento de flag state e variant value para a event property. Reproduza o caso com flags habilitadas e variantes false, empty, zero, None e non-falsy e, em seguida, verifique o mapeamento documentado para cada caso. Considera-se concluído quando o comportamento e a documentação estiverem de acordo e os clientes afetados tiverem sido comunicados antes do release.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Python
Estrelas
9.9k
Forks
658
Merge médio
1d 15h
PRs com merge (30d)
168

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Flagsmith/flagsmith

Todas as issues de Flagsmith/flagsmith

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.