Ability to disable log with level ERROR if key not exists#34
Open
roman-struchev wants to merge 1 commit intofeaturehub-io:mainfrom
Open
Ability to disable log with level ERROR if key not exists#34roman-struchev wants to merge 1 commit intofeaturehub-io:mainfrom
roman-struchev wants to merge 1 commit intofeaturehub-io:mainfrom
Conversation
Contributor
|
Hey, probably simpler - it should really allow the feature to exist all the time even if it never comes from the server. I have another change to make so I will simplify this logic and write a test or two to ensure its working properly. Thanks for bringing this to our attention! |
Author
|
Hello @rvowles, do you have an update? |
Contributor
|
We are still a way off releasing the new SDK, so I will organise to and merge this into a long lived branch for this version. Sorry for the delay, we have been focusing on the new release with Application Strategies. |
Contributor
|
I changed this to a warn but its not what you want so I will keep this and revisit it. I have some more updates to the SDK to make in the next week. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
We use feature hub to manage feature toggles
Also, we have 2 additional point
Issue
featurehub-java-sdk/client-java-core/src/main/java/io/featurehub/client/ClientFeatureRepository.java
Lines 247 to 259 in f6fd04b
When we try to get feature value in java (io.featurehub.client.ClientFeatureRepository#getFeatureState) first time, then we have such log for our applications
FeatureHub error: application requesting use of invalid key after initialization: XXX.This happens only for the first request for the feature toggle (not existing in feature hub), after instance of application was restarted (because of java.util.Map#computeIfAbsent used)
So in monitoring of our applications we have error cases by logs
Fix
I try to provide an ability to skip this log by configuration, because looks like that is usual case when feature toggle not exists in feature hub