Open ilyatovbin-pp opened 1 year ago
Hey @ilyatovbin-pp, are you using SSE? SSE only supports one of the keys, it isn't able to support both. The GET API is able to support both. If you wish to use SSE for your client, you will need a bit of hand-coding. Have a look to see what the FeatureHubConfig is actually doing when it puts everything together. You will find it creates a repository and a StreamingEdgeClient, and a FeatureHubRepository. So if instead you do this (sort of)
repo = FeatureHubRepository() config = FeatureHubConfig(edge_url, [key1]) config.repository(repo) StreamingEdgeClient(edge_url, [key1], repo) asyncio.run(config.init())
That will essentially get you around this for the time being. The reason it will work, even if you are using strategies is because the evaluation is done in the client side.
I didn't quite understand how that helps me but I'll play around with it later and see if I can figure it out.
Use-case: I have Per-App Features, and then I have another app called
Global
which has Features on a global scale enabling or disabling larger chunks of code for multiple apps and environments. also I have string Features that are used by multiple apps.I saw that the API key is a list, so I've tried putting in two keys, expecting the repository to load Features from both apps I need, but from what I see it uses only the first one.
If this is as expected, there's no point in using a list when creating a FeatureHubConfig object.
The above example shows only the Features available only for
key1
Expected result: