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 withtags
andall
)tags
— csv of flag tags to query (could be combined withenabled
andall
)all
— whether to useALL
orANY
semantics over providedtags
(ANY
by default, could be combined withenabled
andtags
)For example:
GET /api/v1/export/eval_cache/json?tags=foo,bar&all=true
to get only flags containing bothfoo
andbar
tagsGET /api/v1/export/eval_cache/json?tags=foo&enabled=true
to get only enabled flags containingfoo
tagGET /api/v1/export/eval_cache/json?ids=1,2
to get only flags of id1
and2
GET /api/v1/export/eval_cache/json?keys=one,two
to get only flags of keysone
andtwo
GET /api/v1/export/eval_cache/json?keys=one&tags=foo
is equivalent toGET /api/v1/export/eval_cache/json?keys=one
(tags=foo
effectively 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: