From ad5bded2ef16939166ab65653efdbe7d04106662 Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Tue, 3 Nov 2020 11:12:46 +0800 Subject: [PATCH 1/4] cherry pick #4135 to release-3.0 Signed-off-by: ti-srebot --- .circleci/config.yml | 4 +-- .github/workflows/link-check.yaml | 31 +++++++++++++++++++++ adopters.md | 11 ++++---- connectors-and-apis.md | 6 ++--- sql-statements/sql-statement-admin.md | 2 +- technical-writing-project-ideas.md | 39 +++++++++++++++++++++++++++ 6 files changed, 81 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/link-check.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml index 702804c4a222f..482378015c09c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,12 +34,12 @@ jobs: markdownlint $(git diff-tree --name-only --no-commit-id -r upstream/release-3.0..HEAD -- '*.md' ':(exclude).github/*') - run: - name: "Check links" + name: "Check internal links" command: | scripts/verify-links.sh - run: - name: "Check link anchors" + name: "Check internal link anchors" command: | scripts/verify-link-anchors.sh diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml new file mode 100644 index 0000000000000..46e757c7945d9 --- /dev/null +++ b/.github/workflows/link-check.yaml @@ -0,0 +1,31 @@ +name: external-link-check + +on: [pull_request] + +jobs: + base: + runs-on: ubuntu-18.04 + steps: + - name: Check out code + uses: actions/checkout@v2 + + # NOTE: + # - the check process can be very fast, + # but if `-c` is too large then `Too Many Requests (HTTP error 429)` may be reported from `https://github.com/*`. + # - we hardcode `--document-root` to `/github/workspace` in the container now. + # - we use `http://172.*` as sample addresses in some docs, so we need to exclude them. + - name: Check external links + id: lc + uses: peter-evans/link-checker@v1 + with: + args: -c 32 -d /github/workspace -r -t 20 -x "http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|http://.*:.*|https://static.googleusercontent.com/media/research.google.com/.*|https://www.crunchbase.com/organization/.*|.*.md" . + + - name: Fail if there were external link errors + if: ${{ steps.lc.outputs.exit_code }} + run: | + echo "Please check the broken links reported in the previous step \"Check external links\"." + exit ${{ steps.lc.outputs.exit_code }} + # Debug via SSH if previous steps failed + #- name: Set up tmate session + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v2 diff --git a/adopters.md b/adopters.md index bdffdacd2152f..93f8c507c6c82 100644 --- a/adopters.md +++ b/adopters.md @@ -24,7 +24,7 @@ This is a list of TiDB adopters in various industries. |[Xiaohongshu](https://en.wikipedia.org/wiki/Xiaohongshu)|E-commerce|[English](https://pingcap.com/case-studies/how-we-use-a-scale-out-htap-database-for-real-time-analytics-and-complex-queries); Chinese [#1](https://pingcap.com/cases-cn/user-case-xiaohongshu/), [#2](https://pingcap.com/cases-cn/user-case-xiaohongshu-2/)| |[Happigo.com](https://www.crunchbase.com/organization/happigo-com)|E-commerce|| |[Yimutian](http://www.ymt.com/)|E-commerce|| -|[Youju Tech](https://www.ujuz.cn/)|E-commerce|| +|[Youju Tech](https://nn.yjyz.com/)|E-commerce|| |[Maizuo](https://www.crunchbase.com/organization/maizhuo)|E-commerce|| |[Mogujie](https://www.crunchbase.com/organization/mogujie)|E-commerce|| |[Zhihu](https://en.wikipedia.org/wiki/Zhihu)|Knowledge Sharing|[English](https://pingcap.com/case-studies/lesson-learned-from-queries-over-1.3-trillion-rows-of-data-within-milliseconds-of-response-time-at-zhihu/); [Chinese](https://pingcap.com/cases-cn/user-case-zhihu/)| @@ -43,9 +43,9 @@ This is a list of TiDB adopters in various industries. |[CAASDATA](https://www.caasdata.com/)|Big Data|[Chinese](https://pingcap.com/cases-cn/user-case-kasi/)| |[Mobikok](http://www.mobikok.com/en/)|AdTech|[Chinese](https://pingcap.com/cases-cn/user-case-mobikok/)| |[ZTO Express](https://www.crunchbase.com/organization/zto-express)| Logistics|[English](https://pingcap.com/case-studies/why-we-migrated-from-exadata-to-a-scale-out-htap-database-for-near-real-time-analytics); [Chinese](https://pingcap.com/cases-cn/user-case-zto-express/)| -|[G7 Networks](https://www.english.g7.com.cn/)| Logistics|[Chinese](https://pingcap.com/cases-cn/user-case-g7/)| +|[G7 Networks](https://www.crunchbase.com/organization/g7)| Logistics|[Chinese](https://pingcap.com/cases-cn/user-case-g7/)| |[Hive-Box](http://www.fcbox.com/en/pc/index.html#/)|Logistics|[Chinese](https://pingcap.com/cases-cn/user-case-fengchao/)| -|[GAEA](http://www.gaea.com/en/)|Gaming|[English](https://pingcap.com/blog/2017-05-22-Comparison-between-MySQL-and-TiDB-with-tens-of-millions-of-data-per-day/); [Chinese](https://pingcap.com/cases-cn/user-case-gaea-ad/)| +|[GAEA](http://www.gaea.com/en/)|Gaming|[English](https://pingcap.com/case-studies/2017-05-22-Comparison-between-MySQL-and-TiDB-with-tens-of-millions-of-data-per-day); [Chinese](https://pingcap.com/cases-cn/user-case-gaea-ad/)| |[YOOZOO Games](https://www.crunchbase.com/organization/yoozoo-games)|Gaming|[Chinese](https://pingcap.com/cases-cn/user-case-youzu/)| |[Seasun Games](https://www.crunchbase.com/organization/seasun)|Gaming|[Chinese](https://pingcap.com/cases-cn/user-case-xishanju/)| |[NetEase Games](https://game.163.com/en/)|Gaming|| @@ -72,15 +72,14 @@ This is a list of TiDB adopters in various industries. |[360 Finance](https://www.crunchbase.com/organization/360-finance)|FinTech|[Chinese](https://pingcap.com/cases-cn/user-case-360/)| |[Tongdun Technology](https://www.crunchbase.com/organization/tongdun-technology)|FinTech|| |[Wacai](https://www.crunchbase.com/organization/wacai)|FinTech|| -|[Tree Finance](https://www.treefinance.com.cn/)|FinTech|| +|[Tree Finance](http://treefinancegroup.com.au/)|FinTech|| |[Mashang Consumer Finance](https://www.crunchbase.com/organization/ms-finance)|FinTech|| |[Snowball Finance](https://www.crunchbase.com/organization/snowball-finance)|FinTech|| -|[Shuangchuang Huipu](http://scphjt.com/)|FinTech|| |[QuantGroup](https://www.crunchbase.com/organization/quantgroup)|FinTech|| |[FINUP](https://www.crunchbase.com/organization/finup)|FinTech|| |[Meili Finance](https://www.crunchbase.com/organization/meili-jinrong)|FinTech|| |[Guolian Securities](https://www.crunchbase.com/organization/guolian-securities)|Financial Services|| -|[Founder Securities](https://www.linkedin.com/company/founder-securities-co-ltd-/)|Financial Services|| +|[Founder Securities](https://www.crunchbase.com/organization/keruyun-technology-beijing-co-ltd)|Financial Services|| |[China Telecom Shanghai](http://www.189.cn/sh/)|Telecom|| |[State Administration of Taxation](https://en.wikipedia.org/wiki/State_Administration_of_Taxation)|Finance|| |[Hainan eKing Technology](https://www.crunchbase.com/organization/hainan-eking-technology)|Enterprise Technology|[Chinese](https://pingcap.com/cases-cn/user-case-ekingtech/)| diff --git a/connectors-and-apis.md b/connectors-and-apis.md index 5aa4317d6f001..31e8529a5a1a4 100644 --- a/connectors-and-apis.md +++ b/connectors-and-apis.md @@ -15,7 +15,7 @@ TiDB is compatible with all Connectors and APIs of MySQL (5.6, 5.7), including: - [MySQL Connector/Net](https://dev.mysql.com/doc/refman/5.7/en/connector-net-info.html) - [MySQL Connector/ODBC](https://dev.mysql.com/doc/refman/5.7/en/connector-odbc-info.html) - [MySQL Connector/Python](https://dev.mysql.com/doc/refman/5.7/en/connector-python-info.html) -- [MySQL C API](https://dev.mysql.com/doc/refman/5.7/en/c-api.html) +- [MySQL C API](https://dev.mysql.com/doc/refman/5.7/en/c-api-info.html) - [MySQL PHP API](https://dev.mysql.com/doc/refman/5.7/en/apis-php-info.html) - [MySQL Perl API](https://dev.mysql.com/doc/refman/5.7/en/apis-perl.html) - [MySQL Python API](https://dev.mysql.com/doc/refman/5.7/en/apis-python.html) @@ -40,7 +40,7 @@ Oracle develops the following APIs and TiDB is compatible with all of them: ## Connect to TiDB using MySQL C API -If you use C language programs to connect to TiDB, you can connect to `libmysqlclient` directly and use the MySQL [C API](https://dev.mysql.com/doc/refman/5.7/en/c-api.html). This is one of the major connection methods using C language, widely used by various clients and APIs, including Connector/C. +If you use C language programs to connect to TiDB, you can connect to `libmysqlclient` directly and use the MySQL [C API](https://dev.mysql.com/doc/refman/5.7/en/c-api-info.html). This is one of the major connection methods using C language, widely used by various clients and APIs, including Connector/C. ## Connect to TiDB using third-party MySQL APIs @@ -49,7 +49,7 @@ The third-party APIs are not developed by Oracle. The following table lists the | Environment | API | Type | Notes | | -------------- | ---------------------------------------- | -------------------------------- | ---------------------------------------- | | Ada | GNU Ada MySQL Bindings | `libmysqlclient` | See [MySQL Bindings for GNU Ada](http://gnade.sourceforge.net/) | -| C | C API | `libmysqlclient` | See [Section 27.8, “MySQL C API”](https://dev.mysql.com/doc/refman/5.7/en/c-api.html) | +| C | C API | `libmysqlclient` | See [MySQL C API](https://dev.mysql.com/doc/refman/5.7/en/c-api-info.html) | | C++ | Connector/C++ | `libmysqlclient` | See [MySQL Connector/C++ Developer Guide](https://dev.mysql.com/doc/connector-cpp/en/) | | | MySQL++ | `libmysqlclient` | See [MySQL++ Web site](http://tangentsoft.net/mysql++/doc/) | | | MySQL wrapped | `libmysqlclient` | See [MySQL wrapped](http://www.alhem.net/project/mysql/) | diff --git a/sql-statements/sql-statement-admin.md b/sql-statements/sql-statement-admin.md index 18ae69defdc16..6e5cb5c59248a 100644 --- a/sql-statements/sql-statement-admin.md +++ b/sql-statements/sql-statement-admin.md @@ -93,7 +93,7 @@ mysql> admin show ddl jobs; * `JOB_TYPE`: the type of the DDL operations. * `SCHEMA_STATE`: the current state of the schema. If the `JOB_TYPE` is `add index`, it is the state of the index; if the `JOB_TYPE` is `add column`, it is the state of the column; if the `JOB_TYPE` is `create table`, it is the state of the table. The common states include: * `none`: it indicates not existing. When the `drop` or `create` operation fails and rolls back, it usually becomes the `none` state. - * `delete only`, `write only`, `delete reorganization`, `write reorganization`: these four states are intermediate states. For details, see the paper [Online, Asynchronous Schema Change in F1](http://static.googleusercontent.com/media/research.google.com/zh-CN//pubs/archive/41376.pdf). These states are not visible in common operations, because the conversion from the intermediate states is so quick. You can see the `write reorganization` state only in `add index` operations, which means that the index data is being added. + * `delete only`, `write only`, `delete reorganization`, `write reorganization`: these four states are intermediate states. For details, see the paper [Online, Asynchronous Schema Change in F1](https://static.googleusercontent.com/media/research.google.com/zh-CN//pubs/archive/41376.pdf). These states are not visible in common operations, because the conversion from the intermediate states is so quick. You can see the `write reorganization` state only in `add index` operations, which means that the index data is being added. * `public`: it indicates existing and usable. When operations like `create table` and `add index/column` are finished, it usually becomes the `public` state, which means that the created table/column/index can be normally read and written now. * `SCHEMA_ID`: the ID of the database on which the DDL operations are performed. * `TABLE_ID`: the ID of the table on which the DDL operations are performed. diff --git a/technical-writing-project-ideas.md b/technical-writing-project-ideas.md index cd7546bf8640c..7cf6f1bcb72f0 100644 --- a/technical-writing-project-ideas.md +++ b/technical-writing-project-ideas.md @@ -20,4 +20,43 @@ The project ideas of TiDB documentation in Google Season of Docs are as follows: 4. Take part in refactoring the TiDB documentation for content reuse of Markdown files. Some existing documents that are a bit too long will be split into two or multiple separate documents, to make it easy for content reuse. +<<<<<<< HEAD 5. (Optional) Improve the [Chinese version of TiDB documentation](https://github.com/pingcap/docs-cn) to make it more user-friendly if the Technical Writer is good at both English and Chinese. This can include reorganizing the content in a single document or within several documents, to make it easier to use and understand. +======= +- **Organization description**: [PingCAP Inc.](https://pingcap.com/about/) is a software company founded in April 2015, dedicated to building [TiDB](https://github.com/pingcap/tidb), an open-source, distributed, Hybrid Transactional and Analytical Processing (HTAP) database. PingCAP is the primary developer, maintainer, and driver of TiDB and its associated [open-source communities](https://github.com/pingcap/community). It is a venture-backed company, which announced its 50 million USD Series C round financing in September 2018. + +- **Reference links:** + + - Open-source repository: + - Website: + +- **Email:** [gsod-tidb@pingcap.com](mailto:gsod-tidb@pingcap.com) + +- **Display name:** + + - Administrator: [lilin90](https://github.com/lilin90) + - Mentor: Coco + +## Project ideas + +This section describes the project ideas of [TiDB documentation](https://pingcap.com/docs) in Google Season of Docs. + +### Project name + +TiDB 4.0 Documentation Improvement + +### Project description + +1. Improve the current [TiDB 4.0 documentation](https://pingcap.com/docs/v4.0/) to make it more user-friendly. This can include reorganizing the content in a single document or within several documents, to make it easier to use and understand. + +2. Execute user acceptance tests for TiDB 4.0 how-to guides and tutorials. For example, a technical writer can test a deployment guide's usability by following the instructions step by step and see whether anything needs to be improved (such as updating unclear or outdated descriptions, adding missing steps or necessary information, or refining the content structure). Then, they can file Pull Requests to improve the documentation based on tests. + +3. Review [GitHub Pull Requests about TiDB 4.0 documentation](https://github.com/pingcap/docs/pulls). This can include reviewing the language and content organization in docs Pull Requests filed by a contributor, a developer, a Database Administrator, or another Technical Writer. + +### Related material + +- The open-source project: +- Existing documentation: +- [How-to guides and tutorials](https://docs.pingcap.com/tidb/v4.0/production-deployment-using-tiup): topics about how to deploy, configure, scale, or monitor a TiDB cluster in different ways +- [Related open-source projects](https://github.com/pingcap/community/blob/master/special-interest-groups/sig-docs/README.md) that are also involved in the whole TiDB documentation +>>>>>>> 89f7b079... .github: check connectivity of external links via GitHub action (#4135) From f11c0c607e9952215d69f2fab0a1f4354c3bad3c Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 3 Nov 2020 12:51:06 +0800 Subject: [PATCH 2/4] Update link-check.yaml --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 46e757c7945d9..6e86b46fd7f41 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -18,7 +18,7 @@ jobs: id: lc uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -t 20 -x "http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|http://.*:.*|https://static.googleusercontent.com/media/research.google.com/.*|https://www.crunchbase.com/organization/.*|.*.md" . + args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|http://.*:.*|https://static.googleusercontent.com/media/research.google.com/.*|https://www.crunchbase.com/organization/.*|http://www.brendangregg.com/perf.html.*|.*.md" . - name: Fail if there were external link errors if: ${{ steps.lc.outputs.exit_code }} From ea601f90884949c461d2c6f3a0c17e012b857592 Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 3 Nov 2020 12:51:23 +0800 Subject: [PATCH 3/4] Update technical-writing-project-ideas.md --- technical-writing-project-ideas.md | 39 ------------------------------ 1 file changed, 39 deletions(-) diff --git a/technical-writing-project-ideas.md b/technical-writing-project-ideas.md index 7cf6f1bcb72f0..cd7546bf8640c 100644 --- a/technical-writing-project-ideas.md +++ b/technical-writing-project-ideas.md @@ -20,43 +20,4 @@ The project ideas of TiDB documentation in Google Season of Docs are as follows: 4. Take part in refactoring the TiDB documentation for content reuse of Markdown files. Some existing documents that are a bit too long will be split into two or multiple separate documents, to make it easy for content reuse. -<<<<<<< HEAD 5. (Optional) Improve the [Chinese version of TiDB documentation](https://github.com/pingcap/docs-cn) to make it more user-friendly if the Technical Writer is good at both English and Chinese. This can include reorganizing the content in a single document or within several documents, to make it easier to use and understand. -======= -- **Organization description**: [PingCAP Inc.](https://pingcap.com/about/) is a software company founded in April 2015, dedicated to building [TiDB](https://github.com/pingcap/tidb), an open-source, distributed, Hybrid Transactional and Analytical Processing (HTAP) database. PingCAP is the primary developer, maintainer, and driver of TiDB and its associated [open-source communities](https://github.com/pingcap/community). It is a venture-backed company, which announced its 50 million USD Series C round financing in September 2018. - -- **Reference links:** - - - Open-source repository: - - Website: - -- **Email:** [gsod-tidb@pingcap.com](mailto:gsod-tidb@pingcap.com) - -- **Display name:** - - - Administrator: [lilin90](https://github.com/lilin90) - - Mentor: Coco - -## Project ideas - -This section describes the project ideas of [TiDB documentation](https://pingcap.com/docs) in Google Season of Docs. - -### Project name - -TiDB 4.0 Documentation Improvement - -### Project description - -1. Improve the current [TiDB 4.0 documentation](https://pingcap.com/docs/v4.0/) to make it more user-friendly. This can include reorganizing the content in a single document or within several documents, to make it easier to use and understand. - -2. Execute user acceptance tests for TiDB 4.0 how-to guides and tutorials. For example, a technical writer can test a deployment guide's usability by following the instructions step by step and see whether anything needs to be improved (such as updating unclear or outdated descriptions, adding missing steps or necessary information, or refining the content structure). Then, they can file Pull Requests to improve the documentation based on tests. - -3. Review [GitHub Pull Requests about TiDB 4.0 documentation](https://github.com/pingcap/docs/pulls). This can include reviewing the language and content organization in docs Pull Requests filed by a contributor, a developer, a Database Administrator, or another Technical Writer. - -### Related material - -- The open-source project: -- Existing documentation: -- [How-to guides and tutorials](https://docs.pingcap.com/tidb/v4.0/production-deployment-using-tiup): topics about how to deploy, configure, scale, or monitor a TiDB cluster in different ways -- [Related open-source projects](https://github.com/pingcap/community/blob/master/special-interest-groups/sig-docs/README.md) that are also involved in the whole TiDB documentation ->>>>>>> 89f7b079... .github: check connectivity of external links via GitHub action (#4135) From bb79ab715d9dc3cd74a79f9a1ff2d611da0624f0 Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 3 Nov 2020 13:25:10 +0800 Subject: [PATCH 4/4] Update link-check.yaml --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 6e86b46fd7f41..02697bdb03f04 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -18,7 +18,7 @@ jobs: id: lc uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|http://.*:.*|https://static.googleusercontent.com/media/research.google.com/.*|https://www.crunchbase.com/organization/.*|http://www.brendangregg.com/perf.html.*|.*.md" . + args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|http://.*:.*|https://static.googleusercontent.com/media/research.google.com/.*|https://www.crunchbase.com/organization/.*|http://www.brendangregg.com/.*|.*.md" . - name: Fail if there were external link errors if: ${{ steps.lc.outputs.exit_code }}