-
Notifications
You must be signed in to change notification settings - Fork 26
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
GrowthBook Types system #160
Conversation
I like this solution way better than the recent JsonElement change. |
# Conflicts: # GrowthBook/src/jvmTest/kotlin/com/sdk/growthbook/tests/GBExperimentRunTests.kt
|
||
/** | ||
* Feature Evaluator Class | ||
* Takes Context and Feature Key | ||
* Returns Calculated Feature Result against that key | ||
*/ | ||
internal class GBFeatureEvaluator { | ||
internal class GBFeatureEvaluator( | ||
private val context: GBContext, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us not tie in FeatureEvaluator to context. We're moving away from this approach.
We'd want the Growthbook instance be decoupled from the context, use an evaluation context for feature eval operations. See the recent changes made to support multi-context in java sdk for more details.
…uation context for feature eval operations.
I'm not able to review this, but @madhuchavva or @bryce-fitzsimons are probably the best people to do so. |
GrowthBook Console proposes Boolean, String, Number and JSON types for features:
![image](https://private-user-images.githubusercontent.com/135710078/398994021-15479a7a-d373-4d95-a468-74cd3518ef14.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTI5NTEsIm5iZiI6MTczOTM5MjY1MSwicGF0aCI6Ii8xMzU3MTAwNzgvMzk4OTk0MDIxLTE1NDc5YTdhLWQzNzMtNGQ5NS1hNDY4LTc0Y2QzNTE4ZWYxNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQyMDM3MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNWYzODJjYzZjMWM3MDQ4NDg1NDhmOWI0MmUyYThlZThjMDc4YTI2NDNhOGIxNzAwNjA3ZGFjMDczZWQ1NzYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QyNpng9frq3N2QfbDPZG_yrwXKsAS3ogD9D9hkv8Aic)
In this PR getting specified feature type instead of
![image](https://private-user-images.githubusercontent.com/135710078/399484855-2eea82bd-e97f-4208-9301-8790a1fb0a84.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTI5NTEsIm5iZiI6MTczOTM5MjY1MSwicGF0aCI6Ii8xMzU3MTAwNzgvMzk5NDg0ODU1LTJlZWE4MmJkLWU5N2YtNDIwOC05MzAxLTg3OTBhMWZiMGE4NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQyMDM3MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wMGE3ZDRhYTcwMzhjNmE0NmUyMTczZTE0NGY2OWM1MmIwNjQ5MTY0Mjk0NTlhYTc2MGYzYWEyNzExZjRhMTVmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.NTz7oryrxhd-KP5SeAefJlqaaErkkwBq45pmlvX0fEc)
JsonElement
was implemented: