-
Notifications
You must be signed in to change notification settings - Fork 43
feat: added implementation of immutable evaluation context #210
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
Conversation
couple of questions to be confirmed.
|
I think it doesn't matter so much in tests, but I would probably prefer it there. What matters even more is that the (few) places where the SDK instantiates a context currently, it should be switched to the immutable context (where we currently create context in the SDK, they are not mutated)
Yes, I think it needs to because the SDK calls |
cb1e290
to
c428aed
Compare
Hey @thiyagu06, thanks for your contribution. When you have a moment, please address the comments above and mark them as resolved. It would be great to include this change in an upcoming release. Thanks! |
55b55e6
to
d0b801f
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #210 +/- ##
============================================
- Coverage 91.60% 91.52% -0.09%
- Complexity 187 208 +21
============================================
Files 20 23 +3
Lines 417 472 +55
Branches 22 27 +5
============================================
+ Hits 382 432 +50
- Misses 23 26 +3
- Partials 12 14 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Not relevant to this PR, But I see the spec doesn't include evaluation context should support List type. But I see the support of List type in SDK. Do we need to update the spec? https://github.com/open-feature/java-sdk/blob/main/src/main/java/dev/openfeature/sdk/Value.java#L42 https://docs.openfeature.dev/docs/specification/sections/evaluation-context#requirement-312 |
The spec references |
fb2fc0d
to
f29b51c
Compare
@thiyagu06 I see some of the conversations were marked "resolved" (ex:- #210 (comment)). But I am not seeing a new commit in the PR. Could you please check whether you forgot to push your changes |
Yes. I forgot 🤦♂️ . Pushed it now. thanks |
No worries. I found few more improvements and once they are done, PR should be good to go :) |
994ccf1
to
128c3af
Compare
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.
Changes looks good to me
@Kavindu-Dodan @thiyagu06 The only thing I'm wondering here is if it's a good idea to throw in setTargetingKey or not. We could make it simply no-op and log a warning instead. Either way, I think we should add a deprecated annotation and say it will be removed in the future. cc @justinabrahms @agentgonzo |
In my view, throwing the exception is correct for the current implementation. The log could be missed and caller could be mislead as there is no reaction. |
OK I've added an |
96fdae5
to
a2f41ea
Compare
Signed-off-by: thiyagu06 <[email protected]>
Signed-off-by: thiyagu06 <[email protected]>
Signed-off-by: thiyagu06 <[email protected]>
…blecontext Signed-off-by: thiyagu06 <[email protected]>
Signed-off-by: thiyagu06 <[email protected]>
Signed-off-by: thiyagu06 <[email protected]>
Signed-off-by: thiyagu06 <[email protected]>
Signed-off-by: thiyagu06 <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
a2f41ea
to
eb173da
Compare
Kudos, SonarCloud Quality Gate passed!
|
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 again for your contribution @thiyagu06 !
Signed-off-by: thiyagu06 [email protected]
This PR
added implementation of immutable evaluation context
Related Issues
Fixes #161
Notes
Follow-up Tasks
How to test