Skip to content

Commit 6c33b8b

Browse files
committed
docs: update redirecting documentation links
The link checker (lychee, --accept=200,403,429) rejects 3xx responses, and several documentation links now permanently redirect: - opensearch.org/docs/... moved to docs.opensearch.org/... (the docs site migrated to its own subdomain) - opensearch.org/downloads.html#opensearch -> opensearch.org/downloads/ - opensearch.org/samples/docker-compose.yml -> the current wp-content path - discuss.opendistrocommunity.dev/c/clients/ -> forum.opensearch.org/c/clients/60 Point each link at the final 200 target so the checker passes without following redirects. Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent ed7ea7a commit 6c33b8b

13 files changed

Lines changed: 66 additions & 20 deletions

.github/workflows/links.yml

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,58 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
12-
- name: lychee Link Checker
13-
id: lychee
12+
13+
# Blocking: fail the build only on genuinely broken links (4xx/5xx,
14+
# DNS failures, timeouts). Redirects are accepted here so a moved link
15+
# does not break CI on its own -- the pass below surfaces those.
16+
- name: Check for broken links
17+
id: lychee-broken
1418
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
1519
with:
16-
args: --accept=200,403,429 --max-retries=3 --retry-wait-time=10 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "https://opensearch-domain.region.com/" --exclude "https://github.com/\[your*" --exclude "https://localhost:9200" --exclude "https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg"
20+
args: --accept=200,206,301,302,307,308,403,429 --max-retries=3 --retry-wait-time=10 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "https://opensearch-domain.region.com/" --exclude "https://github.com/\[your*" --exclude "https://localhost:9200" --exclude "https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg"
21+
fail: true
22+
jobSummary: true
23+
env:
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
25+
26+
# Non-blocking: surface permanent redirects (301/308) so their links can
27+
# be updated to point at the final destination. --max-redirects=0 makes
28+
# lychee report the redirect status instead of following it; 302/307 stay
29+
# accepted because temporary redirects are not a signal to rewrite a link.
30+
# LICENSE.txt/NOTICE.txt are excluded here: their URLs are canonical
31+
# license text and standard attribution wording, not links to rewrite.
32+
# fail:false + if:always() so this always reports without breaking CI.
33+
- name: Check for permanently-redirecting links
34+
id: lychee-redirects
35+
if: always()
36+
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
37+
with:
38+
args: --accept=200,206,302,307,403,429 --max-redirects=0 --max-retries=3 --retry-wait-time=10 --exclude-path LICENSE.txt --exclude-path NOTICE.txt "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "https://opensearch-domain.region.com/" --exclude "https://github.com/\[your*" --exclude "https://localhost:9200" --exclude "https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg"
39+
fail: false
40+
jobSummary: true
41+
output: lychee/redirects.md
42+
env:
43+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
44+
45+
# Turn each redirect the pass above found into a PR annotation, so a moved
46+
# link shows up inline on the PR (Files changed + checks summary) instead
47+
# of only in the run's job summary. Never fails the build.
48+
- name: Annotate redirecting links
49+
if: always()
50+
run: |
51+
report="lychee/redirects.md"
52+
[ -f "$report" ] || { echo "no redirect report found; nothing to annotate"; exit 0; }
53+
awk '
54+
/^### Errors in / { file=$0; sub(/^### Errors in /, "", file); next }
55+
/^\* \[30[0-9]\]/ {
56+
url=$0; sub(/^[^<]*</, "", url); sub(/>.*/, "", url)
57+
code=$0; sub(/^\* \[/, "", code); sub(/\].*/, "", code)
58+
line=""; col=""; tmp=$0
59+
if (sub(/^.*\(at /, "", tmp) && match(tmp, /^[0-9]+:[0-9]+/)) {
60+
pos=substr(tmp, 1, RLENGTH); split(pos, a, ":"); line=a[1]; col=a[2]
61+
}
62+
printf "::warning file=%s,line=%s,col=%s,title=Redirecting link::%s redirects (%s) -- update to its final destination\n", file, line, col, url, code
63+
}
64+
' "$report"
1765
env:
1866
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19-
- name: Fail if there were link errors
20-
run: exit ${{ steps.lychee.outputs.exit_code }}

ADMINS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This document explains who the admins are (see below), what they do in this repo
2121

2222
## Admin Responsibilities
2323

24-
As an admin you own stewartship of the repository and its settings. Admins have [admin-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and protect the repository as follows.
24+
As an admin you own stewartship of the repository and its settings. Admins have [admin-level permissions on a repository](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization). Use those privileges to serve the community and protect the repository as follows.
2525

2626
### Prioritize Security
2727

COMPATIBILITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Compatibility with OpenSearch
55

6-
The below matrix shows the compatibility of the [`opensearch-go`](https://pkg.go.dev/github.com/opensearch-project/opensearch-go) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch). Version ranges are inclusive of both endpoints.
6+
The below matrix shows the compatibility of the [`opensearch-go`](https://pkg.go.dev/github.com/opensearch-project/opensearch-go) with versions of [`OpenSearch`](https://opensearch.org/downloads/). Version ranges are inclusive of both endpoints.
77

88
| Client Version | OpenSearch Version |
99
| -------------- | ------------------ |
@@ -20,4 +20,4 @@ Starting with 5.x, the officially supported (CI-tested) set tracks the OpenSearc
2020

2121
## Upgrading
2222

23-
Major versions of OpenSearch introduce breaking changes that require careful upgrades of the client. While `opensearch-go-client` 2.0.0 works against the latest OpenSearch 1.x, certain deprecated features removed in OpenSearch 2.0 have also been removed from the client. Please refer to the [OpenSearch documentation](https://opensearch.org/docs/latest/clients/index/) for more information.
23+
Major versions of OpenSearch introduce breaking changes that require careful upgrades of the client. While `opensearch-go-client` 2.0.0 works against the latest OpenSearch 1.x, certain deprecated features removed in OpenSearch 2.0 have also been removed from the client. Please refer to the [OpenSearch documentation](https://docs.opensearch.org/latest/clients/index/) for more information.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ OpenSearch is an open source product released under the Apache 2.0 license (see
4545

4646
We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.
4747

48-
The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).
48+
The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](https://developercertificate.org/).
4949

5050
```
5151
Developer's Certificate of Origin 1.1

DEVELOPER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ OpenSearch Go Client builds using [Go](https://go.dev/doc/install) 1.24 at a min
6161

6262
#### Docker
6363

64-
[Docker](https://docs.docker.com/get-docker/) is required for building some OpenSearch artifacts and executing integration tests.
64+
[Docker](https://docs.docker.com/get-started/get-docker/) is required for building some OpenSearch artifacts and executing integration tests.
6565

6666
#### Windows
6767

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Go Reference](https://pkg.go.dev/badge/github.com/opensearch-project/opensearch-go.svg)](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v5) [![Build](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml) [![Unit](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml) [![Integration](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml) [![codecov](https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg?token=MI9g3KYHVx)](https://codecov.io/gh/opensearch-project/opensearch-go) [![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/clients/) ![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
1+
[![Go Reference](https://pkg.go.dev/badge/github.com/opensearch-project/opensearch-go.svg)](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v5) [![Build](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml) [![Unit](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml) [![Integration](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml) [![codecov](https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg?token=MI9g3KYHVx)](https://app.codecov.io/gh/opensearch-project/opensearch-go) [![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://forum.opensearch.org/c/clients/60) ![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
22

33
![OpenSearch logo](OpenSearch.svg)
44

@@ -132,9 +132,9 @@ Next steps:
132132
- [Developer Guide](DEVELOPER_GUIDE.md)
133133
- [User Guide](USER_GUIDE.md)
134134
- [Upgrade Tool (`osapifix`)](cmd/osapifix/README.md)
135-
- [Documentation](https://opensearch.org/docs/latest/clients/go/)
135+
- [Documentation](https://docs.opensearch.org/latest/clients/go/)
136136
- [API Documentation](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v5)
137-
- Need help? Try [Forums](https://discuss.opendistrocommunity.dev/c/clients/)
137+
- Need help? Try [Forums](https://forum.opensearch.org/c/clients/60)
138138
- [Project Principles](https://opensearch.org/#principles)
139139
- [Contributing to OpenSearch](CONTRIBUTING.md)
140140
- [Maintainer Responsibilities](MAINTAINERS.md)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## Reporting a Vulnerability
22

3-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.
3+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.

USER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Before starting, we strongly recommend reading the full AWS documentation regard
231231
232232
Import the request signer from `signer/awsv2`. It signs each request with AWS Signature Version 4 (SigV4) using AWS SDK for Go v2 and automatically discovers AWS credentials from the `~/.aws` folder or environment variables.
233233

234-
To read more about SigV4 see [Signature Version 4 signing process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
234+
To read more about SigV4 see [Signature Version 4 signing process](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html)
235235

236236
The signer caches credentials so SigV4 signing does not call `Credentials.Retrieve` on every request, which matters most for STS-backed providers (assume-role, web identity, IRSA).
237237

guides/indexing-index_lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This guide covers OpenSearch Golang Client API actions for Index Lifecycle. You'
88

99
## Setup
1010

11-
In this guide, we will need an OpenSearch cluster with more than one node. Let's use the sample [docker-compose.yml](https://opensearch.org/samples/docker-compose.yml) to start a cluster with two nodes. The cluster's API will be available at `localhost:9200` with basic authentication enabled with default username and password of `admin:< admin password >`.
11+
In this guide, we will need an OpenSearch cluster with more than one node. Let's use the sample [docker-compose.yml](https://opensearch.org/wp-content/uploads/2025/02/docker-compose.yml) to start a cluster with two nodes. The cluster's API will be available at `localhost:9200` with basic authentication enabled with default username and password of `admin:< admin password >`.
1212

1313
To start the cluster, run the following command:
1414

guides/transport-observer_metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ http.Handle("/metrics", promhttp.HandlerFor(promReg, promhttp.HandlerOpts{}))
7878

7979
### Shipped metrics
8080

81-
`osprom` ships two sinks covering the [RED](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services/) (Rate, Errors, Duration -- request-level health) and [USE](https://www.brendangregg.com/usemethod.html) (Utilization, Saturation, Errors -- resource health) methods. `NewRequestObserver` (RED) records request rate, errors, and duration labeled by `method`, status class (`2xx`/`3xx`/`4xx`/`5xx`, `error`, `unknown`), and `mode` (`request` for full-read, `stream` for time-to-first-byte); `NewPoolObserver` (USE) records connection-pool utilization, saturation, and errors from lifecycle events. See [`osprom/README.md`](../osprom/README.md) for the full metric list. Each sink receives the full transport event, so a custom `Observer` can label by route, index, or pool; the shipped ones stay deliberately low-cardinality. Tune the histogram buckets with `osprom.WithDurationBuckets` / `osprom.WithSizeBuckets`.
81+
`osprom` ships two sinks covering the [RED](https://grafana.com/blog/the-red-method-how-to-instrument-your-services/) (Rate, Errors, Duration -- request-level health) and [USE](https://www.brendangregg.com/usemethod.html) (Utilization, Saturation, Errors -- resource health) methods. `NewRequestObserver` (RED) records request rate, errors, and duration labeled by `method`, status class (`2xx`/`3xx`/`4xx`/`5xx`, `error`, `unknown`), and `mode` (`request` for full-read, `stream` for time-to-first-byte); `NewPoolObserver` (USE) records connection-pool utilization, saturation, and errors from lifecycle events. See [`osprom/README.md`](../osprom/README.md) for the full metric list. Each sink receives the full transport event, so a custom `Observer` can label by route, index, or pool; the shipped ones stay deliberately low-cardinality. Tune the histogram buckets with `osprom.WithDurationBuckets` / `osprom.WithSizeBuckets`.
8282

8383
### Custom sinks
8484

0 commit comments

Comments
 (0)