-
Notifications
You must be signed in to change notification settings - Fork 39
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
Client-Side OFREP Provider doesn't type-cast flag values #1059
Comments
Hi @Chlor87, this is by design. Do you know why Flipt needs to cast flag types? |
@beeme1mr I think even though we have specified this in 1.4.1 [1], we have, with Flipt and Flagsmith, at least two providers that cast flag values that do not match and can be "safely" casted. [2] For OFREP, as it is more generic, I think this could be hard to do without creating the "JS like" type coercion mess. |
Thanks for the swift reponses! |
The sdk does type validation so we potentially expose a means to define custom type casting rules. I think this should live in user land and not directly in the provider. |
Looping @thomaspoignant into this conversation. We might be able to solve this in the provider but I don't think we should change the SDK behavior. |
Yes I think this is something providers can be opinionated about - it's up to them to decide to cast/convert, or throw |
I'm trying to use Client-Side OFREP Provider with Flipt backend. I noticed that
evaluate
method doesn't perform any type conversions, just the type assertion. My question is if that's by design or can it be changed? If it can, I can try and post a PR. I also noticed that a native Flipt client performs the type conversions, hence the question.From what I gathered, the Server-Side OFREP Provider also doesn't perform type conversions.
The text was updated successfully, but these errors were encountered: