Extend EvalCache export with a querying option #630
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
Add a querying option to EvalCache export function in a #616 way:
ids— csv of flag ids (highest precedence)keys— csv of flag keys (second precedence)enabled— queries flags with a given enabled status (could be combined withtagsandall)tags— csv of flag tags to query (could be combined withenabledandall)all— whether to useALLorANYsemantics over providedtags(ANYby default, could be combined withenabledandtags)For example:
GET /api/v1/export/eval_cache/json?tags=foo,bar&all=trueto get only flags containing bothfooandbartagsGET /api/v1/export/eval_cache/json?tags=foo&enabled=trueto get only enabled flags containingfootagGET /api/v1/export/eval_cache/json?ids=1,2to get only flags of id1and2GET /api/v1/export/eval_cache/json?keys=one,twoto get only flags of keysoneandtwoGET /api/v1/export/eval_cache/json?keys=one&tags=foois equivalent toGET /api/v1/export/eval_cache/json?keys=one(tags=fooeffectively would be omitted)Motivation and Context
#628
How Has This Been Tested?
That is a new export functionality, so new tests/specs were added (
TestEvalCacheExport)Types of changes
Checklist: