docs: fix broken links (#16179)

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Cian Johnston <cian@coder.com>
This commit is contained in:
Edward Angert
2025-01-17 13:18:48 -05:00
committed by GitHub
co-authored by EdwardAngert Cian Johnston
parent f34e6fd92c
commit 4f438e71cf
6 changed files with 46 additions and 30 deletions
+1
View File
@@ -19,5 +19,6 @@ ignorePatterns:
- pattern: "code.visualstudio.com"
- pattern: "www.emacswiki.org"
- pattern: "linux.die.net/man"
- pattern: "www.gnu.org"
aliveStatusCodes:
- 200
+3 -3
View File
@@ -79,7 +79,7 @@ func (m Message) String() string {
return sb.String()
}
// URL returns a link to the admin/healthcheck docs page for the given Message.
// URL returns a link to the admin/monitoring/health-check docs page for the given Message.
// NOTE: if using a custom docs URL, specify base.
func (m Message) URL(base string) string {
var codeAnchor string
@@ -91,11 +91,11 @@ func (m Message) URL(base string) string {
if base == "" {
base = docsURLDefault
return fmt.Sprintf("%s/admin/healthcheck#%s", base, codeAnchor)
return fmt.Sprintf("%s/admin/monitoring/health-check#%s", base, codeAnchor)
}
// We don't assume that custom docs URLs are versioned.
return fmt.Sprintf("%s/admin/healthcheck#%s", base, codeAnchor)
return fmt.Sprintf("%s/admin/monitoring/health-check#%s", base, codeAnchor)
}
// Code is a stable identifier used to link to documentation.
+3 -3
View File
@@ -17,9 +17,9 @@ func Test_MessageURL(t *testing.T) {
base string
expected string
}{
{"empty", "", "", "https://coder.com/docs/admin/healthcheck#eunknown"},
{"default", health.CodeAccessURLFetch, "", "https://coder.com/docs/admin/healthcheck#eacs03"},
{"custom docs base", health.CodeAccessURLFetch, "https://example.com/docs", "https://example.com/docs/admin/healthcheck#eacs03"},
{"empty", "", "", "https://coder.com/docs/admin/monitoring/health-check#eunknown"},
{"default", health.CodeAccessURLFetch, "", "https://coder.com/docs/admin/monitoring/health-check#eacs03"},
{"custom docs base", health.CodeAccessURLFetch, "https://example.com/docs", "https://example.com/docs/admin/monitoring/health-check#eacs03"},
} {
tt := tt
t.Run(tt.name, func(t *testing.T) {
+36 -11
View File
@@ -41,22 +41,22 @@ func TestSummarize(t *testing.T) {
expected := []string{
"Access URL: Error: test error",
"Access URL: Warn: TEST: testing",
"See: https://coder.com/docs/admin/healthcheck#test",
"See: https://coder.com/docs/admin/monitoring/health-check#test",
"Database: Error: test error",
"Database: Warn: TEST: testing",
"See: https://coder.com/docs/admin/healthcheck#test",
"See: https://coder.com/docs/admin/monitoring/health-check#test",
"DERP: Error: test error",
"DERP: Warn: TEST: testing",
"See: https://coder.com/docs/admin/healthcheck#test",
"See: https://coder.com/docs/admin/monitoring/health-check#test",
"Provisioner Daemons: Error: test error",
"Provisioner Daemons: Warn: TEST: testing",
"See: https://coder.com/docs/admin/healthcheck#test",
"See: https://coder.com/docs/admin/monitoring/health-check#test",
"Websocket: Error: test error",
"Websocket: Warn: TEST: testing",
"See: https://coder.com/docs/admin/healthcheck#test",
"See: https://coder.com/docs/admin/monitoring/health-check#test",
"Workspace Proxies: Error: test error",
"Workspace Proxies: Warn: TEST: testing",
"See: https://coder.com/docs/admin/healthcheck#test",
"See: https://coder.com/docs/admin/monitoring/health-check#test",
}
actual := hr.Summarize("")
assert.Equal(t, expected, actual)
@@ -66,6 +66,7 @@ func TestSummarize(t *testing.T) {
name string
br healthsdk.BaseReport
pfx string
docsURL string
expected []string
}{
{
@@ -93,9 +94,9 @@ func TestSummarize(t *testing.T) {
expected: []string{
"Error: testing",
"Warn: TEST01: testing one",
"See: https://coder.com/docs/admin/healthcheck#test01",
"See: https://coder.com/docs/admin/monitoring/health-check#test01",
"Warn: TEST02: testing two",
"See: https://coder.com/docs/admin/healthcheck#test02",
"See: https://coder.com/docs/admin/monitoring/health-check#test02",
},
},
{
@@ -117,16 +118,40 @@ func TestSummarize(t *testing.T) {
expected: []string{
"TEST: Error: testing",
"TEST: Warn: TEST01: testing one",
"See: https://coder.com/docs/admin/healthcheck#test01",
"See: https://coder.com/docs/admin/monitoring/health-check#test01",
"TEST: Warn: TEST02: testing two",
"See: https://coder.com/docs/admin/healthcheck#test02",
"See: https://coder.com/docs/admin/monitoring/health-check#test02",
},
},
{
name: "custom docs url",
br: healthsdk.BaseReport{
Error: ptr.Ref("testing"),
Warnings: []health.Message{
{
Code: "TEST01",
Message: "testing one",
},
{
Code: "TEST02",
Message: "testing two",
},
},
},
docsURL: "https://my.coder.internal/docs",
expected: []string{
"Error: testing",
"Warn: TEST01: testing one",
"See: https://my.coder.internal/docs/admin/monitoring/health-check#test01",
"Warn: TEST02: testing two",
"See: https://my.coder.internal/docs/admin/monitoring/health-check#test02",
},
},
} {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
actual := tt.br.Summarize(tt.pfx, "")
actual := tt.br.Summarize(tt.pfx, tt.docsURL)
if len(tt.expected) == 0 {
assert.Empty(t, actual)
return
+1 -1
View File
@@ -24,7 +24,7 @@ workspaces using Coder's [JFrog Xray Integration](https://github.com/coder/coder
1. Create a JFrog Platform [Access Token](https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens) with a user that has the `read` [permission](https://jfrog.com/help/r/jfrog-platform-administration-documentation/permissions)
for the repositories you want to scan.
1. Create a Coder [token](../../reference/cli/tokens_create.md#tokens-create) with a user that has the [`owner`](../users#roles) role.
1. Create a Coder [token](../../reference/cli/tokens_create.md#tokens-create) with a user that has the [`owner`](../users/index.md#roles) role.
1. Create Kubernetes secrets for the JFrog Xray and Coder tokens.
+2 -12
View File
@@ -344,9 +344,6 @@ the IDE can be baked into the container image and manually open Gateway (or
IntelliJ which has Gateway built-in), using a session token to Coder and then
open the IDE.
- [IntelliJ IDEA](https://github.com/sharkymark/v2-templates/tree/main/src/pod-idea)
- [IntelliJ IDEA with Icon](https://github.com/sharkymark/v2-templates/tree/main/src/pod-idea-icon)
## What options do I have for adding VS Code extensions into code-server, VS Code Desktop or Microsoft's Code Server?
Coder has an open-source project called
@@ -357,20 +354,13 @@ Artifactory.
- [Blog post](https://coder.com/blog/running-a-private-vs-code-extension-marketplace)
- [OSS project](https://github.com/coder/code-marketplace)
[See this example template](https://github.com/sharkymark/v2-templates/blob/main/src/code-marketplace/main.tf#L229C1-L232C12)
where the agent specifies the URL and config environment variables which
code-server picks up and points the developer to.
Another option is to use Microsoft's code-server - which is like Coder's, but it
You can also use Microsoft's code-server - which is like Coder's, but it
can connect to Microsoft's extension marketplace so Copilot and chat can be
retrieved there.
Another option is to use VS Code Desktop (local) and that connects to
Microsoft's marketplace.
> Note: these are example templates with no SLAs on them and are not guaranteed
> for long-term support.
## I want to run Docker for my workspaces but not install Docker Desktop
[Colima](https://github.com/abiosoft/colima) is a Docker Desktop alternative.
@@ -404,7 +394,7 @@ colima start --arch x86_64 --cpu 4 --memory 8 --disk 10
Colima will show the path to the docker socket so we have a
[community template](https://github.com/sharkymark/v2-templates/tree/main/src/docker-code-server)
that prompts the Coder admin to enter the docker socket as a Terraform variable.
that prompts the Coder admin to enter the Docker socket as a Terraform variable.
## How to make a `coder_app` optional?