Skip to content

Conversation

@kinyoklion
Copy link
Member

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.

README.md Outdated
## OpenFeature Specific Considerations

When evaluating a `User` with the LaunchDarkly Server-Side SDK for .NET a string `key` attribute would normally be required. When using OpenFeature the `targetingKey` attribute should be used instead of `key`. If a `key` attribute is provided in the `EvaluationContext`, then it will be discarded in favor of `targetingKey`. If a `targetingKey` is not provided, or if the `EvaluationContext` is omitted entirely, then the `defaultValue` will be returned from OpenFeature evaluation methods.
LaunchDarkly evaluates contexts, and it can either evaluate a single-context, or a multi-context. When using OpenFeature both single and multi-contexts must be encoded into a single `EvaluationContext`. This is accomplished by looking an attribute named `kind` in the `EvaluationContext`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not have docs on the docs site yet for OpenFeature providers, so the README needs to be more elaborate to explain contexts and how you make them.


<ItemGroup>
<PackageReference Include="LaunchDarkly.ServerSdk" Version="[6.3.2,7.0)" />
<PackageReference Include="LaunchDarkly.ServerSdk" Version="[7.0,8.0)" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should work with major versions until 8, which it should not work with.

_client = client;
var logConfig = (config?.LoggingConfigurationFactory ?? Components.Logging())
.CreateLoggingConfiguration();
.Build(null);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is extremely questionable. I've not determined if there is anything else I can really do about it.

.Set("anonymous", true).Build();

var convertedUser = _converter.ToLdUser(evaluationContext);
var convertedUser = _converter.ToLdContext(evaluationContext);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left these tests mostly intact using User, and then added new a couple new tests.

@kinyoklion kinyoklion marked this pull request as ready for review February 13, 2023 23:54
@kinyoklion kinyoklion requested a review from keelerm84 February 13, 2023 23:54
Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com>
@kinyoklion kinyoklion merged commit 8dbd038 into main Feb 14, 2023
@kinyoklion kinyoklion deleted the rlamb/u2c branch February 14, 2023 21:45
@kinyoklion kinyoklion restored the rlamb/u2c branch February 14, 2023 22:01
@kinyoklion kinyoklion deleted the rlamb/u2c branch February 14, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants