Repository navigation
Fix RESP2 reply types in Redis adapter and proxy - #1263
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96feff50a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa84a87dda
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Lines 699 to 700 in a55ef45
When EVAL, EVALSHA, or FCALL returns an array containing a status reply—for example, return {redis.status_reply('OK')}—the top-level value is a slice, so it bypasses the script-specific status check and this generic recursion emits the nested OK as a bulk string. Redis specifies that redis.status_reply produces a simple-string reply, and the previous recursive status handling preserved known tokens such as OK; carry the script-response context into nested arrays instead of dropping it at this fallback.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59070afeb9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26c8646952
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6562be8d5c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab865072ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
OKandPONGin parsed proxy replies, including nested arrays, and restore simple-string types for command metadata and transaction status replies.PINGarity, reject unsupported nonzeroSELECTdatabases, and makeXREADwithoutBLOCKreturn promptly.HELLO 2without options in parsed proxy mode.MSET,PSETEX,RESTORE,PFMERGE, andXGROUP CREATE; alignCOMMAND DOCSgroups with Redis 8.10.1.SLOWLOG RESET,MEMORY PURGE,ACL LOG RESET,SCRIPT DEBUG, and cluster operations, while keeping data-returning subcommands as bulk strings.SAVE,BGSAVE,REPLICAOF,MIGRATE, andREADWRITE; parseSEToption operands so anIFEQvalue ofGETis not mistaken for theGETmodifier.PONGfor argumentlessPINGinsideEXECwhile retaining bulk-string replies forPING message; return a simple-stringOKfor allowedACL DRYRUNand a bulk-string explanation when denied.DEBUGsimple-string diagnostics and status replies, including the elements ofDIGEST-VALUE; keepDEBUG PROTOCOL STRINGandSTRUCTSIZEas bulk strings.EXEC.EVAL,EVALSHA, andFCALLresult arrays, while retaining bulk strings for other array elements.Reproduction and validation
GETof a value containingOKorPONG,COMMAND INFO GET,COMMAND DOCS GET,XREAD STREAMS missing 0, and blocking timeout replies through the proxy and adapter against Redis 8.10.1 in RESP2.COMMAND DOCSgroups for all 82 public adapter commands against local Redis 8.10.1; regression tests also cover the two ElasticKV-only aliases.go test ./adapter -run '^(TestRedis|TestCommand|TestParseXRead)' -count=1 -timeout=5m— passed.go test ./proxy -count=1— passed.SLOWLOG RESETadmin path and status/data wire types for related subcommands.SET,GET, and mixedEXECreply types after leaving subscription mode.golangci-lint run ./... --timeout=5m— 0 issues.git diff --check— passed.go test ./adapter ./proxy -count=1 -timeout=10m— proxy passed; the broader adapter suite timed out after 10 minutes. The Redis/COMMAND tests above passed independently.Known limits
OK,QUEUED, orPONGcan still be encoded as a simple string in parsed proxy mode, including inside arrays. Conversely, an arbitrary simple-string status outside those tokens can be encoded as a bulk string. The current go-redis result has already lost the original RESP string type; preserving it requires a lower-level reply path.OK. The default route retains its previous status-token behavior; full type fidelity for arbitrary commands requires a raw typed reply path.COMMAND INFOandCOMMAND DOCShave the required RESP2 shape but less detail,COMMAND GETKEYSANDFLAGSis unsupported, and the command and module lists reflect supported features.HELLO 2options remain unsupported in parsed proxy mode.Risk
SELECTnow reports an error for nonzero databases instead of silently using database 0.