Skip to content

Extend EvalCache export with a querying option#646

Open
iamafanasyev wants to merge 1 commit intoopenflagr:mainfrom
iamafanasyev:ama/eval-cache-querying
Open

Extend EvalCache export with a querying option#646
iamafanasyev wants to merge 1 commit intoopenflagr:mainfrom
iamafanasyev:ama/eval-cache-querying

Conversation

@iamafanasyev
Copy link
Contributor

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 with tags and all)
  • tags — csv of flag tags to query (could be combined with enabled and all)
  • all — whether to use ALL or ANY semantics over provided tags (ANY by default, could be combined with enabled and tags)

For example:

  • GET /api/v1/export/eval_cache/json?tags=foo,bar&all=true to get only flags containing both foo and bar tags
  • GET /api/v1/export/eval_cache/json?tags=foo&enabled=true to get only enabled flags containing foo tag
  • GET /api/v1/export/eval_cache/json?ids=1,2 to get only flags of id 1 and 2
  • GET /api/v1/export/eval_cache/json?keys=one,two to get only flags of keys one and two
  • GET /api/v1/export/eval_cache/json?keys=one&tags=foo is equivalent to GET /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

  • 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.

@iamafanasyev iamafanasyev force-pushed the ama/eval-cache-querying branch from c7e7c24 to 0ee31f6 Compare January 15, 2026 06:40
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 85.71429% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.16%. Comparing base (770461b) to head (0ee31f6).
⚠️ Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
pkg/entity/fixture.go 0.00% 10 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #646      +/-   ##
==========================================
- Coverage   81.19%   77.16%   -4.04%     
==========================================
  Files          28       30       +2     
  Lines        2271     2067     -204     
==========================================
- Hits         1844     1595     -249     
- Misses        337      382      +45     
  Partials       90       90              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants