Skip to content

Evaluation in Python does not appear to match evaluation done via web #186

@jeffdn

Description

@jeffdn

When utilizing a custom attribute that contains an array of strings, it is possible in the web client to configure a check against that attribute for set intersection, using is one of. For instance (these UUIDs have been randomly generated):

image

Any variation check for a user who has one of those UUIDs in their entity_ids custom attribute will return true, otherwise the served variation will be false. I have tried to replicate this behavior on the backend by reaching into the guts of TestData. I have tried to execute this behavior using the Files.new_data_source functionality. I cannot get it to work correctly. Am I missing something here? I'd like to be able to allow our users to test that their variations work correctly.

Specifically, a large use case for our checks will be "is the user in question associated with one or more of the entities in the list of targeted entity UUIDs?", for which we provide a body like this (all data is faked):

{
    "key": "xxxxxx",
    "custom": {
        "entity_ids": [
            "5fe43839-e535-4fcd-a12f-9202938bee18",
            "eeafcf8e-d0bd-4bec-8473-14751e2ef54b",
            "e5ae8f51-434a-4e9f-b7be-cdd64c9f5dfd"
        ]
    }
}

This works successfully when testing against the web client, but for both TestData and Files.new_data_source, even when tinkering with the guts of the LaunchDarkly code, I have been unable to get a successful execution.

SDK version: launchdarkly-server-sdk==7.5.1
language version: python-3.8.13
OS/platform: macOS 12.6

Metadata

Metadata

Assignees

No one assigned

    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