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

[FEATURE] flagd bulk evaluation #234

Closed
3 of 4 tasks
toddbaert opened this issue Dec 16, 2022 · 1 comment · Fixed by #239
Closed
3 of 4 tasks

[FEATURE] flagd bulk evaluation #234

toddbaert opened this issue Dec 16, 2022 · 1 comment · Fixed by #239
Assignees
Labels
enhancement New feature or request Needs Triage This issue needs to be investigated by a maintainer

Comments

@toddbaert
Copy link
Member

toddbaert commented Dec 16, 2022

Requirements

In order to support synchronous evaluation (something particularly important for client use cases), we need a bulk evaluation endpoint in flagd. The endpoint would accept a context and evaluate all configured flags with that context. The returned result should be a map of flagKey: resolutionDetails.

Example curl:

curl -X POST "localhost:8013/schema.v1.Service/ResolveAll" -d '{"context":{"email": "foo@bar.com"}}' -H "Content-Type: application/json"

{
   "flag1":{
      "value":"#0000FF",
      "reason":"TARGETING_MATCH",
      "variant":"blue"
   },
   "flag2":{
      "value":false,
      "reason":"STATIC",
      "variant":"on"
   }
}

Things to consider:

  • possible enhancements in the future to allow an array of flag keys to evaluate, instead of all
  • should we include additional metadata such as flag type to aid in parsing?
@toddbaert toddbaert added enhancement New feature or request Needs Triage This issue needs to be investigated by a maintainer labels Dec 16, 2022
@toddbaert toddbaert moved this to Backlog in ☁ Cloud Native Dec 16, 2022
@beeme1mr beeme1mr moved this from Backlog to Todo in ☁ Cloud Native Dec 16, 2022
@beeme1mr beeme1mr changed the title [FEATURE] Bulk evaluation function [FEATURE] FlagD bulk evaluation Dec 16, 2022
@toddbaert toddbaert changed the title [FEATURE] FlagD bulk evaluation [FEATURE] Flagd bulk evaluation Dec 18, 2022
@toddbaert toddbaert changed the title [FEATURE] Flagd bulk evaluation [FEATURE] flagd bulk evaluation Dec 18, 2022
@james-milligan james-milligan moved this from Todo to In Progress in ☁ Cloud Native Dec 21, 2022
@james-milligan james-milligan moved this from In Progress to Needs review in ☁ Cloud Native Jan 5, 2023
@beeme1mr beeme1mr linked a pull request Jan 5, 2023 that will close this issue
@beeme1mr
Copy link
Member

Depends on open-feature/open-feature-operator#291

james-milligan added a commit that referenced this issue Jan 12, 2023
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->

## This PR
<!-- add the description of the PR here -->

- introduces the resolve all endpoint for bulk flag evaluation

### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->

#234

### Notes
<!-- any additional notes for this PR -->

### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->

### How to test
<!-- if applicable, add testing instructions under this section -->

Signed-off-by: James Milligan <james@omnant.co.uk>
@github-project-automation github-project-automation bot moved this from Needs review to Done in ☁ Cloud Native Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs Triage This issue needs to be investigated by a maintainer
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants