Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add keys() method to CacheService #2931

Merged
merged 13 commits into from
Sep 5, 2024

Conversation

victor-yanev
Copy link
Contributor

@victor-yanev victor-yanev commented Sep 3, 2024

Description:

  • Adds a new method to CacheService which retrieves all keys in the cache that match the given pattern.
  • Adds the keys() method to the ICacheClient interface
  • Implements the method inside RedisClient and LocalLRUCache (all implementations of the ICacheClient)

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@victor-yanev victor-yanev added the enhancement New feature or request label Sep 3, 2024
@victor-yanev victor-yanev added this to the 0.56.0 milestone Sep 3, 2024
@victor-yanev victor-yanev self-assigned this Sep 3, 2024
@victor-yanev victor-yanev changed the title feat: Add keys() method to ICacheClient feat: Add keys() method to CacheService Sep 3, 2024
Copy link

github-actions bot commented Sep 3, 2024

Tests

       3 files     270 suites   20s ⏱️
1 270 tests 1 269 ✔️ 1 💤 0
1 282 runs  1 281 ✔️ 1 💤 0

Results for commit 326a9b2.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Sep 3, 2024

Acceptance Tests

  20 files  261 suites   33m 14s ⏱️
601 tests 583 ✔️ 4 💤 14
775 runs  754 ✔️ 4 💤 17

Results for commit 326a9b2.

♻️ This comment has been updated with latest results.

Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments. Also looks like we're missing tests for these new updates.

Copy link
Collaborator

@konstantinabl konstantinabl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just make sure CI passes

Copy link
Collaborator

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

sonarqubecloud bot commented Sep 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
42.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@victor-yanev victor-yanev merged commit ec2a151 into main Sep 5, 2024
43 of 45 checks passed
@victor-yanev victor-yanev deleted the update-cache-client-with-method-for-keys branch September 5, 2024 16:56
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.21%. Comparing base (6ecdd7c) to head (326a9b2).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...kages/relay/src/lib/clients/cache/localLRUCache.ts 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2931      +/-   ##
==========================================
- Coverage   86.37%   84.21%   -2.16%     
==========================================
  Files          59       56       -3     
  Lines        3904     3769     -135     
  Branches      807      771      -36     
==========================================
- Hits         3372     3174     -198     
- Misses        281      356      +75     
+ Partials      251      239      -12     
Flag Coverage Δ
relay 84.25% <96.96%> (+0.04%) ⬆️
server 83.05% <ø> (ø)
ws-server 97.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/relay/src/lib/clients/cache/redisCache.ts 92.50% <100.00%> (+0.39%) ⬆️
packages/relay/src/lib/errors/RedisCacheError.ts 100.00% <100.00%> (ø)
...elay/src/lib/services/cacheService/cacheService.ts 94.64% <100.00%> (+0.09%) ⬆️
...kages/relay/src/lib/clients/cache/localLRUCache.ts 82.22% <91.66%> (+1.66%) ⬆️

... and 19 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants