Skip to content

more graceful docgen#1588

Merged
deepthi merged 1 commit intoprodfrom
andrew/docgen-graceful
Sep 20, 2023
Merged

more graceful docgen#1588
deepthi merged 1 commit intoprodfrom
andrew/docgen-graceful

Conversation

@ajm188
Copy link
Copy Markdown
Contributor

@ajm188 ajm188 commented Sep 18, 2023

skip programs who either don't have a target directory (in content/en/.../) for that version, or don't have a docgen directory (go/cmd//docgen) in vitessio/vitess for that gitref

this allows us to freely bulk-generate docs for all programs/versions without having to get fussy about it

Example Output

(note i have upstream/main checked out as vmain so i tweaked the makefile locally)

Details ``` ➜ vtwebsite git:(andrew/docgen-graceful) ✗ VITESS_DIR=~/dev/vitess make generated-docs go run ./tools/cobradocs/ --vitess-dir "/Users/andrew/dev/vitess" --version-pairs ""vmain:18.0,v17.0.2:17.0,v16.0.4:16.0,v15.0.4:15.0"" vtctld 2023/09/18 06:27:41 [warning] cannot find directory for doc version v17.0.2:17.0 (index=1): stat /Users/andrew/dev/vtwebsite/content/en/docs/17.0/reference/programs/vtctld: no such file or directory 2023/09/18 06:27:41 [warning] cannot find directory for doc version v16.0.4:16.0 (index=2): stat /Users/andrew/dev/vtwebsite/content/en/docs/16.0/reference/programs/vtctld: no such file or directory 2023/09/18 06:27:41 [warning] cannot find directory for doc version v15.0.4:15.0 (index=3): stat /Users/andrew/dev/vtwebsite/content/en/docs/15.0/reference/programs/vtctld: no such file or directory go run ./tools/cobradocs/ --vitess-dir "/Users/andrew/dev/vitess" --version-pairs ""vmain:18.0,v17.0.2:17.0,v16.0.4:16.0,v15.0.4:15.0"" vtctldclient go run ./tools/cobradocs/ --vitess-dir "/Users/andrew/dev/vitess" --version-pairs ""vmain:18.0,v17.0.2:17.0,v16.0.4:16.0,v15.0.4:15.0"" vtgate 2023/09/18 06:28:01 [warning] cannot find directory for doc version v17.0.2:17.0 (index=1): stat /Users/andrew/dev/vtwebsite/content/en/docs/17.0/reference/programs/vtgate: no such file or directory 2023/09/18 06:28:01 [warning] cannot find directory for doc version v16.0.4:16.0 (index=2): stat /Users/andrew/dev/vtwebsite/content/en/docs/16.0/reference/programs/vtgate: no such file or directory 2023/09/18 06:28:01 [warning] cannot find directory for doc version v15.0.4:15.0 (index=3): stat /Users/andrew/dev/vtwebsite/content/en/docs/15.0/reference/programs/vtgate: no such file or directory go run ./tools/cobradocs/ --vitess-dir "/Users/andrew/dev/vitess" --version-pairs ""vmain:18.0,v17.0.2:17.0,v16.0.4:16.0,v15.0.4:15.0"" vtorc 2023/09/18 06:28:04 [warning] cannot find directory for doc version v17.0.2:17.0 (index=1): stat /Users/andrew/dev/vtwebsite/content/en/docs/17.0/reference/programs/vtorc: no such file or directory 2023/09/18 06:28:04 [warning] cannot find directory for doc version v16.0.4:16.0 (index=2): stat /Users/andrew/dev/vtwebsite/content/en/docs/16.0/reference/programs/vtorc: no such file or directory 2023/09/18 06:28:04 [warning] cannot find directory for doc version v15.0.4:15.0 (index=3): stat /Users/andrew/dev/vtwebsite/content/en/docs/15.0/reference/programs/vtorc: no such file or directory go run ./tools/cobradocs/ --vitess-dir "/Users/andrew/dev/vitess" --version-pairs ""vmain:18.0,v17.0.2:17.0,v16.0.4:16.0,v15.0.4:15.0"" vttablet 2023/09/18 06:28:05 [warning] cannot find directory for doc version v17.0.2:17.0 (index=1): stat /Users/andrew/dev/vtwebsite/content/en/docs/17.0/reference/programs/vttablet: no such file or directory 2023/09/18 06:28:05 [warning] cannot find directory for doc version v16.0.4:16.0 (index=2): stat /Users/andrew/dev/vtwebsite/content/en/docs/16.0/reference/programs/vttablet: no such file or directory 2023/09/18 06:28:05 [warning] cannot find directory for doc version v15.0.4:15.0 (index=3): stat /Users/andrew/dev/vtwebsite/content/en/docs/15.0/reference/programs/vttablet: no such file or directory ➜ vtwebsite git:(andrew/docgen-graceful) ✗ echo $? 0 ```

skip programs who either don't have a target directory (in content/en/.../) for that version, or don't have a docgen directory (go/cmd/<binary>/docgen) in vitessio/vitess for that gitref

this allows us to freely bulk-generate docs for all programs/versions without having to get fussy about it

Signed-off-by: Andrew Mason <andrew@planetscale.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 18, 2023

Deploy Preview for vitess ready!

Name Link
🔨 Latest commit 9a30356
🔍 Latest deploy log https://app.netlify.com/sites/vitess/deploys/6508271ed7cc5900082705bb
😎 Deploy Preview https://deploy-preview-1588--vitess.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All my comments are to do with lowercase vs uppercase. I believe they will need to change in the main repo and the docs have to be regenerated.

### Synopsis

MoveTables commands: Create, Show, Status, SwitchTraffic, ReverseTraffic, Stop, Start, Cancel, and Delete.
moveTables commands: Create, Show, Status, SwitchTraffic, ReverseTraffic, Stop, Start, Cancel, and Delete.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did the case change on this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* [vtctldclient MoveTables cancel](./vtctldclient_movetables_cancel/) - Cancel a MoveTables VReplication workflow.
* [vtctldclient MoveTables complete](./vtctldclient_movetables_complete/) - Complete a MoveTables VReplication workflow.
* [vtctldclient MoveTables create](./vtctldclient_movetables_create/) - Create and optionally run a MoveTables VReplication workflow.
* [vtctldclient MoveTables create](./vtctldclient_movetables_create/) - Create and optionally run a moveTables VReplication workflow.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## vtctldclient MoveTables create

Create and optionally run a MoveTables VReplication workflow.
Create and optionally run a moveTables VReplication workflow.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--tablet-types-in-preference-order When performing source tablet selection, look for candidates in the type order as they are listed in the tablet-types flag (default true)
--on-ddl string What to do when DDL is encountered in the VReplication stream. Possible values are IGNORE, STOP, EXEC, and EXEC_IGNORE. (default "IGNORE")
--source-keyspace string Keyspace where the tables are being moved from (required).
--source-shards strings Source shards to copy data from when performing a partial moveTables (experimental).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Comment on lines -25 to +32
* [vtctldclient OnlineDDL cancel](./vtctldclient_onlineddl_cancel/) - Cancel one or all pending migrations, terminating any actively running ones.
* [vtctldclient OnlineDDL cancel](./vtctldclient_onlineddl_cancel/) - cancel one or all migrations, terminating any running ones as needed.
* [vtctldclient OnlineDDL cleanup](./vtctldclient_onlineddl_cleanup/) - Mark a given schema migration ready for artifact cleanup.
* [vtctldclient OnlineDDL complete](./vtctldclient_onlineddl_complete/) - Complete one or all migrations executed with `--postpone-completion`.
* [vtctldclient OnlineDDL launch](./vtctldclient_onlineddl_launch/) - Launch one or all migrations executed with `--postpone-launch`.
* [vtctldclient OnlineDDL complete](./vtctldclient_onlineddl_complete/) - complete one or all migrations executed with --postpone-completion
* [vtctldclient OnlineDDL launch](./vtctldclient_onlineddl_launch/) - launch one or all migrations executed with --postpone-launch
* [vtctldclient OnlineDDL retry](./vtctldclient_onlineddl_retry/) - Mark a given schema migration for retry.
* [vtctldclient OnlineDDL show](./vtctldclient_onlineddl_show/) - Display information about online DDL operations.
* [vtctldclient OnlineDDL throttle](./vtctldclient_onlineddl_throttle/) - Throttle one or all migrations.
* [vtctldclient OnlineDDL unthrottle](./vtctldclient_onlineddl_unthrottle/) - Unthrottle one or all migrations.
* [vtctldclient OnlineDDL throttle](./vtctldclient_onlineddl_throttle/) - Throttles one or all migrations
* [vtctldclient OnlineDDL unthrottle](./vtctldclient_onlineddl_unthrottle/) - Unthrottles one or all migrations
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent casing. Some start with upper, some with lower.

## vtctldclient OnlineDDL cancel

Cancel one or all pending migrations, terminating any actively running ones.
cancel one or all migrations, terminating any running ones as needed.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference is Cancel vs. cancel.

## vtctldclient OnlineDDL complete

Complete one or all migrations executed with `--postpone-completion`.
complete one or all migrations executed with --postpone-completion
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complete.

## vtctldclient OnlineDDL launch

Launch one or all migrations executed with `--postpone-launch`.
launch one or all migrations executed with --postpone-launch
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Launch.

@ajm188
Copy link
Copy Markdown
Contributor Author

ajm188 commented Sep 20, 2023

tl;dr all the casing changes were made in the main codebase but never regenerated back to the website docs. this is just correcting that

i’ll defer to @rohit-nayak-ps for what consistency he wants there (i.e. i’d like to get the main change in and follow up for the consistentcy)

@deepthi deepthi merged commit 0020cea into prod Sep 20, 2023
@deepthi deepthi deleted the andrew/docgen-graceful branch September 20, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants