Conversation
|
It looks like the If it helps, clone https://github.com/dadrus/heimdall, switch to the branch from dadrus/heimdall#2992 PR, replace the miniredis dependency to your version and run https://github.com/dadrus/heimdall/blob/c1da7b6dc5b488da3e14e67943f174f60858ddee/internal/cache/redis/cluster_test.go#L46 tests. "successful cache creation with TLS" and "successful cache creation without TLS" are those which fail in that branch |
|
Thanks for your feedback! I see you use github.com/redis/rueidis as a client, so I should be able to test that. Won't have time for this tomorrow, so you should pin the previous version for now. |
|
I used some help of chatgpt and it worked with the following update: // CLUSTER SHARDS
func (m *Miniredis) cmdClusterShards(c *server.Peer, cmd string, args []string) {
withTx(m, c, func(c *server.Peer, ctx *connCtx) {
addr := m.srv.Addr()
host := addr.IP.String()
port := addr.Port
// Array of shards (we return 1 shard)
c.WriteLen(1)
// Shard is a map with 2 keys: "slots" and "nodes"
c.WriteMapLen(2)
// "slots": flat list of start/end pairs (inclusive ranges)
c.WriteBulk("slots")
c.WriteLen(2)
c.WriteInt(0)
c.WriteInt(16383)
// "nodes": array of node maps
c.WriteBulk("nodes")
c.WriteLen(1)
// Node map.
// (id, endpoint, ip, port, role, replication-offset, health)
c.WriteMapLen(6)
c.WriteBulk("id")
c.WriteBulk("13f84e686106847b76671957dd348fde540a77bb")
//c.WriteBulk("endpoint")
//c.WriteBulk(host) // or host:port if your client expects that
c.WriteBulk("ip")
c.WriteBulk(host)
c.WriteBulk("port")
c.WriteInt(port)
c.WriteBulk("role")
c.WriteBulk("master")
c.WriteBulk("replication-offset")
c.WriteInt(0)
c.WriteBulk("health")
c.WriteBulk("online")
})
}Though, I'm not sure, whether there are some edge cases. I'll push an update to your PR, so you can review |
|
update is pending in #432 |
|
I used what my redis here returned, but if this works for you, then that should be enough. I merged this to master, will make a new release tomorrow. |
for #430