-
Notifications
You must be signed in to change notification settings - Fork 13
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(flagd): Add in-process evaluator #104
base: main
Are you sure you want to change the base?
feat(flagd): Add in-process evaluator #104
Conversation
2db5904
to
e826b3d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #104 +/- ##
==========================================
+ Coverage 93.91% 94.13% +0.21%
==========================================
Files 15 17 +2
Lines 789 903 +114
==========================================
+ Hits 741 850 +109
- Misses 48 53 +5 ☔ View full report in Codecov by Sentry. |
8a15f87
to
36269b5
Compare
...der-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py
Outdated
Show resolved
Hide resolved
36269b5
to
af0df41
Compare
ca544a4
to
c68da7b
Compare
no more e2e tests are skipped 🎉 |
cae988c
to
87c50a4
Compare
LEEEETSS GOOOOO! |
The only issue I found is that the enum for the |
I can, and gladly will split it up into 4 parts again:
The config adaptations (Ms and seconds) also make sense because this syncs the behavior of environment flags for all providers. Java is in MS and is, IMHO, the most advanced provider for flags; hence, we should adhere to its environment variables usage and values, or else we have way more things to change. We use the same environment variables to make it easy to configure multiple providers with the same environment variables. This provider did not reach version 1, making it a better target than Java. The same applies to the resolver's name. Everywhere else, it is named RPC; here, we do have GRPC. We should normalize this for consistency and easier maintenance in the long run. A good thing is that all the features implemented fulfill the test-harness gherkin files. We're compliant with the expectations of flagd for a provider - confidence we did not have before. I also suggest not looking for perfect code; this confidence allows us to iterate faster and ship improvements confidently. |
Thanks @aepfli! That should make it easier to review and make our release notes more accurate. |
Besides the fact this is what Java does, these are actually in the spec for flagd providers, and are important for interop with the Operator. But it sounds like we have a plan for moving forward! Feel free to link your other PRs to this one and close this one whenever @aepfli |
this one is the last in the chain, i will update it and mark it as soon as we are ready |
6b21f96
to
a37e5a3
Compare
4db7a48
to
cda7342
Compare
I merged all the previous work, and updated the implementation to match our latest findings regarding grpc. - there is room for improvements, eg. removing duplication between rpc and in-process for grpc connection etc. but i do think, this is something we can do in another step. should i open a new pull request, or will we continue from here? |
8945ff2
to
77b9eb8
Compare
77b9eb8
to
75a2659
Compare
7f8d3af
to
3a28e78
Compare
Co-authored-by: Cole Bailey <[email protected]> Signed-off-by: Simon Schrottner <[email protected]>
3a28e78
to
622208b
Compare
This can be used to enrich evaluations with such data. | ||
If the `in-process` mode is not used, and before the provider is ready, the `getSyncMetadata` returns an empty map. | ||
--> | ||
#### Offline mode |
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.
Will the file mode changes come later?
self.connected = True | ||
|
||
if not self.active: | ||
logger.info("Terminating gRPC sync thread") |
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.
Is info level the right fit here? It appears to be more a debug message.
# as soon as we support all the features, we can actually remove this limitation to not run on Python 3.8 | ||
# Python 3.8 does not fully support tagging, hence that it will run all cases |
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.
How many cases are not covered yet?
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.
Targeturi, unixsockets
Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Simon Schrottner <[email protected]>
With these changes, we're adding in-process evaluation to the python flagd sdk. The whole e2e test-harness suite is passing, except the cases for unix socket and targetURI which are not implemented