-
Notifications
You must be signed in to change notification settings - Fork 486
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
Adding server.call/pcall option to LUA scripting. (#136) #213
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
madolson
reviewed
Apr 4, 2024
This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com>
madolson
reviewed
Apr 4, 2024
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
zuiderkwast
reviewed
Apr 4, 2024
madolson
reviewed
Apr 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server.register_function are also not working as expected. I'm working on a better way to test all the compatibility atm.
hpatro
reviewed
Apr 4, 2024
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
madolson
reviewed
Apr 4, 2024
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
madolson
approved these changes
Apr 6, 2024
madolson
added a commit
to madolson/valkey
that referenced
this pull request
Apr 7, 2024
…lkey-io#213) This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. I verified that the unit tests pass. Also manually verified that the redis-server responds to server.call invocations within lua scripting. Also verified that function registration works as expected. ``` [ok]: EVAL - is Lua able to call Redis API? (0 ms) [ok]: EVAL - is Lua able to call Server API? (1 ms) [ok]: EVAL - No arguments to redis.call/pcall is considered an error (0 ms) [ok]: EVAL - No arguments to server.call/pcall is considered an error (1 ms) ``` --------- Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
PatrickJS
pushed a commit
to PatrickJS/placeholderkv
that referenced
this pull request
Apr 24, 2024
…lkey-io#213) This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code. I verified that the unit tests pass. Also manually verified that the redis-server responds to server.call invocations within lua scripting. Also verified that function registration works as expected. ``` [ok]: EVAL - is Lua able to call Redis API? (0 ms) [ok]: EVAL - is Lua able to call Server API? (1 ms) [ok]: EVAL - No arguments to redis.call/pcall is considered an error (0 ms) [ok]: EVAL - No arguments to server.call/pcall is considered an error (1 ms) ``` --------- Signed-off-by: Parth Patel <661497+parthpatel@users.noreply.github.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit does not remove redis.call/pcall just yet. It also does not rename Redis in error messages such as "Please specify at least one argument for this redis lib call". This allows users to maintain full backwards compatibility while introducing an option to use server.call for new code.
I verified that the unit tests pass. Also manually verified that the redis-server responds to server.call invocations within lua scripting. Also verified that function registration works as expected.