Skip to content

DX-2186: Add Redis stream commands#66

Merged
CahidArda merged 11 commits into
mainfrom
DX-2186-stream-commands
Oct 21, 2025
Merged

DX-2186: Add Redis stream commands#66
CahidArda merged 11 commits into
mainfrom
DX-2186-stream-commands

Conversation

@CahidArda

@CahidArda CahidArda commented Oct 8, 2025

Copy link
Copy Markdown
Collaborator

todo:

  • fix skipped tests
  • improve response formating

fixes #65

todo: fix skipped tests, improve response formating
@linear

linear Bot commented Oct 8, 2025

Copy link
Copy Markdown

Comment thread upstash_redis/commands.py
Comment thread upstash_redis/commands.py
Comment thread upstash_redis/commands.pyi
@CahidArda CahidArda requested a review from Copilot October 18, 2025 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Adds Redis Streams support to the SDK, including sync/async command implementations, response formatters, type stubs, documentation, and tests. Also bumps the package version.

  • Implements XADD, XACK, XDEL, XGROUP, XINFO, XLEN, XPENDING, XRANGE, XREAD, XREADGROUP, XREVRANGE, XTRIM, XCLAIM, XAUTOCLAIM in commands.py
  • Adds response formatters and registers stream commands in format.py
  • Introduces extensive sync/async tests and updates README; bumps version to 1.5.0

Reviewed Changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
upstash_redis/commands.py Adds full Redis Streams command implementations (sync)
upstash_redis/commands.pyi Adds type stubs for new stream commands (sync/async)
upstash_redis/format.py Adds formatters and registers stream response handlers
tests/... (multiple) Adds comprehensive sync/async tests for all stream commands
README.md Documents Streams usage (sync and async)
upstash_redis/init.py Bumps version to 1.5.0
pyproject.toml Bumps package version to 1.5.0
tests/commands/asyncio/scripting/test_evalsha_ro.py Uses client’s script_load for consistency
.github/instructions/project-layout.instructions.md Adds internal contributor guide for adding commands

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread upstash_redis/format.py Outdated
Comment thread upstash_redis/format.py Outdated
"XGROUP DESTROY": to_bool,
"XGROUP CREATECONSUMER": to_bool,
"XGROUP DELCONSUMER": to_bool,
"XGROUP SETID": ok_to_bool,

Copilot AI Oct 18, 2025

Copy link

Choose a reason for hiding this comment

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

The formatter converts the "OK" response for XGROUP CREATE and XGROUP SETID to boolean, but the test suite expects the literal "OK" string. Remove these mappings (or map them to a passthrough formatter) so the raw "OK" is returned.

Copilot uses AI. Check for mistakes.
Comment thread upstash_redis/commands.pyi Outdated
Comment thread upstash_redis/commands.pyi Outdated
Comment thread upstash_redis/commands.pyi Outdated
Comment thread upstash_redis/format.py Outdated
Comment thread tests/commands/stream/test_xtrim.py
Comment thread tests/commands/stream/test_xadd.py
Comment thread tests/commands/asyncio/stream/test_xadd.py
Comment thread tests/commands/asyncio/stream/test_xlen.py
CahidArda and others added 6 commits October 20, 2025 09:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CahidArda CahidArda merged commit bed0d54 into main Oct 21, 2025
1 of 2 checks passed
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.

No xadd support

3 participants