Skip to content

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.

@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.18519% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.75%. Comparing base (770461b) to head (861b42e).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
pkg/entity/fixture.go 0.00% 12 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #630      +/-   ##
==========================================
- Coverage   81.19%   76.75%   -4.45%     
==========================================
  Files          28       30       +2     
  Lines        2271     2495     +224     
==========================================
+ Hits         1844     1915      +71     
- Misses        337      490     +153     
  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