Skip to content
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

[FLI-1123] Support bulk flag evaluation in OFREP #3332

Closed
1 task done
markphelps opened this issue Jul 31, 2024 · 1 comment · Fixed by #3364
Closed
1 task done

[FLI-1123] Support bulk flag evaluation in OFREP #3332

markphelps opened this issue Jul 31, 2024 · 1 comment · Fixed by #3364
Labels
enhancement Created by Linear-GitHub Sync

Comments

@markphelps
Copy link
Collaborator

markphelps commented Jul 31, 2024

Problem

Re: #2980

We have single flag evaluation in #3267 (thanks @thepabloaguilar !)

We should support bulk flag evaluation https://github.com/open-feature/protocol/blob/218fd82f1d37844f26ec22418655a44395fbd3f4/service/openapi.yaml#L84

Then we will be compatible with the current ofrep specification

Ideal Solution

support bulk flag evaluation https://github.com/open-feature/protocol/blob/218fd82f1d37844f26ec22418655a44395fbd3f4/service/openapi.yaml#L84 in Flipt OFREP server

Search

  • I searched for other open and closed issues before opening this

Additional Context

No response

FLI-1123

@markphelps markphelps added the enhancement Created by Linear-GitHub Sync label Jul 31, 2024
@markphelps markphelps changed the title Support bulk flag evaluation in OFREP [FLI-1123] Support bulk flag evaluation in OFREP Jul 31, 2024
@markphelps
Copy link
Collaborator Author

One thing to think about re implementing this:

Flipt requires flagKey for each bulk evaluation request, whereas OFREP spec does not specify it. However, they do state that we can 'filter' which flags to evaluate in the request context: https://github.com/open-feature/protocol/blob/218fd82f1d37844f26ec22418655a44395fbd3f4/service/adrs/0004-no-flag-filter-in-bulk-evaluation-request.md
CleanShot 2024-08-04 at 13 22 27
I could see us adding a flagKeys field in the context which would be a list of the flags we want to evaluate, then in the bridge we could copy the context for each request when mapping to the flipt.EvaluationRequest

So it would be a 1 to N mapping, one batch eval request on the OFREP side would map to N requests in the bridge, where N is the length of flagKeys array.

We could return an error INVALID_CONTEXT if no flagKeys field is present.

Similarly for the namespaceKey (provided in X-Flipt-Namespace header, we would copy it to each evaluation request on the Flipt bridge side.

erka added a commit that referenced this issue Aug 14, 2024
* feat(ofrep): implement bulk evaluation for OFREP
resolves #3332
---------

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Co-authored-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this to Done in Roadmap Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Created by Linear-GitHub Sync
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant