Skip to content

Commit 9d6b004

Browse files
authored
docs: Add mdox remote/local link checking and move web preprocess (thanos-io#4357)
* Add mdox remote and local link checking Signed-off-by: Saswata Mukherjee <[email protected]> * Add mdox transform Signed-off-by: Saswata Mukherjee <[email protected]> * Update mdox and config Signed-off-by: Saswata Mukherjee <[email protected]> * Make YAML DRY & fix prev-release Signed-off-by: Saswata Mukherjee <[email protected]> * Localize tip links; Switch to Origin.Path Signed-off-by: Saswata Mukherjee <[email protected]>
1 parent 7a8d189 commit 9d6b004

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+375
-414
lines changed

.bingo/Variables.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ $(JSONNETFMT): $(BINGO_DIR)/jsonnetfmt.mod
8989
@echo "(re)installing $(GOBIN)/jsonnetfmt-v0.17.0"
9090
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=jsonnetfmt.mod -o=$(GOBIN)/jsonnetfmt-v0.17.0 "github.com/google/go-jsonnet/cmd/jsonnetfmt"
9191

92-
MDOX := $(GOBIN)/mdox-v0.2.2-0.20210617084122-22b44c491197
92+
MDOX := $(GOBIN)/mdox-v0.2.2-0.20210810104227-dd2d81061a27
9393
$(MDOX): $(BINGO_DIR)/mdox.mod
9494
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
95-
@echo "(re)installing $(GOBIN)/mdox-v0.2.2-0.20210617084122-22b44c491197"
96-
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=mdox.mod -o=$(GOBIN)/mdox-v0.2.2-0.20210617084122-22b44c491197 "github.com/bwplotka/mdox"
95+
@echo "(re)installing $(GOBIN)/mdox-v0.2.2-0.20210810104227-dd2d81061a27"
96+
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=mdox.mod -o=$(GOBIN)/mdox-v0.2.2-0.20210810104227-dd2d81061a27 "github.com/bwplotka/mdox"
9797

9898
MINIO := $(GOBIN)/minio-v0.0.0-20200527010300-cccf2de129da
9999
$(MINIO): $(BINGO_DIR)/minio.mod

.bingo/mdox.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ go 1.16
44

55
replace github.com/Kunde21/markdownfmt/v2 => github.com/bwplotka/markdownfmt/v2 v2.0.0-20210616121647-559e77044d46
66

7-
require github.com/bwplotka/mdox v0.2.2-0.20210617084122-22b44c491197
7+
require github.com/bwplotka/mdox v0.2.2-0.20210810104227-dd2d81061a27

.bingo/variables.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ JSONNET="${GOBIN}/jsonnet-v0.17.0"
3232

3333
JSONNETFMT="${GOBIN}/jsonnetfmt-v0.17.0"
3434

35-
MDOX="${GOBIN}/mdox-v0.2.2-0.20210617084122-22b44c491197"
35+
MDOX="${GOBIN}/mdox-v0.2.2-0.20210810104227-dd2d81061a27"
3636

3737
MINIO="${GOBIN}/minio-v0.0.0-20200527010300-cccf2de129da"
3838

.mdox.prev-release.yaml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
version: 1
2+
3+
inputDir: "$(OUTPUT_CONTENT_DIR)/$(tags)-git-docs"
4+
outputDir: "$(OUTPUT_CONTENT_DIR)/$(tags)"
5+
extraInputGlobs:
6+
- "CHANGELOG.md"
7+
- "SECURITY.md"
8+
- "MAINTAINERS.md"
9+
- "CONTRIBUTING.md"
10+
- "CODE_OF_CONDUCT.md"
11+
12+
gitIgnored: true
13+
localLinksStyle:
14+
hugo:
15+
indexFileName: "_index.md"
16+
17+
transformations:
18+
19+
- glob: "../../../CHANGELOG.md"
20+
path: /thanos/CHANGELOG.md
21+
frontMatter:
22+
template: |
23+
title: Changelog
24+
type: docs
25+
menu: thanos
26+
lastmod: "{{ .Origin.LastMod }}"
27+
28+
- glob: "../../../MAINTAINERS.md"
29+
path: /thanos/MAINTAINERS.md
30+
frontMatter:
31+
template: |
32+
title: Maintainers
33+
type: docs
34+
menu: thanos
35+
lastmod: "{{ .Origin.LastMod }}"
36+
37+
- glob: "../../../SECURITY.md"
38+
path: /thanos/SECURITY.md
39+
frontMatter:
40+
template: |
41+
title: Security
42+
type: docs
43+
menu: thanos
44+
lastmod: "{{ .Origin.LastMod }}"
45+
46+
- glob: "../../../CODE_OF_CONDUCT.md"
47+
path: /contributing/CODE_OF_CONDUCT.md
48+
frontMatter:
49+
template: |
50+
title: Code of Conduct
51+
type: docs
52+
menu: contributing
53+
lastmod: "{{ .Origin.LastMod }}"
54+
55+
- glob: "../../../CONTRIBUTING.md"
56+
path: /contributing/CONTRIBUTING.md
57+
frontMatter:
58+
template: |
59+
title: Contributing
60+
type: docs
61+
menu: contributing
62+
lastmod: "{{ .Origin.LastMod }}"
63+
64+
- glob: "*.md"
65+
path: /thanos/*

.mdox.validate.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 1
2+
3+
validators:
4+
# Validators to skip checking PR/issue links of Thanos, Prometheus and Cortex.
5+
- regex: '(^http[s]?:\/\/)(www\.)?(github\.com\/)thanos-io\/thanos(\/pull\/|\/issues\/)'
6+
type: 'githubPullsIssues'
7+
- regex: '(^http[s]?:\/\/)(www\.)?(github\.com\/)prometheus\/prometheus(\/pull\/|\/issues\/)'
8+
type: 'githubPullsIssues'
9+
- regex: '(^http[s]?:\/\/)(www\.)?(github\.com\/)cortexproject\/cortex(\/pull\/|\/issues\/)'
10+
type: 'githubPullsIssues'
11+
# Ignore Thanos release links.
12+
- regex: '(^http[s]?:\/\/)(www\.)?(github\.com\/)thanos-io\/thanos(\/releases\/)'
13+
type: 'ignore'
14+
# Causes http stream errors with statuscode 0 sometimes. But is safe to skip.
15+
- regex: 'slack\.cncf\.io'
16+
type: 'ignore'
17+
# 301 errors even when curl-ed.
18+
- regex: 'envoyproxy\.io'
19+
type: 'ignore'

.mdox.yaml

+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
version: 1
2+
3+
inputDir: "docs"
4+
outputDir: "website/docs-pre-processed/tip"
5+
extraInputGlobs:
6+
- "CHANGELOG.md"
7+
- "SECURITY.md"
8+
- "MAINTAINERS.md"
9+
- "CONTRIBUTING.md"
10+
- "CODE_OF_CONDUCT.md"
11+
12+
gitIgnored: true
13+
localLinksStyle:
14+
hugo:
15+
indexFileName: "_index.md"
16+
17+
transformations:
18+
19+
- glob: "../CHANGELOG.md"
20+
path: /thanos/CHANGELOG.md
21+
frontMatter:
22+
template: |
23+
title: Changelog
24+
type: docs
25+
menu: thanos
26+
lastmod: "{{ .Origin.LastMod }}"
27+
backMatter: &docBackMatter
28+
template: |
29+
Found a typo, inconsistency or missing information in our docs?
30+
Help us to improve [Thanos](https://thanos.io) documentation by proposing a fix [on GitHub here](https://github.com/thanos-io/thanos/edit/main/{{ .Origin.Path }}) :heart:
31+
32+
- glob: "../MAINTAINERS.md"
33+
path: /thanos/MAINTAINERS.md
34+
frontMatter:
35+
template: |
36+
title: Maintainers
37+
type: docs
38+
menu: thanos
39+
lastmod: "{{ .Origin.LastMod }}"
40+
backMatter: *docBackMatter
41+
42+
- glob: "../SECURITY.md"
43+
path: /thanos/SECURITY.md
44+
frontMatter:
45+
template: |
46+
title: Security
47+
type: docs
48+
menu: thanos
49+
lastmod: "{{ .Origin.LastMod }}"
50+
backMatter: *docBackMatter
51+
52+
- glob: "../CODE_OF_CONDUCT.md"
53+
path: /contributing/CODE_OF_CONDUCT.md
54+
frontMatter:
55+
template: |
56+
title: Code of Conduct
57+
type: docs
58+
menu: contributing
59+
lastmod: "{{ .Origin.LastMod }}"
60+
backMatter: *docBackMatter
61+
62+
- glob: "../CONTRIBUTING.md"
63+
path: /contributing/CONTRIBUTING.md
64+
frontMatter:
65+
template: |
66+
title: Contributing
67+
type: docs
68+
menu: contributing
69+
lastmod: "{{ .Origin.LastMod }}"
70+
backMatter: *docBackMatter
71+
72+
- glob: "**/README.md"
73+
path: _index.md
74+
frontMatter: &justTitleFrontMatter
75+
template: |
76+
title: "{{ .Origin.FirstHeader }}"
77+
backMatter: *docBackMatter
78+
79+
- glob: "getting-started.md"
80+
path: /thanos/getting-started.md
81+
popHeader: false
82+
frontMatter: &weightOneFrontMatter
83+
template: |
84+
type: docs
85+
title: "{{ .Origin.FirstHeader }}"
86+
menu: thanos
87+
weight: 1
88+
lastmod: "{{ .Origin.LastMod }}"
89+
backMatter: *docBackMatter
90+
91+
- glob: "quick-tutorial.md"
92+
path: /thanos/quick-tutorial.md
93+
popHeader: false
94+
frontMatter: *weightOneFrontMatter
95+
backMatter: *docBackMatter
96+
97+
- glob: "proposals-*/README.md"
98+
path: /proposals-*/_index.md
99+
frontMatter: *justTitleFrontMatter
100+
backMatter: *docBackMatter
101+
102+
- glob: "README.md"
103+
path: /thanos/_index.md
104+
frontMatter: *justTitleFrontMatter
105+
backMatter: *docBackMatter
106+
107+
- glob: "*.md"
108+
path: /thanos/*
109+
popHeader: false
110+
frontMatter:
111+
template: |
112+
type: docs
113+
title: "{{ .Origin.FirstHeader }}"
114+
menu: thanos
115+
lastmod: "{{ .Origin.LastMod }}"
116+
backMatter: *docBackMatter
117+
118+
- glob: "operating/*.md"
119+
path: /operating/*
120+
frontMatter:
121+
template: |
122+
type: docs
123+
title: "{{ .Origin.FirstHeader }}"
124+
menu: operating
125+
lastmod: "{{ .Origin.LastMod }}"
126+
backMatter: *docBackMatter
127+
128+
- glob: "contributing/*.md"
129+
path: /contributing/*
130+
frontMatter:
131+
template: |
132+
type: docs
133+
title: "{{ .Origin.FirstHeader }}"
134+
menu: contributing
135+
lastmod: "{{ .Origin.LastMod }}"
136+
backMatter: *docBackMatter
137+
138+
- glob: "components/*.md"
139+
path: /components/*
140+
frontMatter:
141+
template: |
142+
type: docs
143+
title: "{{ .Origin.FirstHeader }}"
144+
menu: components
145+
lastmod: "{{ .Origin.LastMod }}"
146+
backMatter: *docBackMatter

CHANGELOG.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
263263

264264
Highlights:
265265

266-
- New Thanos component, [Query Frontend](https://thanos.io/tip/components/query-frontend.md/) has more options and supports shared cache (currently: Memcached).
266+
- New Thanos component, [Query Frontend](docs/components/query-frontend.md) has more options and supports shared cache (currently: Memcached).
267267
- Added debug mode in Thanos UI that allows to filter Stores to query from by their IPs from Store page (!). This helps enormously in e.g debugging the slowest store etc. All raw Thanos API allows passing `storeMatch[]` arguments with `__address__` matchers.
268268
- Improved debuggability on all Thanos components by exposing [off-CPU profiles thanks to fgprof endpoint](https://github.com/felixge/fgprof).
269269
- Significantly improved sidecar latency and CPU usage for metrics fetches.
@@ -302,7 +302,7 @@ Highlights:
302302

303303
Highlights:
304304

305-
- Added new Thanos component: [Query Frontend](https://thanos.io/v0.15/components/query-frontend/) responsible for response caching, query scheduling and parallelization (based on Cortex Query Frontend).
305+
- Added new Thanos component: [Query Frontend](https://thanos.io/v0.15/components/query-frontend.md/) responsible for response caching, query scheduling and parallelization (based on Cortex Query Frontend).
306306
- Added various new, improved UIs to Thanos based on React: Querier BuildInfo & Flags, Ruler UI, BlockViewer.
307307
- Optimized Sidecar, Store, Receive, Ruler data retrieval with new TSDB ChunkIterator (capping chunks to 120 samples), which fixed various leaks.
308308
- Fixed sample limit on Store Gateway.
@@ -344,7 +344,7 @@ Highlights:
344344
- [#2973](https://github.com/thanos-io/thanos/pull/2973) Add Thanos Query Frontend component.
345345
- [#2980](https://github.com/thanos-io/thanos/pull/2980) Bucket Viewer: Migrate block viewer to React.
346346
- [#2725](https://github.com/thanos-io/thanos/pull/2725) Add bucket index operation durations: `thanos_bucket_store_cached_series_fetch_duration_seconds` and `thanos_bucket_store_cached_postings_fetch_duration_seconds`.
347-
- [#2931](https://github.com/thanos-io/thanos/pull/2931) Query: Allow passing a `storeMatch[]` to select matching stores when debugging the querier. See [documentation](https://thanos.io/tip/components/query.md/#store-filtering)
347+
- [#2931](https://github.com/thanos-io/thanos/pull/2931) Query: Allow passing a `storeMatch[]` to select matching stores when debugging the querier. See [documentation](docs/components/query.md#store-filtering)
348348

349349
### Changed
350350

@@ -422,7 +422,7 @@ sse_config:
422422
### Changed
423423

424424
- [#2194](https://github.com/thanos-io/thanos/pull/2194) Updated to golang v1.14.2.
425-
- [#2505](https://github.com/thanos.io/thanos/pull/2505) Store: Removed obsolete `thanos_store_node_info` metric.
425+
- [#2505](https://github.com/thanos-io/thanos/pull/2505) Store: Removed obsolete `thanos_store_node_info` metric.
426426
- [#2513](https://github.com/thanos-io/thanos/pull/2513) Tools: Moved `thanos bucket` commands to `thanos tools bucket`, also moved `thanos check rules` to `thanos tools rules-check`. `thanos tools rules-check` also takes rules by `--rules` repeated flag not argument anymore.
427427
- [#2548](https://github.com/thanos-io/thanos/pull/2548/commits/53e69bd89b2b08c18df298eed7d90cb7179cc0ec) Store, Querier: remove duplicated chunks on StoreAPI.
428428
- [#2596](https://github.com/thanos-io/thanos/pull/2596) Updated Prometheus dependency to [@cd73b3d33e064bbd846fc7a26dc8c313d46af382](https://github.com/prometheus/prometheus/commit/cd73b3d33e064bbd846fc7a26dc8c313d46af382) which falls in between v2.17.0 and v2.18.0.
@@ -468,7 +468,7 @@ sse_config:
468468

469469
### Added
470470

471-
- [#2252](https://github.com/thanos-io/thanos/pull/2252) Query: add new `--store-strict` flag. More information available [here](/docs/proposals/202001_thanos_query_health_handling.md).
471+
- [#2252](https://github.com/thanos-io/thanos/pull/2252) Query: add new `--store-strict` flag. More information available [here](docs/proposals-done/202001-thanos-query-health-handling.md).
472472
- [#2265](https://github.com/thanos-io/thanos/pull/2265) Compact: add `--wait-interval` to specify compaction wait interval between consecutive compact runs when `--wait` is enabled.
473473
- [#2250](https://github.com/thanos-io/thanos/pull/2250) Compact: enable vertical compaction for offline deduplication (experimental). Uses `--deduplication.replica-label` flag to specify the replica label on which to deduplicate (hidden). Please note that this uses a NAIVE algorithm for merging (no smart replica deduplication, just chaining samples together). This works well for deduplication of blocks with **precisely the same samples** like those produced by Receiver replication. We plan to add a smarter algorithm in the following weeks.
474474
- [#1714](https://github.com/thanos-io/thanos/pull/1714) Compact: the compact component now exposes the bucket web UI when it is run as a long-lived process.
@@ -507,7 +507,7 @@ sse_config:
507507
### Added
508508

509509
- [#2003](https://github.com/thanos-io/thanos/pull/2003) Query: Support downsampling for /series.
510-
- [#1952](https://github.com/thanos-io/thanos/pull/1952) Store Gateway: Implemented [binary index header](https://thanos.io/tip/proposals/201912_thanos_binary_index_header.md/). This significantly reduces resource consumption (memory, CPU, net bandwidth) for startup and data loading processes as well as baseline memory. This means that adding more blocks into object storage, without querying them will use almost no resources. This, however, **still means that querying large amounts of data** will result in high spikes of memory and CPU use as before, due to simply fetching large amounts of metrics data. Since we fixed baseline, we are now focusing on query performance optimizations in separate initiatives. To enable experimental `index-header` mode run store with hidden `experimental.enable-index-header` flag.
510+
- [#1952](https://github.com/thanos-io/thanos/pull/1952) Store Gateway: Implemented [binary index header](docs/proposals-done/201912-thanos-binary-index-header.md). This significantly reduces resource consumption (memory, CPU, net bandwidth) for startup and data loading processes as well as baseline memory. This means that adding more blocks into object storage, without querying them will use almost no resources. This, however, **still means that querying large amounts of data** will result in high spikes of memory and CPU use as before, due to simply fetching large amounts of metrics data. Since we fixed baseline, we are now focusing on query performance optimizations in separate initiatives. To enable experimental `index-header` mode run store with hidden `experimental.enable-index-header` flag.
511511
- [#2009](https://github.com/thanos-io/thanos/pull/2009) Store Gateway: Minimum age of all blocks before they are being read. Set it to a safe value (e.g 30m) if your object storage is eventually consistent. GCS and S3 are (roughly) strongly consistent.
512512
- [#1963](https://github.com/thanos-io/thanos/pull/1963) Mixin: Add Thanos Ruler alerts.
513513
- [#1984](https://github.com/thanos-io/thanos/pull/1984) Query: Add cache-control header to not cache on error.
@@ -856,7 +856,7 @@ This version moved tarballs to Golang 1.12.5 from 1.11 as well, so same warning
856856

857857
:warning: **IMPORTANT** :warning: This is the last release that supports gossip. From Thanos v0.5.0, gossip will be completely removed.
858858

859-
This release also disables gossip mode by default for all components. See [this](docs/proposals/201809_gossip-removal.md) for more details.
859+
This release also disables gossip mode by default for all components. See [this](docs/proposals-done/201809-gossip-removal.md) for more details.
860860

861861
:warning: This release moves Thanos docker images (NOT artifacts by accident) to Golang 1.12. This release includes change in GC's memory release which gives following effect:
862862

@@ -1009,7 +1009,7 @@ New Store tracing span: \* `store_query_gate_ismyturn` shows how long it took fo
10091009

10101010
- Support for gzip compressed configuration files before envvar substitution for reloader package.
10111011
- `bucket inspect` command for better insights on blocks in object storage.
1012-
- Support for [Tencent COS](docs/storage.md#tencent-cos-configuration) object storage.
1012+
- Support for [Tencent COS](docs/storage.md#tencent-cos) object storage.
10131013
- Partial Response disable option for StoreAPI and QueryAPI.
10141014
- Partial Response disable button on Thanos UI
10151015
- We have initial docs for goDoc documentation!
@@ -1130,7 +1130,7 @@ Note lots of necessary breaking changes in flags that relates to bucket configur
11301130

11311131
## [v0.1.0](https://github.com/thanos-io/thanos/releases/tag/v0.1.0) - 2018.09.14
11321132

1133-
Initial version to have a stable reference before [gossip protocol removal](/docs/proposals/201809_gossip-removal.md).
1133+
Initial version to have a stable reference before [gossip protocol removal](docs/proposals-done/201809-gossip-removal.md).
11341134

11351135
### Added
11361136

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If you encounter a security vulnerability, please refer to [Reporting a Vulnerab
2929

3030
When contributing a complex change to Thanos repository, please discuss the change you wish to make within a Github issue, in Slack, or by another method with the owners of this repository before making the change.
3131

32-
Adding a large new feature or/and component to Thanos should be done by first creating a [proposal](docs/contributing/proposal-process.md) document outlining the design decisions of the change, motivations for the change, and any alternatives that might have been considered.
32+
Adding a large new feature or/and component to Thanos should be done by first creating a [proposal](docs/proposals-done) document outlining the design decisions of the change, motivations for the change, and any alternatives that might have been considered.
3333

3434
## General Naming
3535

MAINTAINERS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Self explanatory ones:
8686

8787
## Storage plugins maintainers
8888

89-
Maintainers of bucket storage clients are available [here](/docs/storage.md#implementations)
89+
Maintainers of bucket storage clients are available [here](docs/storage.md#supported-clients)
9090

9191
## How to be maintainer?
9292

0 commit comments

Comments
 (0)