-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to resp2_replies.json and resp3_replies.json #202
Conversation
Fix keys, add missing commands/options, replace Redis/master Signed-off-by: Simon Baatz <[email protected]>
@zuiderkwast Refresh my memory: these reply JSON files are somehow generated? I think @gmbnomis' effort here is worthy but I'm not sure of the right way to get it into the docs if it is generated. |
I don't think they are generated. The bulk of it is markdown text, not types. IIRC they were extracted from the command markdown files some time in the past. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good, thanks!
Did you test this by generating man pages to review the result?
I opened this for the website: valkey-io/valkey-io.github.io#185
A problem with not having this on the website is that contibutors forget to update these files, so they become more and more outdated.
I would actually like to put this content back into each command's markdown file under a Reply heading, to eliminare the need for special handling. Looking at the history, it was in each markdown file earlier.
"SENTINEL IS MASTER-DOWN-BY-ADDR": [], | ||
"SENTINEL MASTER": [ | ||
"[Map reply](../topics/protocol.md#maps): The state and info of the specified master." | ||
"SENTINEL IS PRIMARY-DOWN-BY-ADDR": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both names exist for backward compatibility. We should probably duplicate these for both the primary and master subcommands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just did "robotic" replacements here, but actually:
- The sentinel commands appear only in the resp3 file
- The sentinel command documentation lives outside of the regular command documentation anyway: https://valkey.io/topics/sentinel/#sentinel-api
I tend to remove the Sentinel commands from here. But I can also duplicate these both for master/primary and resp2/resp3 respectively if we intend to make the sentinel commands "first class citizens" in the future.
I looked at some of the web pages and some man pages (especially ZSCAN and HSCAN).
valkey-io/valkey-io.github.io#183 😀
Yes, putting them back into the command's markdown file might be a good idea longer term (or generate them automatically from the command JSONs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, then let's merge this asap. We can improve more in the future.
The descriptive text is not in the commnad json though. You mean we should move it there? |
My original intention was to eliminate duplication between the per-command JSON files and the RESP2/RESP3 files. Ideally, the JSON files would contain sufficient information to auto-generate the reply section(s) in the documentation, with the possibility of adding more descriptive text in this repository. However, upon closer examination, this approach is flawed: the per-command JSON files lack adequate type information for RESP3 responses. Given this limitation, it seems we may need to accept the duplication. |
Fix keys, add missing commands/options, replace Redis/master