Skip to content

Commit b6c6e6f

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 b6c6e6f

5 files changed

Lines changed: 32 additions & 12 deletions

File tree

.github/workflows/links.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,32 @@ 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
18+
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
19+
with:
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+
# fail:false + if:always() so this always reports without breaking CI.
31+
- name: Report permanently-redirecting links (non-blocking)
32+
id: lychee-redirects
33+
if: always()
1434
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
1535
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"
36+
args: --accept=200,206,302,307,403,429 --max-redirects=0 --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"
37+
fail: false
38+
jobSummary: true
1739
env:
1840
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19-
- name: Fail if there were link errors
20-
run: exit ${{ steps.lychee.outputs.exit_code }}

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.

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://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)

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/usage-search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ You can also search for documents that match a specific query. The following exa
165165
fmt.Printf("Search Response:\n%s\n", string(respAsJson))
166166
```
167167
168-
OpenSearch query DSL allows you to specify complex queries. Check out the [OpenSearch query DSL documentation](https://opensearch.org/docs/latest/query-dsl/) for more information.
168+
OpenSearch query DSL allows you to specify complex queries. Check out the [OpenSearch query DSL documentation](https://docs.opensearch.org/latest/query-dsl/) for more information.
169169
170170
### Basic Pagination
171171

0 commit comments

Comments
 (0)