-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: test multiple fractional flags with shared seed #115
feat: test multiple fractional flags with shared seed #115
Conversation
Signed-off-by: Cole Bailey <[email protected]>
Signed-off-by: Cole Bailey <[email protected]>
@beeme1mr Ran into a small snag since the When testing this change with the the python provider PR, I get an error for the
Looks like it used to error and go to default case since the input was not string, but now that we use Alternatively, we can continue basing this PR off of something that is not main, but then we are missing some new test cases esp edge cases so I think that's a non-starter. EDIT: After hacking together a local test it looks like integer inputs to jsonlogic |
It looks like someone opened an issue about this yesterday. |
@colebaileygit could you specify the error that you are seeing ? I checked this from jsonlogic end and diegoholiveira/jsonlogic#77 is applicable only if we use |
@Kavindu-Dodan Wish I could share a proper test case, but to reproduce I updated the This line:
Returns this error:
|
@colebaileygit the failure is generated from From JSON logic explanation, there's no restriction on argument however, both I think we should reconsider our fractional tests if we want to change [1] - https://github.com/diegoholiveira/jsonlogic/blob/v3.4.0/jsonlogic.go#L172 |
@Kavindu-Dodan You're right! I overlooked that if statement. Good news is in the test-harness suite we don't use |
…f default Signed-off-by: Cole Bailey <[email protected]>
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.
@colebaileygit perfect, I will approve. But I will wait for @toddbaert's review to merge this as he worked a lot with these test suites :)
Can you please provide me the json that provoke this error? I'll be glad to fix it on |
@diegoholiveira first of all thank you for maintaining the Go jsonlogic library 🙌 The root cause was not due to any bug in the library. It was caused by improper usage of the Rule {"in": ["@faas.com", {"var": ["email"]} ]} Context {"email" : 3} This is supposed to be failing anyway :) Anyway, I attempted to support |
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
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.
Thanks all!
Approved. I pushed 2 small changes to fix the spacing, and change the variants in the nested example to be actual cards (ace-of-spades
instead of spades-B
; I know that's very silly but I really like the theme and I couldn't help myself 😅 ).
This PR
Related Issues
open-feature/flagd#1264
Notes
Follow-up Tasks
How to test
see open-feature/flagd#1266