redis / redis-py

Redis Python client
MIT License
12.4k stars 2.48k forks source link

Improve parsing of XINFO STREAM response #3282

Closed Wh1isper closed 2 weeks ago

Wh1isper commented 2 weeks ago

Pull Request check-list

Please make sure to review and check all of these items:

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Please provide a description of the change here.

closes: #3065

And also fix when there is no group(data["groups"] == []) and parse consumer by defualt

Wh1isper commented 2 weeks ago

This is a tiny fix, I can add test cases and changelogs for this if needed

gerzse commented 2 weeks ago

This is a tiny fix, I can add test cases and changelogs for this if needed

Thanks @Wh1isper

It would be great if you can add tests, one with a response before XTRIM, one for a response after XTRIM.

Wh1isper commented 2 weeks ago

@gerzse I've added test code for this change on the original xinfo_stream and xinfo_stream_full test cases, please take a look

CI: https://github.com/Wh1isper/redis-py/actions/runs/9544241170

gerzse commented 2 weeks ago

Thanks for the tests @Wh1isper