From 720df7f89afab0b3cf4ad5857e166b1180d37132 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/3] cherry pick #4135 to release-3.1 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 5a58e96ec2d0d..5ce7a1b8ea3fe 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.1..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 2119fb981f200..9e2c4d696f9df 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 54f47baab2ba7..2884f9a145863 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 2b48a74a9c7dd..7e9e97e8f918c 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 5a56602a735fa..8dc05d7aebdfb 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 d8af94c2217ea54552223bae05c0ae61c6a8dd9e Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 3 Nov 2020 12:51:59 +0800 Subject: [PATCH 2/3] resolve --- .github/workflows/link-check.yaml | 2 +- technical-writing-project-ideas.md | 39 ------------------------------ 2 files changed, 1 insertion(+), 40 deletions(-) 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 }} diff --git a/technical-writing-project-ideas.md b/technical-writing-project-ideas.md index 8dc05d7aebdfb..5a56602a735fa 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 5f0ba6c62a5e372884f7b13f4563a029cd9d16ee Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 3 Nov 2020 13:25:27 +0800 Subject: [PATCH 3/3] 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 }}