Describe the bug
https://redis.io/commands/cluster-shards/
Per discussion here https://github.com/redis/redis/issues/10168#issuecomment-1215922419 it seems that the "ip" should be marked as optional and endpoint can be used instead (in general the docs there a bit inaccurate as the example doesn't fit with what's required / optional).
Comment From: enjoy-binbin
yes, i see, the example in cluster-shards doc is outdated, it doesn't contain the endpoint field, and the endpoint field must be in the response, we will fix the example later
and the optional one, what do you means? i see the code, now the ip field is also will always be in the response. do you mean that we marked it as optional like this:
ip: The IP address to send requests to for this node. ---------> become ip (optional)
hostname (optional): The announced hostname to send requests to for this node.
or just add a note that say: endpoint can be used instead (somethings like that?)
Comment From: madolson
Based on our discussion we said it's not required for any correctness reasons, but realistically within Redis it is never omitted, it seems weird to put it as optional when there is no mode where it optional.
Yeah, maybe we should cleanup the documentation, I remember that being a little rushed since it was close to the Redis 7 launch
Comment From: zuiderkwast
Is this fixed?
Comment From: madolson
@sjpotter Are you happy with the compromise?