Conversation
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
✅ Deploy Preview for vitess ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
GuptaManan100
left a comment
There was a problem hiding this comment.
GitHub is making this impossible to review! But I ❤️ it. Do we want one file for each command though or 1 long file?
I'd recommend just looking at the deploy preview!! Every file is "the same" (except for
This is the standard way that cobra auto doc works, so I'd rather stick with that than try to shoe-horn it into some other setup unless we have a specific reason to do so. |
|
Clicking links on the preview is returning |
| --- | ||
| ## vtctldclient GetBackups | ||
|
|
||
|
|
There was a problem hiding this comment.
Some commands like this one show an empty description on the preview. I think we need to add the right text to the source and regenerate.
There was a problem hiding this comment.
yeah, i can go through the actual commands in vitessio/vitess tomorrow and add all those
There was a problem hiding this comment.
will that be a follow up PR? If yes, this LGTM
There was a problem hiding this comment.
opened: vitessio/vitess#10502. after addressing any feedback there, i'll regenerate and we can merge this one!
ah shoot, i see the problem, will fix it up! |
Signed-off-by: Andrew Mason <andrew@planetscale.com>
mattlord
left a comment
There was a problem hiding this comment.
This is friggin awesome! 😃
Is --server really optional with vtctldclient? I see some commands imply that it is, e.g.
vtctldclient UpdateCellInfo [--root <root>] [--server-address <addr>] <cell>
And some commands don't mention it at all, e.g.:
vtctldclient DeleteKeyspace [--recursive|-r] [--force|-f] <keyspace> [flags]
Although for the latter I now see that it mentions those separately as being inherited. So maybe that part is fine (although I'd expect those to be in the usage output too).
You're mistaking the
|
|
It also does appear in each command's docs, e.g. https://deploy-preview-1054--vitess.netlify.app/docs/14.0/reference/programs/vtctldclient/vtctldclient_addcellinfo/#options-inherited-from-parent-commands |
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
|
@deepthi okay i regenerated (and added the 15.0 versions), this should be good to go! |
Ah, right. Sorry!
It doesn't seem to be required on the command pages though, the command usage doesn't show it without square brackets to indicate it's non-optional and in the inherited section it says: I'd prefer to show those inherited things in the full usage output for each command, but can we at least add e.g. It's a nit obviously, and doesn't need to hold this up (we have no docs ATM so this is obviously much better). I'll approve so that you're unblocked. Thanks! |
|
One general note, not specifically related to this PR, is that we don't seem to have a uniform way of showing usage related info when you must specify 1 of N options. For example, in some cases we use ~ this to signify that one of the two is required: We can take the lead from pflags on that and update the docs everywhere to match over time. |
|
lemme fix that real quick! as for the standardization, totally agree. it's grown organically over time, and before v15 release we should sit down (metaphorically 😂 ) and articulate what conventions we want to stick to (and then fix all my sins) |
This adds docs for
vtctldclientautogenerated viacobra/doc.GenMarkdownTreeCustom. I'm working on generalizing the backing code, but I think me just committing this is fine for 14.0 (but when we start moving more commands over in the next release, we should 100% have this tooling integrated).Anyway, here's the steps (from vitessio/vitess):
(when I publish the tooling, that'll all be in a
maketarget)