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

Fix getex command returning value for json based object #674

Conversation

kapishmalik
Copy link
Contributor

This PR resolves #625.

DiceDB CLI screenshot:
Screenshot 2024-09-21 at 2 41 17 AM

Integration test screenshot:
Screenshot 2024-09-21 at 2 40 02 AM

UTs screenshot:
Screenshot 2024-09-21 at 2 37 01 AM

Copy link
Contributor

@apoorvyadav1111 apoorvyadav1111 left a comment

Choose a reason for hiding this comment

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

Hi, changes look good. Would it be okay for you to add another integration test that test the behaviour for SET data structure. This will ensure future modifications do not modify this behavior.
Thanks,
Apoorv

@kapishmalik
Copy link
Contributor Author

yea sure, done.

name: "GetEx with key holding SET type",
commands: []string{"SADD KEY 1 2 3", "GETEX KEY"},
expected: []interface{}{"OK", "WRONGTYPE Operation against a key holding the wrong kind of value"},
assert_type: []string{"equal", "equal"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, the test is failing as you are not deleting key with name KEY before executing an SADD command. Please add a delete command for KEY. please see line 151 for reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

incorporated. I have changed key name. Ideally, tests should be independent.

@kapishmalik
Copy link
Contributor Author

@apoorvyadav1111 @JyotinderSingh could u please check this PR.

@apoorvyadav1111
Copy link
Contributor

Hi @kapishmalik , I have reviewed the PR. I will not be merging it as I don't have permission to do so. One of the collaborators will pick this PR up as per their schedule.

@kapishmalik
Copy link
Contributor Author

@JyotinderSingh could you please run the tests in workflow and merge this PR.

@kapishmalik
Copy link
Contributor Author

@lucifercr07 @JyotinderSingh @apoorvyadav1111 can you please run tests in workflow and merge this PR as I need to resolve conflicts and merge master in this branch.

@kapishmalik
Copy link
Contributor Author

@JyotinderSingh below failure is not related to my change. Can you please help here?

--- FAIL: TestServerRestartAfterAbort (1.00s)
FAIL
FAIL github.com/dicedb/dice/integration_tests/server 4.042s
FAIL

@JyotinderSingh
Copy link
Collaborator

@JyotinderSingh below failure is not related to my change. Can you please help here?

--- FAIL: TestServerRestartAfterAbort (1.00s)

FAIL

FAIL github.com/dicedb/dice/integration_tests/server 4.042s

FAIL

I've retriggered the tests

@kapishmalik
Copy link
Contributor Author

Thanks, we are good to merge this PR.

Copy link
Collaborator

@JyotinderSingh JyotinderSingh left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @kapishmalik. Thanks for the reviews @apoorvyadav1111. Approved.

@JyotinderSingh JyotinderSingh merged commit 423acee into DiceDB:master Sep 23, 2024
2 checks passed
@kapishmalik kapishmalik deleted the ISSUE625-fix-getex-returning-value-for-json-based-object branch September 23, 2024 07:58
shardul08 pushed a commit to shardul08/dice that referenced this pull request Sep 23, 2024
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.

Inconsistent GETEX: Getex returns incorrect message for json based value objects
3 participants