Comments (5)
The addition of the TargetingKey
property has presented some problems for the LaunchDarkly provider. We had supported using attributes with the name "key" (convenient coming from an LD context) as well as "targetingKey". The TargetingKey
not being in the map just meant we basically were unaware of it.
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 Set
method to have restrictions on "targetingKey". We do something similar in LD contexts where if you call the set function with a built-in attribute we do our best, and then log if we cannot handle it.
Similar situation: https://github.com/launchdarkly/dotnet-sdk-common/blob/d248d74b29fb0d1e27771c5810b8277fd256e266/src/LaunchDarkly.CommonSdk/ContextBuilder.cs#L272
from dotnet-sdk.
@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 targetingKey
?
I think that's fine, if so. I think the real problem is just that people will expect the AsDictionary()
and GetEnumerator()
to convey a targeting key, somehow if it's set.
We're close to being about to release a 2.0, so I'm reviewing some of these open issues.
from dotnet-sdk.
@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");
TargetingKey = "potato";
var targetingKey = Get("targetingKey");
var targetingKey = TargetingKey
Should all basically be setting/getting the same field, and that field should also be in the dictionary.
from dotnet-sdk.
I'm fine with that. I'll add it to the description, and try to get to it myself if nobody else does first.
from dotnet-sdk.
I'm starting on this.
from dotnet-sdk.
Related Issues (20)
- [FEATURE] add in-memory provider to SDK HOT 12
- Introduce `OpenFeature.Extensions.Hosting` package
- [BUG] System.Collections.Immutable version constraint causing grief
- [FEATURE] Promote OTel hooks from contrib to in-the-box HOT 10
- [BUG] `Api.Shutdown()` hangs on reuse HOT 1
- [FEATURE] Implement flag metadata HOT 1
- [DOC] Update specification badge to v0.7.0
- [FEATURE] Change xUnit version range
- Review requirement IDs used in tests HOT 3
- Enable Nullable Reference Types
- [DOC] .Net link to list of hooks instead links to the reference page.
- [BUG] Add `targeting key` to evaluation context
- Change EventMetadata type
- [FEATURE] Implement transaction context
- [BUG] Obsolete synchronous `SetProvider` methods does not await async call HOT 3
- [FEATURE] Implement domain scoping HOT 2
- [FEATURE] Make provider interface "stateless", SDK maintains provider state HOT 1
- [BUG] Missing error message when unknown exception is thrown
- Metadata is getting lost
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-sdk.