Extend evaluation API with GET requests#631
Open
iamafanasyev wants to merge 6 commits intoopenflagr:mainfrom
Open
Extend evaluation API with GET requests#631iamafanasyev wants to merge 6 commits intoopenflagr:mainfrom
iamafanasyev wants to merge 6 commits intoopenflagr:mainfrom
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #631 +/- ##
==========================================
- Coverage 81.19% 77.15% -4.04%
==========================================
Files 28 30 +2
Lines 2271 2062 -209
==========================================
- Hits 1844 1591 -253
- Misses 337 377 +40
- Partials 90 94 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
@marceloboeira @nothing0012 Hi! Could you please check the PR? We already have this code running in production for a long time, and everything looks good. |
|
Stale pull request message |
Contributor
|
Bump |
ec6d8ae to
5d656e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Copy of the closed one #616
Introduce both
GET /evaluationandGET /evaluation/batch(functionally equivalent toPOST /evaluationandPOST /evaluation/batch).Due to the URL length limits request query parameters were "length optimised" (instead of keeping them the same as in POST body:
enableDebug->dbg,flagIDs->ids,flagTagsOperator~>all, etc.). In fact, this is the main subject of the review.Evaluation entities are encoded via JSON string representation (property names are also "length optimised"):
?entity={"id":"id1","type":"t1","ctx":{"hello":"world"}};?entity=%7B%22id%22%3A%22id1%22%2C%22ctx%22%3A%7B%22hello%22%3A%22world%22%7D%7D;?entity={"id":"id1","ctx":{"foo":"bar"}}&entity={"id":"id2","ctx":{"baz":"qux"}}.This evaluation entity serialisation is used in both
/evaluationand/evaluation/batchroutes as:/evaluation?entity={"id":"id1","ctx":{"foo":"bar"}}&id=1&key=flag-1);All array query parameters (up to
entity) usecollectionFormat: csvalso for "length optimisation" purpose.entityusescollectionFormat: multi, ascollectionFormat: csvdoes not work properly for the selected encodingMotivation and Context
#613
How Has This Been Tested?
make testmake all:Debug consolesection from Flagr UI ("regress" preexisting evaluation routes);Types of changes
Checklist: