-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Expose TargetingKey with all value exporters #235
Comments
The addition of the I wonder if we should have just made it short-hand for "targetingKey" as a member of the underlying structure. If we just export it, then we have to use some kind of name that will shadow whatever we pick. (Likely "targetingKey"). Instead we could adjust the general Similar situation: https://github.com/launchdarkly/dotnet-sdk-common/blob/d248d74b29fb0d1e27771c5810b8277fd256e266/src/LaunchDarkly.CommonSdk/ContextBuilder.cs#L272 |
@kinyoklion I think I understand what you're suggesting, but I want to be sure... Are you suggesting that you think the targeting key setter/getter should just retrieve a "special" property from the map (probably I think that's fine, if so. I think the real problem is just that people will expect the We're close to being about to release a 2.0, so I'm reviewing some of these open issues. |
@toddbaert Yeah, I am suggesting that the key of "targetingKey" and the setter/getter for targetingKey should operate on the same value. Which either requires a specially interacted with field or a special entry in the map with specialized logic for the set/get generic mechanisms. Set("targetingKey", "potato"); var targetingKey = Get("targetingKey"); Should all basically be setting/getting the same field, and that field should also be in the dictionary. |
I'm fine with that. I'll add it to the description, and try to get to it myself if nobody else does first. |
I'm starting on this. |
Use the internal dictionary for the `targetingKey`. This is non-breaking from a compiler perspective. It could result in some behavioral changes, but IMO they are largely desirable. Fixes: open-feature#235 --------- Signed-off-by: Todd Baert <todd.baert@dynatrace.com> Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com> Signed-off-by: Artyom Tonoyan <artonoyan@servicetitan.com>
Requirements
Similar to the Java SDK [1], Dotnet SDK
EvaluationContext
should include targetingKey with bulk exporters.Currently
EvaluationContext
exposesAsDictionary()
[2] as well asGetEnumerator()
[3], but they do not include thetargetingKey
, which is stored in a dedicated field.AC
Include the targetingKey in bulk exporters and refactor of the property to match with this change
[1] - open-feature/java-sdk#801
[2] - https://github.com/open-feature/dotnet-sdk/blob/v1.4.1/src/OpenFeature/Model/EvaluationContext.cs#L76
[3] - https://github.com/open-feature/dotnet-sdk/blob/v1.4.1/src/OpenFeature/Model/EvaluationContext.cs#L90
The text was updated successfully, but these errors were encountered: