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

Add flagr key #159

Merged
merged 5 commits into from
Sep 11, 2018
Merged

Add flagr key #159

merged 5 commits into from
Sep 11, 2018

Conversation

zhouzhuojie
Copy link
Collaborator

@zhouzhuojie zhouzhuojie commented Sep 11, 2018

Description

Support flagKey in the following endpoints

  • GET /flags?key=<key>
  • POST /flags (create flagKey, if empty, use a random one)
  • PUT flags/<id> (update/save flagKey)
  • POST /evaluation
  • POST /evaluation/batch

Motivation and Context

  • To support dedicated unique (semi-user-generated) key for the flags
  • To support flag evaluation with obfuscated keys (e.g. exposing flagr to public)

How Has This Been Tested?

  • UI changes to support flagKey
  • Flagr evaluation api
  • Flagr batch evaluation api
  • Flagr migration
  • No breaking changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Screenshots

image
image

@@ -1,5 +1,5 @@
mysql:
image: mysql:5.7
image: mysql:5.6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious what's the reason to downgrade mysql?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match the mysql version of RDS, I was testing the migration locally with docker

@codecov-io
Copy link

codecov-io commented Sep 11, 2018

Codecov Report

Merging #159 into master will decrease coverage by 0.47%.
The diff coverage is 86.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #159      +/-   ##
==========================================
- Coverage   93.37%   92.89%   -0.48%     
==========================================
  Files          25       25              
  Lines        1252     1309      +57     
==========================================
+ Hits         1169     1216      +47     
- Misses         56       63       +7     
- Partials       27       30       +3
Impacted Files Coverage Δ
pkg/entity/fixture.go 100% <100%> (ø) ⬆️
pkg/handler/fixture.go 100% <100%> (ø) ⬆️
pkg/util/util.go 100% <100%> (ø) ⬆️
pkg/entity/flag.go 100% <100%> (ø) ⬆️
pkg/handler/eval_cache.go 88% <100%> (-1.29%) ⬇️
pkg/mapper/entity_restapi/e2r/e2r.go 100% <100%> (ø) ⬆️
pkg/entity/flag_snapshot.go 36.11% <25%> (-21.39%) ⬇️
pkg/handler/crud.go 93.87% <83.33%> (-0.43%) ⬇️
pkg/handler/eval.go 92.36% <91.3%> (+0.95%) ⬆️
pkg/mapper/entity_restapi/r2e/r2e.go 92% <0%> (-8%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eebf355...19ba256. Read the comment docs.

@zhouzhuojie zhouzhuojie merged commit bb05d14 into master Sep 11, 2018
@zhouzhuojie zhouzhuojie deleted the zz/add-flagr-key branch September 11, 2018 20:39
@zhouzhuojie zhouzhuojie mentioned this pull request Sep 12, 2018
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants