dice icon indicating copy to clipboard operation
dice copied to clipboard

Migrate SADD, SREM, SCARD, SMEMBERS command to store_eval

Open sahoss opened this issue 1 year ago • 14 comments

Description Migrates the eval functions for SADD, SREM, SMEMBERS, SCOUNT to the new eval function type (https://github.com/DiceDB/dice/issues/1020)

Checklist

  • [x] Migrated the evalXXX function with the latest definition
  • [x] Update or add unit tests for the new implementation.
  • [x] All unit tests pass successfully.
  • [x] Ensure all integration tests pass successfully.
  • [x] Ensure integration tests are added for the migrated command on multi-threaded resp server.
  • [x] Move Integration tests for the respective commands under the RESP integration tests directory from Async directory
  • [ ] Please validate that the documentation for the respective commands is up to date. If not then consider adding them.

sahoss avatar Oct 11 '24 15:10 sahoss

HI @sahoss changes look good. 🚀 left a minor comment.

Please pull the latest from the master to resolve the linter issue. Thanks

AshwinKul28 avatar Oct 11 '24 20:10 AshwinKul28

HI @sahoss Thanks for the changes, LGTM! Please add migration for 'SMEMBERS', 'SCARD' also in the same PR.

AshwinKul28 avatar Oct 13 '24 10:10 AshwinKul28

@AshwinKul28 added the remaining commands. however, i still see lint errors locally and i have merged latest master into my branch. its not from my changes. ok to ignore? image

sahoss avatar Oct 13 '24 13:10 sahoss

Hi @sahoss thanks a lot for the changes. Can you please add unit tests for each eval? It's not present already but you can add new unit tests for each command in the eval_test.go Also please rebase it with master.

AshwinKul28 avatar Oct 14 '24 12:10 AshwinKul28

@sahoss lets ensure that the corresponding integration tests are migrated as well. cc @AshwinKul28

soumya-codes avatar Oct 15 '24 13:10 soumya-codes

@AshwinKul28 / @soumya-codes - sure. it will take me until this weekend potentially to make those changes. just a heads up

sahoss avatar Oct 15 '24 15:10 sahoss

Just FYI, we need to add the tests for the migrated commands under integration_tests/commands/resp

I have added a new item to checklist in the PR description. Please tick the same once the integration tests are added. Please let me or Ashwin know if you have any doubts/concern.

soumya-codes avatar Oct 15 '24 16:10 soumya-codes

It looks like there are a few conflicts @sahoss, could you please rebase on the latest master?

JyotinderSingh avatar Oct 20 '24 06:10 JyotinderSingh

@soumya-codes / @AshwinKul28 ptal!

sahoss avatar Oct 20 '24 15:10 sahoss

@sahoss Thanks a lot for the commendable efforts. I have left very minor suggestions, please have a look.

I know it's much more to ask, but please go through the docs repository and check the docs for the commands you are migrating. Apologies for the back-and-forth, but we want to make these commands production-ready at once.

Here's sample documentation to follow

SADD, SCARD commands documentation is almost ready but SREM and SMEMEMBERS need some refresh.

AshwinKul28 avatar Oct 21 '24 19:10 AshwinKul28

@sahoss Thanks a lot for the commendable efforts. I have left very minor suggestions, please have a look.

I know it's much more to ask, but please go through the docs repository and check the docs for the commands you are migrating. Apologies for the back-and-forth, but we want to make these commands production-ready at once.

Here's sample documentation to follow

SADD, SCARD commands documentation is almost ready but SREM and SMEMEMBERS need some refresh.

Thank you for your feedback/reviews @AshwinKul28 Really appreciate it.

just to make sure i understood your comment on refreshing the documentation for srem/smembers - i see that current documentation https://github.com/DiceDB/docs/blob/master/src/content/docs/commands/SMEMBERS.md, https://github.com/DiceDB/docs/blob/master/src/content/docs/commands/SREM.md covers the operations quite well(imo). its at the same level of coverage as SADD/SCARD. is the ask to make the formatting similar to the sample documentation you have shared?

sahoss avatar Oct 22 '24 15:10 sahoss

@sahoss Thanks a lot for the commendable efforts. I have left very minor suggestions, please have a look. I know it's much more to ask, but please go through the docs repository and check the docs for the commands you are migrating. Apologies for the back-and-forth, but we want to make these commands production-ready at once. Here's sample documentation to follow SADD, SCARD commands documentation is almost ready but SREM and SMEMEMBERS need some refresh.

Thank you for your feedback/reviews @AshwinKul28 Really appreciate it.

just to make sure i understood your comment on refreshing the documentation for srem/smembers - i see that current documentation https://github.com/DiceDB/docs/blob/master/src/content/docs/commands/SMEMBERS.md, https://github.com/DiceDB/docs/blob/master/src/content/docs/commands/SREM.md covers the operations quite well(imo). its at the same level of coverage as SADD/SCARD. is the ask to make the formatting similar to the sample documentation you have shared?

yes

JyotinderSingh avatar Oct 23 '24 16:10 JyotinderSingh

HI @sahoss Hope you're doing well, Do you still have any blockers on this? Let me know and we can resolve them quickly and try to merge the PR. thanks a lot for all the efforts.

AshwinKul28 avatar Oct 26 '24 11:10 AshwinKul28

@AshwinKul28 i had a question for you here https://github.com/DiceDB/dice/pull/1068#discussion_r1809361475.

i am working in parallel to refresh the documentation.

sahoss avatar Oct 26 '24 12:10 sahoss

doc refresh pr @ https://github.com/DiceDB/docs/pull/116

sahoss avatar Oct 28 '24 16:10 sahoss

Thanks @sahoss for the documentation refresh. I have left a single comment on the docs PR! Otherwise, is everything related to the migration sorted, or are HTTP tests failing?

AshwinKul28 avatar Oct 29 '24 21:10 AshwinKul28

@AshwinKul28 everything should be passing now. i have addressed the documentation PR comment

sahoss avatar Oct 30 '24 04:10 sahoss

@sahoss Please address above requested changes by Apoorv, then we are good to merge. thanks

AshwinKul28 avatar Nov 02 '24 16:11 AshwinKul28

@apoorvyadav1111 still 1 conflict in the store eval file :(

AshwinKul28 avatar Nov 05 '24 22:11 AshwinKul28

@apoorvyadav1111 still 1 conflict in the store eval file :(

i have fixed the conflict.

thanks @apoorvyadav1111 @AshwinKul28 for your detailed reviews. appreciate your time and effort on this pr.

sahoss avatar Nov 06 '24 02:11 sahoss

Hi @sahoss , apologies for commiting and reverting the deque test change. We recently migrated to this package and would not want to revert the efforts and reopen another issue to migrate again. I fixed the issue, it was a call to old assert package, which could have been reverted as part of recent merge.

@AshwinKul28 Thanks for your review. I am merging this as the changes after your review are minimal and we don't want another conflict. Thank you both for making this change into main.

apoorvyadav1111 avatar Nov 06 '24 05:11 apoorvyadav1111