-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reduce Exceptions in the ConditionEvaluator #48
Merged
vazarkevych
merged 7 commits into
growthbook:release/0.9.3
from
nnusse:improve_condition_evaluator
May 22, 2024
Merged
Reduce Exceptions in the ConditionEvaluator #48
vazarkevych
merged 7 commits into
growthbook:release/0.9.3
from
nnusse:improve_condition_evaluator
May 22, 2024
Conversation
This file contains 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
…reak statements for most of the switch-cases.
…ition_evaluator # Conflicts: # lib/src/main/java/growthbook/sdk/java/ConditionEvaluator.java
Hello @nnusse! |
Bohdan-Kim
reviewed
May 16, 2024
It looks good |
vazarkevych
added a commit
that referenced
this pull request
May 27, 2024
* Changelog v0.5.1 v0.5.2 (#53) Co-authored-by: Bohdan Akimenko <bohdan.akimenko@kevychsolutions.com> * Reduce Exceptions in the ConditionEvaluator (#48) * reduce amount of exceptions based on serialized null values and add break statements for most of the switch-cases. * add new test cases and ensure that unexpected exceptions let the tests fail. * trial commit * undo trial commit * Add attributeDataType checking for NULL. * adjust test definition and evaluation implementation. --------- Co-authored-by: Bohdan Akimenko <bohdan.akimenko@kevychsolutions.com> * Issue #52 (#55) * retryOnFailure argument was added * if a flag is changed before the application reconnects, that change is not reflected. --------- Co-authored-by: Bohdan Akimenko <bohdan.akimenko@kevychsolutions.com> * Changelog v0.5.3 (#56) Co-authored-by: Bohdan Akimenko <bohdan.akimenko@kevychsolutions.com> * Changelogs v0.5.4 v0.6.0 were implemented (#59) Co-authored-by: Bohdan Akimenko <bohdan.akimenko@kevychsolutions.com> * Cyrillic symbols were removed * Add check & unit tests in case the feature value is a collection impl (#46) * Add check & unit tests in case the feature value is a collection implementation (set, list) * Fixing errors after merge * Fixing failing test raised by merge --------- Co-authored-by: vu-linh <138560515+vu-linh@users.noreply.github.com> Co-authored-by: Bohdan Akimenko <bohdan.akimenko@kevychsolutions.com> * The SDK version was increased --------- Co-authored-by: Bohdan Akimenko <bohdan.akimenko@kevychsolutions.com> Co-authored-by: Norm <88192291+nnusse@users.noreply.github.com> Co-authored-by: vulinh64 <35946488+vulinh64@users.noreply.github.com> Co-authored-by: vu-linh <138560515+vu-linh@users.noreply.github.com>
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.
Hello,
this PR should reduce the amount of exceptions that the
ConditionEvaluator
would throw, if it receives incoming null values for the evaluation.There are some sections in the code that are not able to handle that properly. I received already the following exceptions (in the form of stack traces on the stderr) in one of my applications:
The SDK is catching all exceptions and additionally prints the stacktrace to the standard error output channel. Unfortunately this can also harm consumers of this library, because some applications might require a specific format of messages that get printed to the error or normal output channels. From my point of view i think it is really worth it to work on the issue (#23), but i think as well, that it is always good to handle errors properly.
I also adjusted the test to let them fail, if exceptions will occur that are not expected to appear under a specific test condition. I'm not really happy with the changes that i had to introduce in the tests, but i couldn't come up with a better solution, unfortunately the SDK is catching every error which makes it hard to check if a specific error occurred.
I hope that you see value in this PR.
All the best,
Norman