launchdarkly / dotnet-client-sdk

LaunchDarkly Client-side SDK for .NET
Other
7 stars 10 forks source link

Nested segments do not evaluate correctly #94

Closed burns47 closed 4 months ago

burns47 commented 4 months ago

Describe the bug

LaunchDarkly does not correctly evaluate targeting rules involving segments that reference another segment.

To reproduce Create a segment: image

Then create another segment that references that segment: image

Create a LD rule that targets the outer segment: image

Expected behavior false would be served if my email was jake.burns@dutchie.com.

The rule fails and reports that the fallthrough rule was used:

image

If I instead target the inner segment directly:

image

Then the flag evaluates as expected: image

Logs If applicable, add any log output related to your problem.

SDK version 6.3.1

Language version, developer tools .NET 6

OS/platform Windows & Ubuntu

Additional context Add any other context about the problem here.

kinyoklion commented 4 months ago

Hello @burns47,

This is the repository for the client-side SDK. Your intent seems to be the server SDK, as the version number correlates with a server SDK.

In order to use nested segments you need version 7.0 or higher of the server sdk. Contexts and nested segment support were added in that version.

This is the server repository: https://github.com/launchdarkly/dotnet-server-sdk

Please note that 6.x is beyond its EOL.

Thank you, Ryan

burns47 commented 4 months ago

Thank you @kinyoklion - I was unaware of the difference, my apologies. I'll close this issue!