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 test failure due to differing reply format of XREADGROUP under RESP3 in MULTI #13255
Conversation
Fully CI only with flag |
@sundb aren't we running all tests with RESP3 by default when we verify the reply schema? |
tests/unit/type/stream-cgroups.tcl
Outdated
$master del mystream | ||
$master xadd mystream 1-0 a b c d e f | ||
$master xgroup create mystream mygroup 0 | ||
$master xreadgroup group mygroup ryan count 1 streams mystream > | ||
$master multi | ||
$master xreadgroup group mygroup ryan count 1 streams mystream 0 | ||
set reply [$master exec] | ||
assert_equal $reply {{{mystream {{1-0 {a b c d e f}}}}}} | ||
assert_equal $reply {{mystream {{1-0 {a b c d e f}}}}} |
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.
@guybe7 yes, but the test failed under RESP3, so I changed the test to always run under RESP3.
please note that i removed a {}
.
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 reason why i don't fix it under RESP2 is hello 2
doesn't work with flag --force-resp3
.
@guybe7 I converted the map to array to consistency with RESP2. |
@sundb i don't understand why is XREADGROUP inside MULTI different from any other command inside MULTI |
@guybe7 It's not different, we had never verify the command that reply a map inside the multi. |
@sundb so we have a general problem with validating the reply schema of map-reply inside an EXEC reply? |
@guybe7 yes, another alternative is to add an automatic verversion to exec command to convert all map replies into array, |
ok so the problem is that it's a deep issue, i think it's better to quick-fix it like this:
|
Co-authored-by: guybe7 <guy.benoish@redislabs.com>
@guybe7 thanks, apply your patch. |
This test was introducted by #13251.
Normally we auto transform the reply format of XREADGROUP to array under RESP3 (see trasformer_funcs).
But when we execute XREADGROUP command in multi it can't work, which cause the new test failed.
The solution is to verity the reply of XREADGROUP in advance rather than in MULTI.
Failed validate schema CI: https://github.com/redis/redis/actions/runs/9025128323/job/24800285684