[discourse] Error getting boolean flag #4334
-
Originally posted by leonardo on Discourse Hey Flipt folks! I’m integrating Flipt in our FastAPI backend using gRPC. Everything works fine but I have a problem getting a boolean flag. I’m building a service class with a method similar to this:
If the
This is my configuration:
The flag that I’m using and getting the error is Flipt is a great platform! Thank you so much for building it! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
The error happens because the flag you’re evaluating ( The reason you can’t change the To resolve this, make sure the flag is enabled in your configuration or check if your Flipt instance is running in read-only mode, which would prevent changes in the UI. Once the flag is enabled, the evaluation via gRPC should work as expected. Reference: Flipt UI flag form logic To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Reply from george on Discourse: Hey @leonardo ! Sorry you’re running into issues. This looks like it is using our older Evaluation API, which only support variant type flags. There is a new evaluation specific protobuf set of definitions to generate from, if you want to go this way:
flipt-io/flipt/blob/de7ee01bd2d166f8d5e6632cb761ebb182552617/rpc/flipt/evaluation/evaluation.proto#L88-L101
In this situation, you need to use the Are you using one of our pre-built clients? or something hand generated? |
Beta Was this translation helpful? Give feedback.
-
Reply from leonardo on Discourse: Hey @george! I see the issue now
But in the Python definitions, I don’t see any Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
-
Reply from george on Discourse: Ahh amazing, let me find out if we can get these other APIs published to buf too. We have a range of clients in different languages. The main repos are: The client-side evaluators run evaluations in your application, so no network hop in your code FYI. These are the most performant ones for your application. The server-side SDKs mostly support HTTP only (apart from Go). |
Beta Was this translation helpful? Give feedback.
-
Reply from george on Discourse: So we are publishing the evaluation API to buf, but I am unsure how to get the magic python install for just this sub package:
Buf Schema RegistryExplore protobuf schemas within the BSR |
Beta Was this translation helpful? Give feedback.
-
Reply from leonardo on Discourse: Hey George! Sorry for my late response. I changed our implementation to use the Python Client-Side lib, and it works really fine! Great use of FFI! Thank you so much for your help! |
Beta Was this translation helpful? Give feedback.
-
Reply from george on Discourse: That is great to hear @leonardo ! Let us know how well you get on with it. If you’re interested too, we just launched our cloud product (https://flipt.cloud), which works with or without (you decide) the open-source version. If that happens to pique your interest, we would love your feedback! |
Beta Was this translation helpful? Give feedback.
Reply from leonardo on Discourse:
Hey George! Sorry for my late response. I changed our implementation to use the Python Client-Side lib, and it works really fine! Great use of FFI!
Thank you so much for your help!