Skip to content

HELLO 3 command support #801

@unendingblue

Description

@unendingblue

I'm facing a roadblock with Tile38's handling of the HELLO command when using Bun's Redis client - Bun only supports RESP3 and always sends a HELLO 3 command when connections open, which Tile38 currently rejects.

if cmd == "hello" {
// Not Supporting RESP3+, returns an ERR instead.
ot := msg.OutputType
if len(msg.Args) > 1 && (msg.Args[1] >= "0" &&
msg.Args[1] <= "9") && s.opts.ClientOutput == "json" &&
ot == JSON && msg.ConnType == RESP {
// Here we are making sure that we ignoring the '-o json' flag, if
// used, otherwise the connection will fail for some redis clients
// like "github.com/redis/go-redis/v9" are overly strict and expect
// a map type or an error as the result of the HELLO command.
msg.OutputType = RESP
msg.StrictRESP = true
}
err := writeErr("unknown command '" + msg.Args[0] + "'")
msg.OutputType = ot
return err
}

Since I'm always using OUTPUT json, it would be really helpful if Tile38 supported a way to answer to HELLO 3 without actually performing any changes to the wire protocol (since in both cases responses are a bulk string). Maybe an arg like --withHello3?

To test this out I had Claude write up a patch to handle HELLO + AUTH and it seems to work reliably with JSON output - I haven't tested RESP output yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions