Skip to content

Returning "name": "disabled" when getting variants using Python SDK #197

@renzpaoloabergos

Description

@renzpaoloabergos

Describe the bug
When using the unleash client's get_variant function, we are receiving unexpected results:

context = {"userId": "YdTFXyyh463XQbZK"}
variant = unleash_client.get_variant("live.gbdt_v5_20220309_active_user", context)

Result:
{'name': 'disabled', 'enabled': True}

To Reproduce
Steps to reproduce the behavior:

  1. Create feature toggle with the name live.gbdt_v5_20220309_active_user
  2. Populate at least 1 random variant
  3. Try getting a variant with that user id and feature toggle name

Expected behavior
We expect it to return a randomized variant with its payload.

Logs

{'userId': 'YdTFXyyh463XQbZK'}
FEATURE TOGGLE: live.gbdt_v5_20220309_active_user
ENABLED:  True
VARIANT:  {'name': 'disabled', 'enabled': True}

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions