Point stale docs.sourcegraph.com links at sourcegraph.com/docs - #1364
Point stale docs.sourcegraph.com links at sourcegraph.com/docs#1364bahrmichael wants to merge 1 commit into
Conversation
keegancsmith
left a comment
There was a problem hiding this comment.
Approving to unblock. I checked all nine distinct rewritten URLs in a browser: five reach the intended docs pages, while four render the docs site’s soft-404 page despite returning HTTP 200. I left non-blocking inline notes on those four links.
| This script intentionally uses your currently exported `SRC_*` environment variables, is not hooked up to CI, and is meant for manual regression checks (for example, to catch issues like `src users list` failing unexpectedly). | ||
|
|
||
| We adhere to the [general Sourcegraph principles for testing](https://docs.sourcegraph.com/dev/background-information/testing_principles), as well as [the Go specific directions](https://docs.sourcegraph.com/dev/background-information/languages/testing_go_code), at least to the extent they apply to a standalone tool like `src`. | ||
| We adhere to the [general Sourcegraph principles for testing](https://sourcegraph.com/docs/dev/background-information/testing_principles), as well as [the Go specific directions](https://sourcegraph.com/docs/dev/background-information/languages/testing_go_code), at least to the extent they apply to a standalone tool like `src`. |
There was a problem hiding this comment.
Non-blocking: both rewritten testing links render Page not found (the docs site returns HTTP 200 for its soft-404 page). I couldn’t find replacement testing pages in the current docs repo, so these should be removed or replaced in a follow-up.
| To disable this and _only_ send the version, you can set `-user-agent-telemetry=false` for a single command, or set the `SRC_DISABLE_USER_AGENT_TELEMETRY` environment variable to any non-blank string. | ||
|
|
||
| As with [other Sourcegraph telemetry](https://docs.sourcegraph.com/dev/background-information/telemetry), any collected data is only sent to Sourcegraph.com in aggregate form. | ||
| As with [other Sourcegraph telemetry](https://sourcegraph.com/docs/dev/background-information/telemetry), any collected data is only sent to Sourcegraph.com in aggregate form. |
There was a problem hiding this comment.
Non-blocking: this URL renders Page not found. https://sourcegraph.com/docs/admin/telemetry is live and appears to be the current telemetry documentation.
| } else { | ||
| // NOTE: This header is required to authenticate our session with a session cookie, see: | ||
| // https://docs.sourcegraph.com/dev/security/csrf_security_model#authentication-in-api-endpoints | ||
| // https://sourcegraph.com/docs/dev/security/csrf_security_model#authentication-in-api-endpoints |
There was a problem hiding this comment.
Non-blocking: this page (and therefore the anchor) renders Page not found. Please remove the stale reference or replace it with a current security/API doc in a follow-up.
|
Thanks @keegancsmith ! I'll go through those tomorrow :) |
docs.sourcegraph.comis no longer the docs host. This rewrites the remaining absolute references to theirsourcegraph.com/docsequivalents.The rewrite is purely mechanical — only the host portion changes (
docs.sourcegraph.com/<path>becomessourcegraph.com/docs/<path>). Paths that were reorganised since (for exampleadmin/observability/tracingandbatch_changes/references/troubleshooting) are already covered by permanent redirects in the docs site's redirect map, so the rewritten links resolve.In
src-cli,CHANGELOG.mdis deliberately left alone: those entries are a historical record. In the docs repo the change is scoped todocs/cli/references/**, which is generated fromsrc-clibysrc doc— the companionsrc-clichangeset fixes the generator's source strings so the docs stay correct after the next regeneration.Created by a Sourcegraph agentic batch change.