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

Add CLIENT LIST command and fix CLIENT INFO #2368

Merged
merged 7 commits into from
Jan 25, 2023
Merged

Conversation

K4ST0R
Copy link
Contributor

@K4ST0R K4ST0R commented Jan 5, 2023

Description

Fix #1910

I have added the implementation of the following command to the project CLIENT LIST.

This PR also fix an issue with CLIENT INFO : new fields were added in new redis version, the regex was not extracting the good values.


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

@leibale
Copy link
Collaborator

leibale commented Jan 5, 2023

@K4ST0R Thanks for contributing (and not for the first time!) :)

Looks like it's not working with 5.0 and 6.0, you can test it locally using

npm run test -w ./packages/client -- --redis-version 5.0
npm run test -w ./packages/client -- --redis-version 6.0

@K4ST0R
Copy link
Contributor Author

K4ST0R commented Jan 5, 2023

@leibale Thanks to you :)

I fixed the issue with the old redis version.

Question : maybe it is better to not validate the fields, they can vary quite a lot between the version ?

@leibale
Copy link
Collaborator

leibale commented Jan 5, 2023

@K4ST0R We have to make sure that the "supported versions" (5 - current) work as expected.. (sometimes it's not that fun or easy, but it has to be done..)

@K4ST0R
Copy link
Contributor Author

K4ST0R commented Jan 5, 2023

Yes I totally understand! Everything is fine now, normally :)

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2023

Codecov Report

Base: 95.85% // Head: 93.48% // Decreases project coverage by -2.38% ⚠️

Coverage data is based on head (5fe73a7) compared to base (c5b6f77).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2368      +/-   ##
==========================================
- Coverage   95.85%   93.48%   -2.38%     
==========================================
  Files         449      452       +3     
  Lines        4224     4280      +56     
  Branches      471      482      +11     
==========================================
- Hits         4049     4001      -48     
- Misses        107      209     +102     
- Partials       68       70       +2     
Impacted Files Coverage Δ
packages/client/lib/commands/CLIENT_INFO.ts 70.00% <64.70%> (-30.00%) ⬇️
packages/client/lib/client/commands.ts 100.00% <100.00%> (ø)
packages/client/lib/commands/CLIENT_LIST.ts 100.00% <100.00%> (ø)
packages/client/lib/commands/FUNCTION_LOAD.ts 16.66% <0.00%> (-83.34%) ⬇️
packages/client/lib/commands/FUNCTION_FLUSH.ts 20.00% <0.00%> (-80.00%) ⬇️
packages/client/lib/commands/FUNCTION_RESTORE.ts 20.00% <0.00%> (-80.00%) ⬇️
packages/client/lib/commands/CLIENT_NO-EVICT.ts 33.33% <0.00%> (-66.67%) ⬇️
packages/client/lib/commands/FUNCTION_LIST.ts 37.50% <0.00%> (-62.50%) ⬇️
packages/client/lib/commands/FUNCTION_STATS.ts 25.00% <0.00%> (-62.50%) ⬇️
packages/client/lib/commands/LCS_IDX.ts 50.00% <0.00%> (-50.00%) ⬇️
... and 35 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@leibale
Copy link
Collaborator

leibale commented Jan 23, 2023

@K4ST0R sorry for the huge delay... Review my changes? 🙏

@K4ST0R
Copy link
Contributor Author

K4ST0R commented Jan 25, 2023

@leibale Don't worry! LGTM! :) Thanks to you.

@K4ST0R K4ST0R deleted the CLIENT_LIST branch January 26, 2023 13:49
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.

Add support for redis command: CLIENT LIST
3 participants