-
Notifications
You must be signed in to change notification settings - Fork 37
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
OpenFeature support for array-like flags. #138
Comments
Hey @kinyoklion thanks for noticing this. I think this might be a good place for a brief discussion on returning arrays in the object evaluation... I wonder if it's worth considering returning our |
I think that the |
I will play around with this option in the Java SDK. I don't think a spec change is required, since spec is intentionally vague here. I think for many SDKs in languages without static typing and with out-of-the-box JSON parsing, this should "just work". |
I've tested this idea in the java-sdk and the java-flagd provider, and I have to say I think it's a good solution. It works out to be net negative lines of code in the provider and it gives us the flexibility to return arrays as the object return value (not that every provider would have to support doing so). This wouldn't be a spec change, it's just something that some SDKs would need to do (mostly dotnet and Java). @rgrassian-split TLDR the discussion here is about changing the Java SDK object flag resolver to return a cc @kinyoklion @beeme1mr @justinabrahms @james-milligan @agentgonzo |
@toddbaert @kinyoklion using a Value instead of Structure makes sense to me and should be a small change for our Provider. |
I see no issue with this additional flexibility, though I think I'd prefer to call it |
@kinyoklion - closing this since I believe it's fully supported now via: open-feature/dotnet-sdk#57 and open-feature/java-sdk#65. Please re-open if I'm wrong! |
In the glossary of terms the example for
values
utilizes arrays to demonstrate the concept: https://github.com/open-feature/spec/blob/main/specification/glossary.md#valuesThe evaluation specification doesn't explicitly cover array-like flags: https://github.com/open-feature/spec/blob/main/specification/sections/01-flag-evaluation.md#requirement-131
Though the specification of a
structure
is vague and potentially could include array-like flags. I think it may be good to clarify their support, or lack of support.The text was updated successfully, but these errors were encountered: