Docs: update links to point to new site (#60381)

We have a number of docs links in the product that point to the old doc site. 

Method:
- Search the repo for `docs.sourcegraph.com`
- Exclude the `doc/` dir, all test fixtures, and `CHANGELOG.md`
- For each, replace `docs.sourcegraph.com` with `sourcegraph.com/docs`
- Navigate to the resulting URL ensuring it's not a dead link, updating the URL if necessary

Many of the URLs updated are just comments, but since I'm doing a manual audit of each URL anyways, I felt it was worth it to update these while I was at it.
This commit is contained in:
Camden Cheek 2024-02-12 17:23:47 -07:00 committed by GitHub
parent 78a3f1a3c3
commit 1ead945267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
158 changed files with 314 additions and 316 deletions

View File

@ -19,12 +19,12 @@ All interactions with the Sourcegraph open source project are governed by the
1. Select one of the issues labeled as [good first issue](https://github.com/orgs/sourcegraph/projects/210).
2. Clone the repo: `git clone https://github.com/sourcegraph/sourcegraph`.
3. [Set up your development environment](https://docs.sourcegraph.com/dev/setup/quickstart) to run the project locally.
4. Before creating a pull request, ensure that [recommended checks](https://docs.sourcegraph.com/dev/contributing) pass locally. We're actively working on making our CI pipeline public to automate this step.
3. [Set up your development environment](https://sourcegraph.com/docs/dev/setup/quickstart) to run the project locally.
4. Before creating a pull request, ensure that [recommended checks](https://sourcegraph.com/docs/dev/contributing) pass locally. We're actively working on making our CI pipeline public to automate this step.
5. **IMPORTANT:** Once you have a pull request ready to review, the 'verification/cla-signed' check will be flagged, and you will be prompted to sign the CLA with a link provided by our bot. Once you sign, add a comment tagging `@sourcegraph/contribution-reviewers`. After that your pull request will be ready for review.
- For Sourcegraph team members, see [these notes](https://docs.sourcegraph.com/dev/contributing/accepting_contribution#cla-bot) for how to verify that the CLA has been signed.
- For Sourcegraph team members, see [these notes](https://sourcegraph.com/docs/dev/contributing/accepting_contribution#cla-bot) for how to verify that the CLA has been signed.
6. Once you've chosen an issue, **comment on it to announce that you will be working on it**, making it visible for others that this issue is being tackled. If you end up not creating a pull request for this issue, please delete your comment.
7. If you have any questions, please [refer to the docs first](https://docs.sourcegraph.com/). If you dont find any relevant information, mention the issue author.
7. If you have any questions, please [refer to the docs first](https://sourcegraph.com/docs/). If you dont find any relevant information, mention the issue author.
8. The issue author will try to provide guidance. Sourcegraph always works in async mode. We will try to answer as soon as possible, but please keep time zones differences in mind.
9. Join the [Sourcegraph Community Space](https://srcgr.ph/join-community-space) on Discord where the Sourcegraph team can help you!
@ -36,18 +36,18 @@ All open issues are not yet solved. If the task is interesting to you, take it a
### Getting applications up and running
- [Getting Started Guide](https://docs.sourcegraph.com/getting-started)
- [Troubleshooting section](https://docs.sourcegraph.com/dev/setup/troubleshooting)
- [Getting Started Guide](https://sourcegraph.com/docs/getting-started)
- [Troubleshooting section](https://sourcegraph.com/docs/dev/setup/troubleshooting)
### How to write tests
- [How to write tests](https://docs.sourcegraph.com/dev/how-to/testing)
- [Testing principles](https://docs.sourcegraph.com/dev/background-information/testing_principles)
- [Testing web code](https://docs.sourcegraph.com/dev/background-information/testing_web_code)
- [How to write tests](https://sourcegraph.com/docs/dev/how-to/testing)
- [Testing principles](https://sourcegraph.com/docs/dev/background-information/testing_principles)
- [Testing web code](https://sourcegraph.com/docs/dev/background-information/testing_web_code)
### Pull Requests
- [How to structure](https://docs.sourcegraph.com/dev/background-information/pull_request_reviews#what-makes-an-effective-pull-request-pr)
- [How to structure](https://sourcegraph.com/docs/dev/background-information/pull_request_reviews#what-makes-an-effective-pull-request-pr)
- Git branch name convention: `[developer-initials]/short-feature-description`
- [Examples on Github](https://github.com/sourcegraph/sourcegraph/pulls?q=is%3Apr+label%3Ateam%2Ffrontend-platform)
- (For Sourcegraph team) [How to accept contributions](https://docs.sourcegraph.com/dev/contributing/accepting_contribution)
- (For Sourcegraph team) [How to accept contributions](https://sourcegraph.com/docs/dev/contributing/accepting_contribution)

View File

@ -7,7 +7,7 @@
</p>
<p align="center">
<a href="https://docs.sourcegraph.com">Docs</a>
<a href="https://sourcegraph.com/docs">Docs</a>
<a href="https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/CONTRIBUTING.md">Contributing</a>
<a href="https://twitter.com/sourcegraph">Twitter</a>
<a href="https://discord.gg/s2qDtYGnAE">Discord</a>
@ -38,7 +38,7 @@
## Getting started
- [Use Sourcegraph on the cloud or self-hosted](https://docs.sourcegraph.com/)
- [Use Sourcegraph on the cloud or self-hosted](https://sourcegraph.com/docs/)
- [Sourcegraph.com public code search](https://sourcegraph.com/search)
<br><br>
@ -47,7 +47,7 @@
## Development
Refer to the [Developing Sourcegraph guide](https://docs.sourcegraph.com/dev) to get started.
Refer to the [Developing Sourcegraph guide](https://sourcegraph.com/docs/dev) to get started.
### Documentation

View File

@ -108,7 +108,7 @@ export const NoResultsPage: React.FunctionComponent<React.PropsWithChildren<NoRe
<Link
onClick={() => telemetryService.log('NoResultsMore', { link: 'Docs' })}
target="blank"
to="https://docs.sourcegraph.com/"
to="https://sourcegraph.com/docs/"
>
Sourcegraph Docs <Icon svgPath={mdiOpenInNew} aria-label="Open in a new tab" />
</Link>

View File

@ -248,7 +248,7 @@ To use this filter, the search query must contain \`type:diff\` or \`type:commit
field: FilterType.rev,
commonRank: 20,
description:
'Search a revision instead of the default branch. `rev:` can only be used in conjunction with `repo:` and may not be used more than once. See our [revision syntax documentation](https://docs.sourcegraph.com/code_search/reference/queries#repository-revisions) to learn more.',
'Search a revision instead of the default branch. `rev:` can only be used in conjunction with `repo:` and may not be used more than once. See our [revision syntax documentation](https://sourcegraph.com/docs/code_search/reference/queries#repository-revisions) to learn more.',
},
{
...createQueryExampleFromString('{result-types}'),
@ -265,7 +265,7 @@ To use this filter, the search query must contain \`type:diff\` or \`type:commit
- \`select:content\`
- \`select:symbol.symboltype\`
See [language definition](https://docs.sourcegraph.com/code_search/reference/language#select) for more information on possible values.`,
See [language definition](https://sourcegraph.com/docs/code_search/reference/language#select) for more information on possible values.`,
examples: ['fmt.Errorf select:repo', 'select:commit.diff.added //TODO', 'select:file.directory'],
},
{

View File

@ -18,7 +18,7 @@ The tooltips include features like:
#### 🚀 Install: [**Sourcegraph for Chrome**](https://chrome.google.com/webstore/detail/sourcegraph/dgjhfomjieaadpoljlnidmbgkdffpack)
#### 🚀 Install: [**Sourcegraph for Firefox**](https://docs.sourcegraph.com/integration/browser_extension)
#### 🚀 Install: [**Sourcegraph for Firefox**](https://sourcegraph.com/docs/integration/browser_extension)
#### 🚀 Install: [**Sourcegraph for Safari**](https://apps.apple.com/us/app/sourcegraph-for-safari/id1543262193)
@ -135,7 +135,7 @@ The test suite in `end-to-end/github.test.ts` runs on the release branch `bext/r
The test suite in end-to-end/phabricator.test.ts tests the Phabricator native integration.
It assumes an existing Sourcegraph and Phabricator instance that has the Phabricator extension installed.
There are automated scripts to set up the Phabricator instance, see https://docs.sourcegraph.com/dev/phabricator_gitolite.
There are automated scripts to set up the Phabricator instance, see https://sourcegraph.com/docs/dev/phabricator_gitolite.
It currently does not run in CI and is intended to be run manually for release testing.
`end-to-end/bitbucket.test.ts` tests the browser extension on a Bitbucket Server instance.
@ -243,7 +243,7 @@ This is an adjusted version of @lguychard's [comment here](https://github.com/so
4. Navigated to `127.0.0.1` to access the Phabricator instance, and logged in with `admin` / `sourcegraph` (as printed by `./dev/phabricator/start.sh`)
5. Navigated to `http://127.0.0.1/config/group/sourcegraph/` (Config -> Application Settings -> Sourcegraph)
6. Edited `corsOrigin` in site config at `https://sourcegraph.test:3443/site-admin/configuration` to include `http://127.0.0.1` (might need to be added in `dev-private` repo).
7. Added a repository by mirroring a public GitHub repository (we have some docs for this [here](https://docs.sourcegraph.com/dev/phabricator_gitolite), but they need improving):
7. Added a repository by mirroring a public GitHub repository (we have some docs for this [here](https://sourcegraph.com/docs/dev/phabricator_gitolite), but they need improving):
- Navigated to `http://127.0.0.1/diffusion/edit/?vcs=git`
- Created a repository with name `JsonRPC2`, callsign `JRPC`, short name `jrpc`
- Navigated to `http://127.0.0.1/source/jrpc/manage/uris/` (URIs)

View File

@ -33,6 +33,6 @@ After you install it, try it out on any of these public repositories:
* C#: https://github.com/paiden/Nett/pull/76/files#diff-e969e1315b2cb01bab80b2860be0d87eR52
* Python: https://github.com/ageitgey/face_recognition/blob/b8fed6/examples/facerec_on_raspberry_pi.py
Usage with private code on GitHub.com, GitHub Enterprise, GitLab, Bitbucket Server, or Phabricator: https://docs.sourcegraph.com/integration/browser_extension
Usage with private code on GitHub.com, GitHub Enterprise, GitLab, Bitbucket Server, or Phabricator: https://sourcegraph.com/docs/integration/browser_extension
This extension is open source: https://github.com/sourcegraph/sourcegraph/tree/main/client/browser

View File

@ -58,7 +58,7 @@ export const AfterInstallPageContent: React.FC<AfterInstallPageContentProps> = p
<Link to="https://sourcegraph.com/search" target="_blank" rel="noopener">
<SourcegraphLogo className={styles.sourcegraphLogo} />
</Link>
<Link to="https://docs.sourcegraph.com/integration/browser_extension" target="_blank" rel="noopener">
<Link to="https://sourcegraph.com/docs/integration/browser_extension" target="_blank" rel="noopener">
Browser extension docs <Icon aria-hidden={true} svgPath={mdiOpenInNew} />
</Link>
</div>
@ -183,7 +183,7 @@ export const AfterInstallPageContent: React.FC<AfterInstallPageContentProps> = p
<li>
<strong>Install Sourcegraph</strong> (
<Link
to="https://docs.sourcegraph.com/admin/install"
to="https://sourcegraph.com/docs/admin/install"
target="_blank"
rel="noopener"
>
@ -223,7 +223,7 @@ export const AfterInstallPageContent: React.FC<AfterInstallPageContentProps> = p
<Text className="m-0 ml-3">
Read the{' '}
<Link
to="https://docs.sourcegraph.com/integration/browser_extension"
to="https://sourcegraph.com/docs/integration/browser_extension"
rel="noopener"
target="_blank"
>

View File

@ -153,7 +153,7 @@ export const OptionsPage: React.FunctionComponent<React.PropsWithChildren<Option
<section className={styles.section}>
<Link
to="https://docs.sourcegraph.com/integration/browser_extension#privacy"
to="https://sourcegraph.com/docs/integration/browser_extension#privacy"
{...NEW_TAB_LINK_PROPS}
className="d-block mb-1"
>
@ -189,7 +189,7 @@ export const OptionsPage: React.FunctionComponent<React.PropsWithChildren<Option
</Link>
</div>
<div className={styles.splitSectionPart}>
<Link to="https://docs.sourcegraph.com" {...NEW_TAB_LINK_PROPS}>
<Link to="https://sourcegraph.com/docs" {...NEW_TAB_LINK_PROPS}>
<Icon className="mr-2" aria-hidden={true} svgPath={mdiBookOpenPageVariant} />
Documentation
</Link>
@ -247,7 +247,7 @@ const RepoSyncErrorAlert: React.FunctionComponent<
You need to setup a{' '}
<Link
to={
createURLWithUTM(new URL('https://docs.sourcegraph.com/'), {
createURLWithUTM(new URL('https://sourcegraph.com/docs/'), {
utm_source: getPlatformName(),
utm_campaign: 'sync-private-repo-with-cloud',
}).href
@ -262,7 +262,7 @@ const RepoSyncErrorAlert: React.FunctionComponent<
<>
<Link
to={
createURLWithUTM(new URL('admin/repo/add', 'https://docs.sourcegraph.com/'), {
createURLWithUTM(new URL('admin/repo/add', 'https://sourcegraph.com/docs/'), {
utm_source: getPlatformName(),
utm_campaign: 'add-repo-to-instance',
}).href

View File

@ -97,7 +97,7 @@ async function configureSourcegraphIntegration(driver: Driver): Promise<void> {
await driver.page.waitForSelector('a[href="/config/group/sourcegraph/"]', { timeout: 2000 })
} catch {
throw new Error(
`The Sourcegraph native integration is not installed on ${PHABRICATOR_BASE_URL}. Please see https://docs.sourcegraph.com/dev/phabricator_gitolite#install-the-sourcegraph-phabricator-extension`
`The Sourcegraph native integration is not installed on ${PHABRICATOR_BASE_URL}. Please see https://sourcegraph.com/docs/dev/how-to/configure_phabricator_gitolite#install-the-sourcegraph-phabricator-extension`
)
}

View File

@ -78,7 +78,7 @@ const parseGitLabRepoURL = (): { hostname: string; projectFullName: string; owne
/**
* Subject to store repo name on the Sourcegraph instance (e.g. 'gitlab.com/SourcegraphCody/jsonrpc2').
* It may be different from the repo name on the code host because of the name transformations applied
* (see {@link https://docs.sourcegraph.com/admin/external_service/gitlab#nameTransformations}).
* (see {@link https://sourcegraph.com/docs/admin/external_service/gitlab#nameTransformations}).
* Set in `gitlabCodeHost.prepareCodeHost` method.
*/
export const repoNameOnSourcegraph = new BehaviorSubject<string>('')

View File

@ -85,7 +85,7 @@ export const ViewOnSourcegraphButton: React.FunctionComponent<
...commonProps,
// If we are not running in the browser extension where we can open the options menu,
// open the documentation for how to configure the code host we are on.
href: new URL(snakeCase(codeHostType), 'https://docs.sourcegraph.com/integration/').href,
href: new URL(snakeCase(codeHostType), 'https://sourcegraph.com/docs/integration/').href,
// onClick can call preventDefault() to prevent that and take a different action (opening the options menu).
onClick: onConfigureSourcegraphClick,
}
@ -149,7 +149,7 @@ export const ConfigureSourcegraphButton: React.FunctionComponent<
> = ({ onConfigureSourcegraphClick, codeHostType, ...commonProps }) => (
<SourcegraphIconButton
{...commonProps}
href={commonProps.href || new URL(snakeCase(codeHostType), 'https://docs.sourcegraph.com/integration/').href}
href={commonProps.href || new URL(snakeCase(codeHostType), 'https://sourcegraph.com/docs/integration/').href}
onClick={onConfigureSourcegraphClick}
label="Configure Sourcegraph"
title="Set up Sourcegraph for search and code navigation on private repositories"

View File

@ -57,7 +57,7 @@ export interface ActionContribution {
* a noop.
*
* See "[Builtin commands](../../../../doc/extensions/authoring/builtin_commands.md)" (online at
* https://docs.sourcegraph.com/extensions/authoring/builtin_commands) for documentation on
* https://sourcegraph.com/docs/extensions/authoring/builtin_commands) for documentation on
* builtin client commands.
*
* Extensions: The command must be registered (unless it is a builtin command). Extensions can

View File

@ -7,8 +7,6 @@
* - Links to live traces, log output, and performance data for a line of code
* - Git blame
* - Usage examples for functions
*
* Check out the [extension authoring documentation](https://docs.sourcegraph.com/extensions/authoring) to get started.
*/
declare module 'sourcegraph' {
export interface Unsubscribable {
@ -319,7 +317,7 @@ declare module 'sourcegraph' {
* The text contents of the text document.
*
* When using the [Sourcegraph browser
* extension](https://docs.sourcegraph.com/integration/browser_extension), the value is
* extension](https://sourcegraph.com/docs/integration/browser_extension), the value is
* `undefined` because determining the text contents (in general) is not possible without
* additional access to the code host API. In the future, this limitation may be removed.
*/
@ -849,7 +847,7 @@ declare module 'sourcegraph' {
* A version context is a set of repositories and revisions on a Sourcegraph instance.
* When set, extensions use it to scope search queries, code navigation actions, etc.
*
* See more information at http://docs.sourcegraph.com/user/search#version-contexts.
* See more information at http://sourcegraph.com/docs/user/search
*
* @deprecated
*/
@ -868,7 +866,7 @@ declare module 'sourcegraph' {
* A search context is a set of repositories and revisions on a Sourcegraph instance.
* When set, extensions use it to scope search queries, code navigation actions, etc.
*
* See more information at https://docs.sourcegraph.com/code_search/explanations/features#search-contexts.
* See more information at https://sourcegraph.com/docs/code-search/features#search-contexts
*/
export const searchContext: string | undefined
@ -1189,7 +1187,7 @@ declare module 'sourcegraph' {
*
* The provider can be executed with the `executeLocationProvider` builtin command, passing the {@link id}
* as the first argument. For more information, see
* https://docs.sourcegraph.com/extensions/authoring/builtin_commands#executeLocationProvider.
* https://sourcegraph.com/docs/extensions/authoring/builtin_commands#executeLocationProvider.
*
* @param id An identifier for this location provider that distinguishes it from other location providers.
* @param selector A selector that defines the documents this provider is applicable to.
@ -1268,7 +1266,7 @@ declare module 'sourcegraph' {
export namespace graphQL {
/**
* Executes a [Sourcegraph GraphQL API](https://docs.sourcegraph.com/api/graphql) query or mutation on the associated Sourcegraph instance and returns a promise for the result.
* Executes a [Sourcegraph GraphQL API](https://sourcegraph.com/docs/api/graphql) query or mutation on the associated Sourcegraph instance and returns a promise for the result.
*
* @template TResult The GraphQL result type
* @template TVariables The type of the variables object

View File

@ -32,7 +32,7 @@ export interface TextDocument {
* The text contents of the text document.
*
* When using the [Sourcegraph browser
* extension](https://docs.sourcegraph.com/integration/browser_extension), the value is
* extension](https://sourcegraph.com/docs/integration/browser_extension), the value is
* `undefined` because determining the text contents (in general) is not possible without
* additional access to the code host API. In the future, this limitation may be removed.
*/

View File

@ -2,7 +2,7 @@ import { Base64 } from 'js-base64'
import type * as sourcegraph from './api'
export const linkURL = 'https://docs.sourcegraph.com/code_intelligence/explanations/precise_code_intelligence'
export const linkURL = 'https://sourcegraph.com/docs/code_navigation/explanations/precise_code_navigation'
// Aggregable badges
//
@ -95,5 +95,5 @@ export const impreciseBadge = {
light: { icon: infoIcon('#000000') },
hoverMessage:
'Search-based results - click to see how these results are calculated and how to get precise intelligence with LSIF.',
linkURL: 'https://docs.sourcegraph.com/code_intelligence/explanations/basic_code_intelligence',
linkURL: 'https://sourcegraph.com/docs/code_intelligence/explanations/basic_code_intelligence',
}

View File

@ -35,7 +35,7 @@ export const FIXTURE_CONTENT: Badged<MarkupContent> = {
export const FIXTURE_SEMANTIC_BADGE: AggregableBadge = {
text: 'semantic',
linkURL: 'https://docs.sourcegraph.com/code_navigation/explanations/precise_code_navigation',
linkURL: 'https://sourcegraph.com/docs/code_navigation/explanations/precise_code_navigation',
hoverMessage: 'Sample hover message',
}

View File

@ -97,7 +97,7 @@ export interface PlatformContext {
* Returns promise that resolves into Apollo Client instance after cache restoration.
* Only `watchQuery` is available till https://github.com/sourcegraph/sourcegraph/issues/24953 is implemented.
*
* @deprecated Use [Apollo](docs.sourcegraph.com/dev/background-information/web/graphql#graphql-client) instead
* @deprecated Use [Apollo](https://sourcegraph.com/docs/dev/background-information/web/graphql#graphql-client) instead
*/
getGraphQLClient: () => Promise<Pick<GraphQLClient, 'watchQuery'>>
@ -108,7 +108,7 @@ export interface PlatformContext {
* could leak private information such as repository names.
* @returns Observable that emits the result or an error if the HTTP request failed
*
* @deprecated Use [Apollo](docs.sourcegraph.com/dev/background-information/web/graphql#graphql-client) instead
* @deprecated Use [Apollo](https://sourcegraph.com/docs/dev/background-information/web/graphql#graphql-client) instead
*/
requestGraphQL: <R, V extends { [key: string]: any } = object>(options: {
/**
@ -189,7 +189,7 @@ export interface PlatformContext {
/**
* Telemetry recorder for the new telemetry framework, superseding
* 'telemetryService' and 'logEvent' variants. Learn more here:
* https://docs.sourcegraph.com/dev/background-information/telemetry
* https://sourcegraph.com/docs/dev/background-information/telemetry
*
* It is backed by a '@sourcegraph/telemetry' implementation.
*/

View File

@ -114,7 +114,7 @@ interface MetaFilterSeparator extends BaseMetaToken {
/**
* A token that is labeled and interpreted as repository revision syntax in Sourcegraph. Note: there
* are syntactic differences from pure Git ref syntax.
* See https://docs.sourcegraph.com/code_search/reference/queries#repository-revisions.
* See https://sourcegraph.com/docs/code_search/reference/queries#repository-revisions.
*/
export interface MetaRevision extends BaseMetaToken {
type: 'metaRevision'

View File

@ -129,7 +129,7 @@ const toRegexpHover = (token: MetaRegexp): string => {
const toStructuralHover = (token: MetaStructural): string => {
switch (token.kind) {
case MetaStructuralKind.Hole: {
return '**Structural hole**. Matches code structures contextually. See the [syntax reference](https://docs.sourcegraph.com/code_search/reference/structural#syntax-reference) for a complete description.'
return '**Structural hole**. Matches code structures contextually. See the [syntax reference](https://sourcegraph.com/docs/code-search/queries#structural-search) for a complete description.'
}
case MetaStructuralKind.RegexpHole: {
return '**Regular expression hole**. Match the regular expression defined inside this hole.'

View File

@ -29,14 +29,14 @@ export type BillingProduct = 'exampleBillingProduct'
/**
* Props interface that can be extended by React components depending on the
* new telemetry framework: https://docs.sourcegraph.com/dev/background-information/telemetry
* new telemetry framework: https://sourcegraph.com/docs/dev/background-information/telemetry
* These properties are part of {@link PlatformContext}.
*/
export interface TelemetryV2Props {
/**
* Telemetry recorder for the new telemetry framework, superseding
* 'telemetryService' and 'logEvent' variants. Learn more here:
* https://docs.sourcegraph.com/dev/background-information/telemetry
* https://sourcegraph.com/docs/dev/background-information/telemetry
*
* It is backed by a '@sourcegraph/telemetry' implementation.
*/

View File

@ -25,7 +25,7 @@ const formatRuleViolations = (violations: Result[]): string[] =>
({ id, help, helpUrl, nodes }) => `
Rule: "${id}" (${help})
Further information: ${helpUrl}
How to manually audit: https://docs.sourcegraph.com/dev/background-information/web/accessibility/how-to-audit#auditing-a-user-journey
How to manually audit: https://sourcegraph.com/docs/dev/background-information/web/accessibility/how-to-audit#auditing-a-user-journey
Required changes: ${formatViolationProblems(nodes)}
`
)
@ -45,7 +45,7 @@ export const ACCESSIBILITY_AUDIT_IGNORE_CLASS = '.a11y-ignore'
*
* Will error with a list of violations if any are found.
*
* See further documentation: https://docs.sourcegraph.com/dev/how-to/testing#accessibility-tests
* See further documentation: https://sourcegraph.com/docs/dev/how-to/testing#accessibility-tests
*/
export async function accessibilityAudit(page: Page, config: AccessibilityAuditConfiguration = {}): Promise<void> {
const { options, mode = 'fail' } = config

View File

@ -2,4 +2,4 @@
This folder contains shared testing helpers for the Sourcegraph webapp and browser extensions.
For more information about integration tests and how to run them, read the [Client integration tests documentation](https://docs.sourcegraph.com/dev/how-to/testing#client-integration-tests).
For more information about integration tests and how to run them, read the [Client integration tests documentation](https://sourcegraph.com/docs/dev/how-to/testing#client-integration-tests).

View File

@ -1,6 +1,6 @@
# Storybook configuration
Check out the [Storybook section](https://docs.sourcegraph.com/dev/background-information/web/web_app#storybook) in the [Developing the Sourcegraph web app](https://docs.sourcegraph.com/dev/background-information/web/web_app) docs.
Check out the [Storybook section](https://sourcegraph.com/docs/dev/background-information/web/web_app#storybook) in the [Developing the Sourcegraph web app](https://docs.sourcegraph.com/dev/background-information/web/web_app) docs.
## Usage

View File

@ -2,7 +2,7 @@
## Local development
Use `sg` CLI tool to configure and start local development server. For more information check out [the `sg` documentation](https://docs.sourcegraph.com/dev/background-information/sg).
Use `sg` CLI tool to configure and start local development server. For more information check out [the `sg` documentation](https://sourcegraph.com/docs/dev/background-information/sg).
Our local development server runs by starting both a [Caddy](https://caddyserver.com/) HTTPS server and a Node HTTP server. We then can reverse proxy requests to the Node server to serve client assets under HTTPS.

View File

@ -77,7 +77,7 @@ export interface BreadcrumbSetters {
* pass an arbitrary element or a link config object for simpler breadcrumbs.
* @returns Another breadcrumb setters object to pass down to child components to register child breadcrumbs,
* with a method to remove the breadcrumb again. The object should be added to a [subscription
* bag](https://docs.sourcegraph.com/dev/background-information/languages/typescript#subscription-bag).
* bag](https://sourcegraph.com/docs/dev/background-information/languages/typescript#subscription-bag).
*/
setBreadcrumb: (breadcrumb: NullableBreadcrumb) => BreadcrumbSetters & Unsubscribable
}

View File

@ -125,10 +125,10 @@ function editWithComment(config: string, path: JSONPath, value: any, comment: st
const editorActionComments = {
enablePermissions:
'// Prerequisite: you must configure GitHub as an OAuth auth provider in the site config (https://docs.sourcegraph.com/admin/auth#github). Otherwise, access to all repositories will be disallowed.',
'// Prerequisite: you must configure GitHub as an OAuth auth provider in the site config (https://sourcegraph.com/docs/admin/auth#github). Otherwise, access to all repositories will be disallowed.',
enforcePermissionsOAuth: `// Prerequisite: you must first update the site configuration to
// include GitLab OAuth as an auth provider.
// See https://docs.sourcegraph.com/admin/auth#gitlab for instructions.`,
// See https://sourcegraph.com/docs/admin/auth#gitlab for instructions.`,
enforcePermissionsSSO: `// Prerequisite: You need a sudo-level access token. If you can configure
// GitLab as an OAuth identity provider for Sourcegraph, we recommend that
// option instead.
@ -136,9 +136,9 @@ const editorActionComments = {
// 1. Ensure the personal access token in this config has admin privileges
// (https://docs.gitlab.com/ee/api/#sudo).
// 2. Update the site configuration to include the SSO auth provider for GitLab
// (https://docs.sourcegraph.com/admin/auth).
// (https://sourcegraph.com/docs/admin/auth).
// 3. Update the fields below to match the properties of this auth provider
// (https://docs.sourcegraph.com/admin/repo/permissions#sudo-access-token).`,
// (https://sourcegraph.com/docs/admin/permissions).`,
}
const Field: React.FunctionComponent<{ children: React.ReactNode | string | string[] }> = props => (
@ -1146,7 +1146,7 @@ const PHABRICATOR_SERVICE: AddExternalServiceOptions = {
defaultConfig: `{
// Use Ctrl+Space for completion, and hover over JSON properties for documentation.
// Configuration options are documented here:
// https://docs.sourcegraph.com/admin/external_service/phabricator#configuration
// https://sourcegraph.com/docs/admin/external_service/phabricator#configuration
"url": "https://phabricator.example.com",
"token": "",

View File

@ -11,7 +11,7 @@ steps:
comby -in-place -config /tmp/patterns.toml -exclude-dir .,vendor;
container: comby/comby
# files to mount on the container can be directly included in the spec file
# for other options, see https://docs.sourcegraph.com/batch_changes/references/batch_spec_yaml_reference#steps-mount
# for other options, see https://sourcegraph.com/docs/batch_changes/references/batch_spec_yaml_reference#stepsmount
files:
/tmp/patterns.toml: |
[my-first-pattern]

View File

@ -26,7 +26,7 @@ changesetTemplate:
body: |
Run in each workspace of a monorepo
# Each branch needs to be unique, so we're using templating to define them
# https://docs.sourcegraph.com/batch_changes/references/batch_spec_templating
# https://sourcegraph.com/docs/batch_changes/references/batch_spec_templating
branch: batch-changes/monorepo/${{ replace steps.path "/" "-" }}
commit:
message: opening several changesets in a monorepo

View File

@ -6,7 +6,7 @@ on:
steps:
# In each repo, iterate over search results files using templating
# https://docs.sourcegraph.com/batch_changes/references/batch_spec_templating
# https://sourcegraph.com/docs/batch_changes/references/batch_spec_templating
- run: |
while read -r file
do

View File

@ -18,7 +18,7 @@ export const content = [
isComplete: false,
title: 'Set up SMTP',
description: 'Must be set in order for Sourcegraph to send emails.',
link: 'https://docs.sourcegraph.com/admin/config/email',
link: 'https://sourcegraph.com/docs/admin/config/email',
},
{
id: 'externalServices',
@ -32,6 +32,6 @@ export const content = [
isComplete: false,
title: 'Set up user authentication',
description: 'We recommend that enterprise instances use SSO or SAML to authenticate users.',
link: 'https://docs.sourcegraph.com/admin/config/authorization_and_authentication',
link: 'https://sourcegraph.com/docs/admin/config/authorization_and_authentication',
},
]

View File

@ -310,7 +310,7 @@ describe('buildEditorUrl tests', () => {
it('builds the right "Learn more" URL', () => {
expect(() => {
buildEditorUrl(defaultPath, defaultPosition, { editorIds: ['vscode'] }, baseUrl)
}).toThrow(/https:\/\/docs\.sourcegraph\.com\/integration\/open_in_editor/)
}).toThrow(/https:\/\/sourcegraph\.com\/docs\/integration\/open_in_editor/)
})
})
})

View File

@ -62,7 +62,7 @@ export function getEditorSettingsErrorMessage(
editorSettings: EditorSettings | undefined,
sourcegraphBaseUrl: string
): string | undefined {
const learnMoreURL = 'https://docs.sourcegraph.com/integration/open_in_editor'
const learnMoreURL = 'https://sourcegraph.com/docs/integration/open_in_editor'
if (!editorSettings) {
return `Add \`openInEditor\` to your user settings to open files in the editor. [Learn more](${learnMoreURL})`

View File

@ -306,7 +306,7 @@ export const ServerSideAlertUnownedResults: StoryFn = () => {
kind: 'unowned-results',
title: 'Some results have no owners',
description:
'For some results, no ownership data was found, or no rule applied to the result. [Learn more about configuring code ownership](https://docs.sourcegraph.com/own).',
'For some results, no ownership data was found, or no rule applied to the result. [Learn more about configuring code ownership](https://sourcegraph.com/docs/own).',
},
}

View File

@ -97,7 +97,7 @@ const quickConfigureActions: {
clientSecret: '<client secret>',
},
{
COMMENT: '// See https://docs.sourcegraph.com/admin/auth#gitlab for instructions',
COMMENT: '// See https://sourcegraph.com/docs/admin/auth#gitlab for instructions',
}
),
]
@ -121,7 +121,7 @@ const quickConfigureActions: {
clientID: '<client ID>',
clientSecret: '<client secret>',
},
{ COMMENT: '// See https://docs.sourcegraph.com/admin/auth#github for instructions' }
{ COMMENT: '// See https://sourcegraph.com/docs/admin/auth#github for instructions' }
),
]
return { edits, selectText: '<client ID>' }
@ -143,7 +143,7 @@ const quickConfigureActions: {
identityProviderMetadataURL: '<identity provider metadata URL>',
},
{
COMMENT: '// See https://docs.sourcegraph.com/admin/auth/saml/one_login for instructions',
COMMENT: '// See https://sourcegraph.com/docs/admin/auth/saml/one_login for instructions',
}
),
]
@ -162,7 +162,7 @@ const quickConfigureActions: {
}
const edits = [
editWithComments(config, ['auth.providers', -1], value, {
COMMENT: '// See https://docs.sourcegraph.com/admin/auth/saml/okta for instructions',
COMMENT: '// See https://sourcegraph.com/docs/admin/auth/saml/okta for instructions',
}),
]
return { edits, selectText: '<identity provider metadata URL>' }
@ -182,7 +182,7 @@ const quickConfigureActions: {
displayName: 'SAML',
identityProviderMetadataURL: '<SAML IdP metadata URL>',
},
{ COMMENT: '// See https://docs.sourcegraph.com/admin/auth/saml for instructions' }
{ COMMENT: '// See https://sourcegraph.com/docs/admin/auth/saml for instructions' }
),
]
return { edits, selectText: '<SAML IdP metadata URL>' }
@ -204,7 +204,7 @@ const quickConfigureActions: {
clientID: '<client ID>',
clientSecret: '<client secret>',
},
{ COMMENT: '// See https://docs.sourcegraph.com/admin/auth#openid-connect for instructions' }
{ COMMENT: '// See https://sourcegraph.com/docs/admin/auth#openid-connect for instructions' }
),
]
return { edits, selectText: '<identity provider URL>' }

View File

@ -21,7 +21,7 @@ export const SearchPageFooter: FC = () => {
? [
{
name: 'Docs',
href: 'https://docs.sourcegraph.com/',
href: 'https://sourcegraph.com/docs',
},
{ name: 'About', href: 'https://sourcegraph.com' },
{

View File

@ -6,7 +6,7 @@ import type { ExportTelemetryEventsResult } from '../graphql-operations'
/**
* ApolloTelemetryExporter exports events via the new Sourcegraph telemetry
* framework: https://docs.sourcegraph.com/dev/background-information/telemetry
* framework: https://sourcegraph.com/docs/dev/background-information/telemetry
*/
export class ApolloTelemetryExporter implements TelemetryExporter {
constructor(private client: ApolloClient<object>) {}

View File

@ -156,7 +156,7 @@ export const authenticatedTasks: TourTaskType[] = [
label: 'Install the browser extension and leverage Sourcegraph code intelligence in reviews',
action: {
type: 'new-tab-link',
value: 'https://docs.sourcegraph.com/integration/browser_extension',
value: 'https://sourcegraph.com/docs/integration/browser_extension',
},
},
],

View File

@ -1,6 +1,6 @@
import type { AuthProvider } from '../jscontext'
// NOTE(naman): Remember to add events to allow list: https://docs.sourcegraph.com/dev/background-information/data-usage-pipeline#allow-list
// NOTE(naman): Remember to add events to allow list: https://sourcegraph.com/docs/dev/background-information/data-usage-pipeline#allow-list
export const enum EventName {
CODY_CHAT_PAGE_VIEWED = 'web:codyChat:pageViewed',
CODY_CHAT_SUBMIT = 'web:codyChat:submit',

View File

@ -12,4 +12,4 @@ The Wildcard component library is a collection of design-approved reusable compo
- `hooks/`
Reusable React hooks. Typically utilities or headless components
See [Wildcard documentation](https://docs.sourcegraph.com/dev/background-information/web/wildcard) for more information.
See [Wildcard documentation](https://sourcegraph.com/docs/dev/background-information/web/wildcard) for more information.

View File

@ -30,9 +30,9 @@ export type ProductStatusLinked = Extends<ProductStatusType, 'beta' | 'experimen
* Map badge status to a relevant docs page describing that product status
*/
const STATUS_LINK_MAPPING: Record<ProductStatusLinked, string> = {
experimental: 'https://docs.sourcegraph.com/admin/beta_and_experimental_features#experimental-features',
beta: 'https://docs.sourcegraph.com/admin/beta_and_experimental_features#beta-features',
'private-beta': 'https://docs.sourcegraph.com/admin/beta_and_experimental_features#beta-features',
experimental: 'https://sourcegraph.com/docs/admin/beta_and_experimental_features#experimental-features',
beta: 'https://sourcegraph.com/docs/admin/beta_and_experimental_features#beta-features',
'private-beta': 'https://sourcegraph.com/docs/admin/beta_and_experimental_features#beta-features',
} as const
/**

View File

@ -58,7 +58,7 @@ export const Simple = () => {
value={selected}
label="Input error"
onChange={handleChange}
error="An error message that can contain `code` or other **Markdown** _formatting_. [Learn more](https://docs.sourcegraph.com)"
error="An error message that can contain `code` or other **Markdown** _formatting_. [Learn more](https://sourcegraph.com/docs)"
status="error"
placeholder="error status input"
/>

View File

@ -135,7 +135,7 @@ const navItems: NavMenuSectionProps[] = [
{
content: 'Browser Extension',
suffixIcon: OpenInNewIcon,
to: 'https://docs.sourcegraph.com/integration/browser_extension',
to: 'https://sourcegraph.com/docs/integration/browser_extension',
key: 'Extension',
},
],

View File

@ -73,7 +73,7 @@ describe('<NavMenu />', () => {
{
content: 'Browser Extension',
itemAs: AnchorLink,
to: 'https://docs.sourcegraph.com/integration/browser_extension',
to: 'https://sourcegraph.com/docs/integration/browser_extension',
key: 7,
},
],

View File

@ -149,7 +149,7 @@ exports[`<NavMenu /> > Should render Menu Items Correctly 1`] = `
data-reach-menu-item=""
data-reach-menu-link=""
data-valuetext="Browser Extension"
href="https://docs.sourcegraph.com/integration/browser_extension"
href="https://sourcegraph.com/docs/integration/browser_extension"
id="option-8--menu-test-id"
role="menuitem"
tabindex="-1"

View File

@ -267,7 +267,7 @@ export const CrossingStyles: StoryFn = () => (
<Link
target="_blank"
rel="noopener noreferrer"
to="https://docs.sourcegraph.com/dev/background-information/web/accessibility/detailed-checklist#headings"
to="https://sourcegraph.com/docs/dev/background-information/web/accessibility/detailed-checklist#headings"
>
accessible
</Link>{' '}

View File

@ -46,7 +46,7 @@ func main() {
app := &cli.App{
Version: version.Version(),
// TODO: More info, link to docs, some inline documentation etc.
Description: "The Sourcegraph untrusted jobs runner. See https://docs.sourcegraph.com/admin/executors to learn more about setup, how it works and how to configure features that depend on it.",
Description: "The Sourcegraph untrusted jobs runner. See https://sourcegraph.com/docs/admin/executors to learn more about setup, how it works and how to configure features that depend on it.",
Name: "executor",
Usage: "The Sourcegraph untrusted jobs runner.",
DefaultCommand: "run",

View File

@ -20,7 +20,7 @@ var HTTPAddrInternal = env.Get(
var sourcegraphDotComMode, _ = strconv.ParseBool(env.Get("SOURCEGRAPHDOTCOM_MODE", "false", "run as Sourcegraph.com, with add'l marketing and redirects"))
var openGraphPreviewServiceURL = env.Get("OPENGRAPH_PREVIEW_SERVICE_URL", "", "The URL of the OpenGraph preview image generating service")
var extsvcConfigFile = env.Get("EXTSVC_CONFIG_FILE", "", "EXTSVC_CONFIG_FILE can contain configurations for multiple code host connections. See https://docs.sourcegraph.com/admin/config/advanced_config_file for details.")
var extsvcConfigFile = env.Get("EXTSVC_CONFIG_FILE", "", "EXTSVC_CONFIG_FILE can contain configurations for multiple code host connections. See https://sourcegraph.com/docs/admin/config/advanced_config_file for details.")
var extsvcConfigAllowEdits, _ = strconv.ParseBool(env.Get("EXTSVC_CONFIG_ALLOW_EDITS", "false", "When EXTSVC_CONFIG_FILE is in use, allow edits in the application to be made which will be overwritten on next process restart"))
// SourcegraphDotComMode is true if this server is running Sourcegraph.com

View File

@ -3347,7 +3347,7 @@ type ExternalService implements Node {
Only site admins may access this field.
DEPRECATED: Webhook logs linked directly to an external service will be removed. See https://docs.sourcegraph.com/admin/config/webhooks/incoming#deprecation-notice
DEPRECATED: Webhook logs linked directly to an external service will be removed. See https://sourcegraph.com/docs/admin/config/webhooks/incoming#deprecation-notice
"""
webhookLogs(
"""
@ -3376,7 +3376,7 @@ type ExternalService implements Node {
until: DateTime
): WebhookLogConnection!
@deprecated(
reason: "Webhook logs linked directly to an external service will be removed. See https://docs.sourcegraph.com/admin/config/webhooks/incoming#deprecation-notice"
reason: "Webhook logs linked directly to an external service will be removed. See https://sourcegraph.com/docs/admin/config/webhooks/incoming#deprecation-notice"
)
"""
@ -7437,8 +7437,8 @@ type Site implements SettingsSubject {
Note: This is primarily used for displaying recently-fired alerts in the web app. If your intent
is to monitor Sourcegraph, it is better to configure alerting or query Prometheus directly in
order to ensure that if the frontend goes down you still receive alerts:
Configure alerting: https://docs.sourcegraph.com/admin/observability/alerting
Query Prometheus directly: https://docs.sourcegraph.com/admin/observability/alerting_custom_consumption
Configure alerting: https://sourcegraph.com/docs/admin/observability/alerting
Query Prometheus directly: https://sourcegraph.com/docs/admin/observability/alerting_custom_consumption
"""
monitoringStatistics(
"""
@ -8596,7 +8596,7 @@ type MonitoringStatistics {
}
"""
A high-level monitoring alert, for details see https://docs.sourcegraph.com/admin/observability/metrics#high-level-alerting-metrics
A high-level monitoring alert, for details see https://sourcegraph.com/docs/admin/observability/metrics#high-level-alerting-metrics
"""
type MonitoringAlert {
"""

View File

@ -157,7 +157,7 @@ func setupSiteConfigStubs(t *testing.T) *siteConfigStubs {
- // The builtin auth provider with signup disallowed (shown below) means that
- // after the initial site admin signs in, all other users must be invited.
- //
- // Other providers are documented at https://docs.sourcegraph.com/admin/auth.
- // Other providers are documented at https://sourcegraph.com/docs/admin/auth.
- "auth.providers": [
- {
- "type": "builtin"
@ -181,7 +181,7 @@ func setupSiteConfigStubs(t *testing.T) *siteConfigStubs {
+ // The builtin auth provider with signup disallowed (shown below) means that
+ // after the initial site admin signs in, all other users must be invited.
+ //
+ // Other providers are documented at https://docs.sourcegraph.com/admin/auth.
+ // Other providers are documented at https://sourcegraph.com/docs/admin/auth.
+ "auth.providers": [
+ {
+ "type": "builtin"

View File

@ -65,7 +65,7 @@ func (s *sessionIssuerHelper) GetOrCreateUser(ctx context.Context, token *oauth2
login, err := auth.NormalizeUsername(deref(ghUser.Login))
if err != nil {
return false, nil, fmt.Sprintf("Error normalizing the username %q. See https://docs.sourcegraph.com/admin/auth/#username-normalization.", login), err
return false, nil, fmt.Sprintf("Error normalizing the username %q. See https://sourcegraph.com/docs/admin/auth/#username-normalization.", login), err
}
ghClient := s.newClient(token.AccessToken)

View File

@ -66,7 +66,7 @@ func (s *sessionIssuerHelper) GetOrCreateUser(ctx context.Context, token *oauth2
login, err := auth.NormalizeUsername(gUser.Username)
if err != nil {
return false, nil, fmt.Sprintf("Error normalizing the username %q. See https://docs.sourcegraph.com/admin/auth/#username-normalization.", login), err
return false, nil, fmt.Sprintf("Error normalizing the username %q. See https://sourcegraph.com/docs/admin/auth/#username-normalization.", login), err
}
provider := gitlab.NewClientProvider(extsvc.URNGitLabOAuth, s.BaseURL, nil)

View File

@ -62,7 +62,7 @@ func getOrCreateUser(ctx context.Context, db database.DB, p *Provider, token *oa
login, err = auth.NormalizeUsername(login)
if err != nil {
return false, nil,
fmt.Sprintf("Error normalizing the username %q. See https://docs.sourcegraph.com/admin/auth/#username-normalization.", login),
fmt.Sprintf("Error normalizing the username %q. See https://sourcegraph.com/docs/admin/auth/#username-normalization.", login),
errors.Wrap(err, "normalize username")
}

View File

@ -101,7 +101,7 @@ func getOrCreateUser(ctx context.Context, db database.DB, allowSignup bool, info
username, err := auth.NormalizeUsername(info.unnormalizedUsername)
if err != nil {
return false, nil, fmt.Sprintf("Error normalizing the username %q. See https://docs.sourcegraph.com/admin/auth/#username-normalization.", info.unnormalizedUsername), err
return false, nil, fmt.Sprintf("Error normalizing the username %q. See https://sourcegraph.com/docs/admin/auth/#username-normalization.", info.unnormalizedUsername), err
}
newUserCreated, userID, safeErrMsg, err := auth.GetAndSaveUser(ctx, db, auth.GetAndSaveUserOp{

View File

@ -47,7 +47,7 @@ To use `p4-fusion` while developing Sourcegraph, there are a couple of options.
#### Docker
[Run `gitserver` in a Docker container](https://docs.sourcegraph.com/dev/background-information/sg#run-gitserver-in-a-docker-container). This is the option that gives an experience closest to a deployed Sourcegraph instance, and will work for any platform/OS on which you're developing (running `sg start`).
[Run `gitserver` in a Docker container](https://sourcegraph.com/docs/dev/background-information/sg#run-gitserver-in-a-docker-container). This is the option that gives an experience closest to a deployed Sourcegraph instance, and will work for any platform/OS on which you're developing (running `sg start`).
#### Bazel
@ -57,7 +57,7 @@ Native binaries are provided through Bazel, built via Nix in [our fork of p4-fus
The `p4-fusion` native binary has been built on Linux and macOS, but is untested on Windows.
Read the [comprehensive instructions](https://docs.sourcegraph.com/dev/background-information/build_p4_fusion).
Read the [comprehensive instructions](https://sourcegraph.com/docs/dev/background-information/build_p4_fusion).
If you do go the native binary route, you may also want to enable using the wrapper shell script that detects when the process has been killed and outputs an error so that the calling process can handle it.

View File

@ -129,7 +129,7 @@ const (
)
// gitGCMode describes which mode we should be running git gc.
// See for a detailed description of the modes: https://docs.sourcegraph.com/dev/background-information/git_gc
// See for a detailed description of the modes: https://sourcegraph.com/docs/dev/background-information/git_gc
var gitGCMode = func() int {
// EnableGCAuto is a temporary flag that allows us to control whether or not
// `git gc --auto` is invoked during janitorial activities. This flag will

View File

@ -18,7 +18,7 @@ var meter = otel.GetMeterProvider().Meter("pings/shared")
func registerServerHandlers(logger log.Logger, r *mux.Router, pubsubClient pubsub.TopicPublisher) error {
r.Path("/").Methods(http.MethodGet).HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "https://docs.sourcegraph.com/admin/pings", http.StatusFound)
http.Redirect(w, r, "https://sourcegraph.com/docs/admin/pings", http.StatusFound)
})
requestCounter, err := meter.Int64Counter(

View File

@ -1,6 +1,6 @@
# This config was generated by Sourcegraph.
# You can adjust the configuration to add additional TLS or HTTP features.
# Read more at https://docs.sourcegraph.com/admin/nginx
# Read more at https://sourcegraph.com/docs/admin/nginx
error_log stderr;
pid /var/run/nginx.pid;

View File

@ -323,7 +323,7 @@ func runPostgresReindex() {
fmt.Printf("Upgrading to Sourcegraph 5.1 or later from an earlier release requires a database reindex.\n\n")
fmt.Printf("This process may take several hours, depending on the size of your database.\n\n")
fmt.Printf("If you do not wish to perform the reindex process now, you should switch back to a release before Sourcegraph 5.1.\n\n")
fmt.Printf("To perform the reindexing process now, please review the instructions at https://docs.sourcegraph.com/admin/migration/5_1 and restart the container with the environment variable `SOURCEGRAPH_5_1_DB_MIGRATION=true` set.\n")
fmt.Printf("To perform the reindexing process now, please review the instructions at https://sourcegraph.com/docs/admin/migration/5_1 and restart the container with the environment variable `SOURCEGRAPH_5_1_DB_MIGRATION=true` set.\n")
fmt.Printf("\n**************** MIGRATION REQUIRED **************\n\n")
os.Exit(101)

View File

@ -62,16 +62,16 @@ func MakeSqliteSearchFunc(observationCtx *observation.Context, cachedDatabaseWri
defer cancel()
info, err2 := db.GitserverRepos().GetByName(ctx, args.Repo)
if err2 != nil {
err = errors.New("Processing symbols using the SQLite backend is taking a while. If this repository is ~1GB+, enable [Rockskip](https://docs.sourcegraph.com/code_navigation/explanations/rockskip).")
err = errors.New("Processing symbols using the SQLite backend is taking a while. If this repository is ~1GB+, enable [Rockskip](https://sourcegraph.com/docs/code_navigation/explanations/rockskip).")
return
}
size := info.RepoSizeBytes
help := ""
if size > 1_000_000_000 {
help = "Enable [Rockskip](https://docs.sourcegraph.com/code_navigation/explanations/rockskip)."
help = "Enable [Rockskip](https://sourcegraph.com/docs/code_navigation/explanations/rockskip)."
} else if size > 100_000_000 {
help = "If this persists, enable [Rockskip](https://docs.sourcegraph.com/code_navigation/explanations/rockskip)."
help = "If this persists, enable [Rockskip](https://sourcegraph.com/docs/code_navigation/explanations/rockskip)."
} else {
help = "If this persists, make sure the symbols service has an SSD, a few GHz of CPU, and a few GB of RAM."
}

View File

@ -2,4 +2,4 @@
Telemetry Gateway is a managed service that ingests events exported from Sourcegraph instances, manipulates them as needed, and exports them to designated Pub/Sub topics or other destinations for processing.
Refer to [the Telemetry Gateway development documentation](https://docs.sourcegraph.com/dev/how-to/telemetry_gateway) for more development guidance.
Refer to [the Telemetry Gateway development documentation](https://sourcegraph.com/docs/dev/how-to/telemetry_gateway) for more development guidance.

View File

@ -104,7 +104,7 @@ func assertGitHubRepoPermissions(t *testing.T, ctx context.Context, repoID api.R
// for GITHUB_TOKEN, which can be found in 1Password.
//
// We also recommend setting up a new token for "sourcegraph-vcr" using the auth scope
// guidelines https://docs.sourcegraph.com/admin/external_service/github#github-api-token-and-access
// guidelines https://sourcegraph.com/docs/admin/external_service/github#github-api-access
// to ensure everything works, in case of new scopes being required.
func TestIntegration_GitHubPermissions(t *testing.T) {
if testing.Short() {

View File

@ -372,7 +372,7 @@ func newBitbucketProjectPermissionsWorker(ctx context.Context, observationCtx *o
}
// newBitbucketProjectPermissionsResetter implements resetter for the explicit_permissions_bitbucket_projects_jobs table.
// See resetter documentation for more details. https://docs.sourcegraph.com/dev/background-information/workers#dequeueing-and-resetting-jobs
// See resetter documentation for more details. https://sourcegraph.com/docs/dev/background-information/workers#dequeueing-and-resetting-jobs
func newBitbucketProjectPermissionsResetter(observationCtx *observation.Context, db database.DB, cfg *config, metrics bitbucketProjectPermissionsMetrics) *dbworker.Resetter[*types.BitbucketProjectPermissionJob] {
observationCtx = observation.ContextWithLogger(observationCtx.Logger.Scoped("BitbucketProjectPermissionsResetter"), observationCtx)

View File

@ -299,9 +299,9 @@ func (c *Client) createMessageBlocks(info *BuildNotification, author string) []s
&slack.TextBlockObject{
Type: slack.MarkdownType,
Text: `:books: *More information on flakes*
<https://docs.sourcegraph.com/dev/background-information/ci#flakes|How to disable flaky tests>
<https://sourcegraph.com/docs/dev/background-information/ci#flakes|How to disable flaky tests>
<https://github.com/sourcegraph/sourcegraph/issues/new/choose|Create a flaky test issue>
<https://docs.sourcegraph.com/dev/how-to/testing#assessing-flaky-client-steps|Recognizing flaky client steps and how to fix them>
<https://sourcegraph.com/docs/dev/how-to/testing#assessing-flaky-client-steps|Recognizing flaky client steps and how to fix them>
_Disable flakes on sight and save your fellow teammate some time!_`,
},

View File

@ -1,4 +1,4 @@
# Buildkite Pipeline for sourcegraph/sourcegraph
We dynamically generate our CI pipeline for [Buildkite](https://buildkite.com/sourcegraph/sourcegraph) based on the output of [gen-pipeline.go](./gen-pipeline.go).
To learn more, refer to the [continuous integration docs](https://docs.sourcegraph.com/dev/background-information/ci).
To learn more, refer to the [continuous integration docs](https://sourcegraph.com/docs/dev/background-information/ci).

View File

@ -51,7 +51,7 @@ if [[ $EXIT_CODE -ne 0 ]]; then
sg bazel configure
```
#### For more information please see the [Bazel FAQ](https://docs.sourcegraph.com/dev/background-information/bazel/faq)
#### For more information please see the [Bazel FAQ](https://sourcegraph.com/docs/dev/background-information/bazel/faq)
END
exit "$EXIT_CODE"
@ -75,7 +75,7 @@ if [[ $EXIT_CODE -ne 0 ]]; then
sg bazel configure godeps
```
#### For more information please see the [Bazel FAQ](https://docs.sourcegraph.com/dev/background-information/bazel/faq)
#### For more information please see the [Bazel FAQ](https://sourcegraph.com/docs/dev/background-information/bazel/faq)
END
exit "$EXIT_CODE"

View File

@ -31,5 +31,5 @@ ${runType}
${diff}
${messageFlags}
<br/>
Note that a Job has [**soft failed**](https://docs.sourcegraph.com/dev/background-information/ci#soft-failures) when you see this icon: ⚠️.
Note that a Job has [**soft failed**](https://sourcegraph.com/docs/dev/background-information/ci#soft-failures) when you see this icon: ⚠️.
EOF

View File

@ -123,7 +123,7 @@ func renderPipelineDocs(logger log.Logger, w io.Writer) {
fmt.Fprintln(w, "# Pipeline types reference")
fmt.Fprintln(w, "\nThis is a reference outlining what CI pipelines we generate under different conditions.")
fmt.Fprintln(w, "\nTo preview the pipeline for your branch, use `sg ci preview`.")
fmt.Fprintln(w, "\nFor a higher-level overview, please refer to the [continuous integration docs](https://docs.sourcegraph.com/dev/background-information/ci).")
fmt.Fprintln(w, "\nFor a higher-level overview, please refer to the [continuous integration docs](https://sourcegraph.com/docs/dev/background-information/ci).")
fmt.Fprintln(w, "\n## Run types")

View File

@ -2,4 +2,4 @@
The folder contains the scripts that our CI pipeline uses to run vulnerability scans with [Trivy](https://aquasecurity.github.io/trivy/).
See https://docs.sourcegraph.com/dev/background-information/ci for more information.
See https://sourcegraph.com/docs/dev/background-information/ci for more information.

File diff suppressed because one or more lines are too long

View File

@ -93,7 +93,7 @@ func TestOrganization(t *testing.T) {
}
})
// Docs: https://docs.sourcegraph.com/user/organizations
// Docs: https://sourcegraph.com/docs/user/organizations
t.Run("auth.userOrgMap", func(t *testing.T) {
// Create a test user (gqltest-org-user-1) without settings "auth.userOrgMap",
// the user should not be added to the organization (gqltest-org) automatically.

View File

@ -45,7 +45,7 @@ func main() {
log.Fatal(err)
}
fmt.Printf(`https://docs.sourcegraph.com/admin/auth#http-authentication-proxies
fmt.Printf(`https://sourcegraph.com/docs/admin/auth#http-authentication-proxies
"auth.providers": [
{

View File

@ -3,7 +3,7 @@
# This script either generates a report of third-party dependencies, or runs a check that fails
# if there are any unapproved dependencies ('action items').
#
# Please refer to the handbook entry for more details: https://docs.sourcegraph.com/dev/background-information/ci#third-party-licenses
# Please refer to the handbook entry for more details: https://sourcegraph.com/docs/dev/background-information/ci#third-party-licenses
set -euf -o pipefail
@ -40,5 +40,5 @@ license_finder ignored_dependencies list
license_finder dependencies list
# run license check
echo "Running license_finder - if this fails, refer to our handbook: https://docs.sourcegraph.com/dev/background-information/ci#third-party-licenses"
echo "Running license_finder - if this fails, refer to our handbook: https://sourcegraph.com/docs/dev/background-information/ci#third-party-licenses"
license_finder "${COMMAND}" --columns=package_manager name version licenses homepage approved

View File

@ -1,7 +1,7 @@
# This files provides an easy way to start Redis and PostgreSQL servers for
# development, via docker-compose.
#
# See https://docs.sourcegraph.com/dev/getting-started/quickstart_3_initialize_database#with-docker
# See https://sourcegraph.com/docs/dev/setup/quickstart#run-databases
#
# You can also use `sg run redis-postgres`.
services:

View File

@ -133,7 +133,7 @@ export async function addToBatchChange(
}
/**
* Subset of batch change spec: https://docs.sourcegraph.com/batch_changes/references/batch_spec_yaml_reference
* Subset of batch change spec: https://sourcegraph.com/docs/batch_changes/references/batch_spec_yaml_reference
*/
interface BatchChangeSpec {
name: string

View File

@ -668,7 +668,7 @@ export async function createLatestRelease(
return ''
}
const updateURL = 'https://docs.sourcegraph.com/admin/updates'
const updateURL = 'https://sourcegraph.com/docs/admin/updates'
const releasePostURL = `https://sourcegraph.com/blog/release/${release.major}.${release.minor}` // CI:URL_OK
const request: Octokit.RequestOptions & Octokit.ReposCreateReleaseParams = {

View File

@ -26,4 +26,4 @@
```
`sg` is the CLI tool that Sourcegraph developers can use to develop Sourcegraph.
Learn more about it [here](https://docs.sourcegraph.com/dev/background-information/sg).
Learn more about it [here](https://sourcegraph.com/docs/dev/background-information/sg).

View File

@ -1,3 +1,3 @@
# `sg` Vision
This page has moved to [`sg` vision](https://docs.sourcegraph.com/dev/background-information/sg/vision).
This page has moved to [`sg` vision](https://sourcegraph.com/docs/dev/background-information/sg/vision).

View File

@ -189,7 +189,7 @@ func SourcegraphDatabase(getConfig func() (*sgconf.Config, error)) CheckFunc {
dsn := postgresdsn.New("", "", getEnv)
if err := pingPG(ctx, dsn); err != nil {
return errors.Wrapf(err, "failed to connect to Sourcegraph Postgres database at %s. Please check the settings in sg.config.yml (see https://docs.sourcegraph.com/dev/background-information/sg#changing-database-configuration)", dsn)
return errors.Wrapf(err, "failed to connect to Sourcegraph Postgres database at %s. Please check the settings in sg.config.yml (see https://sourcegraph.com/docs/dev/background-information/sg#changing-database-configuration)", dsn)
}
return nil
}

View File

@ -68,7 +68,7 @@ func AddWithTemplate(database db.Database, migrationName, upMigrationFileTemplat
block.Writef("Down query file: %s", rootRelative(files.DownFile))
block.Writef("Metadata file: %s", rootRelative(files.MetadataFile))
block.Close()
line := output.Styled(output.StyleUnderline, "https://docs.sourcegraph.com/dev/background-information/sql/migrations")
line := output.Styled(output.StyleUnderline, "https://sourcegraph.com/docs/dev/background-information/sql/migrations")
line.Prefix = "Checkout the development docs for migrations: "
std.Out.WriteLine(line)

View File

@ -76,7 +76,7 @@ func lintLoggingLibraries() *linter {
return errors.Newf(`banned usage of '%s': use "github.com/sourcegraph/log" instead`,
bannedImport)
},
HelpText: "Learn more about logging and why some libraries are banned: https://docs.sourcegraph.com/dev/how-to/add_logging",
HelpText: "Learn more about logging and why some libraries are banned: https://sourcegraph.com/docs/dev/how-to/add_logging",
})
}

View File

@ -84,7 +84,7 @@ const sgBugReportTemplate = "https://github.com/sourcegraph/sourcegraph/issues/n
// sg is the main sg CLI application.
var sg = &cli.App{
Usage: "The Sourcegraph developer tool!",
Description: "Learn more: https://docs.sourcegraph.com/dev/background-information/sg",
Description: "Learn more: https://sourcegraph.com/docs/dev/background-information/sg",
Version: BuildCommit,
Compiled: time.Now(),
Flags: []cli.Flag{

View File

@ -172,7 +172,7 @@ In order to be compliant with SOC2, you or someone from your team *must* documen
2. Explain why no test plan was provided and why the PR wasn't reviewed before being merged.
3. Close the issue.
Read more about [test plans](https://docs.sourcegraph.com/dev/background-information/testing_principles#test-plans) and [reviews](https://docs.sourcegraph.com/dev/background-information/pull_request_reviews).
Read more about [test plans](https://sourcegraph.com/docs/dev/background-information/testing_principles#test-plans) and [reviews](https://docs.sourcegraph.com/dev/background-information/pull_request_reviews).
{{""}}
{{- range . }}
- _{{ .CreatedAt }}_ @{{ .Author }}

View File

@ -24,7 +24,7 @@ var cloudCommand = &cli.Command{
Usage: "Install and work with Sourcegraph Cloud tools",
Description: `Learn more about Sourcegraph Cloud:
- Product: https://docs.sourcegraph.com/cloud
- Product: https://sourcegraph.com/docs/cloud
- Handbook: https://handbook.sourcegraph.com/departments/cloud/
`,
Category: category.Company,

View File

@ -19,7 +19,7 @@ import (
var monitoringCommand = &cli.Command{
Name: "monitoring",
Usage: "Sourcegraph's monitoring generator (dashboards, alerts, etc)",
Description: `Learn more about the Sourcegraph monitoring generator here: https://docs.sourcegraph.com/dev/background-information/observability/monitoring-generator
Description: `Learn more about the Sourcegraph monitoring generator here: https://sourcegraph.com/docs/dev/background-information/observability/monitoring-generator
Also refer to the generated reference documentation available for site admins:

View File

@ -251,7 +251,7 @@ func startExec(ctx *cli.Context) error {
if !exists {
std.Out.WriteLine(output.Styled(output.StyleWarning, "ERROR: dev-private repository not found!"))
std.Out.WriteLine(output.Styledf(output.StyleWarning, "It's expected to exist at: %s", devPrivatePath))
std.Out.WriteLine(output.Styled(output.StyleWarning, "See the documentation for how to get set up: https://docs.sourcegraph.com/dev/setup/quickstart#run-sg-setup"))
std.Out.WriteLine(output.Styled(output.StyleWarning, "See the documentation for how to get set up: https://sourcegraph.com/docs/dev/setup/quickstart#run-sg-setup"))
std.Out.Write("")
overwritePath := filepath.Join(repoRoot, "sg.config.overwrite.yaml")

View File

@ -23,7 +23,7 @@ It will be replaced with Telemetry V2 - code that is instrumented with the new
Telemetry SDKs will automatically export safe telemetry in accordance with the
Sourcegraph instance's allowed policies.
For more details, see https://docs.sourcegraph.com/dev/background-information/telemetry
For more details, see https://sourcegraph.com/docs/dev/background-information/telemetry
or reach out in #discuss-analytics.`
func renderTelemetryV1DeprecationWarning() {
@ -50,7 +50,7 @@ var allowlistCommand = &cli.Command{
Flags: []cli.Flag{},
Description: `
Utility that will generate SQL to add and remove events from the usage data allow list.
https://docs.sourcegraph.com/dev/background-information/data-usage-pipeline#allow-list
https://sourcegraph.com/docs/dev/background-information/data-usage-pipeline#allow-list
Events are keyed by event name and passed in as additional arguments to the add and remove subcommands.
`,

View File

@ -208,7 +208,7 @@ Generated query for warning alert: `max((sum by (alert_type) (increase(src_graph
- Confirm that the Sourcegraph frontend has enough CPU/memory using the provisioning panels.
- Investigate potential sources of latency by selecting Explore and modifying the `sum by(le)` section to include additional labels: for example, `sum by(le, job)` or `sum by (le, instance)`.
- Trace a request to see what the slowest part is: https://docs.sourcegraph.com/admin/observability/tracing
- Trace a request to see what the slowest part is: https://sourcegraph.com/docs/admin/observability/tracing
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#frontend-page-load-latency).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -842,7 +842,7 @@ Generated query for critical alert: `max((sum(increase(src_cloudkms_cryptographi
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#frontend-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -1518,7 +1518,7 @@ Generated query for critical alert: `max((max(max_over_time(src_conf_client_time
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#gitserver-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -1836,7 +1836,7 @@ Generated query for warning alert: `min((sum by (job) (pg_stat_activity_count{da
**Next steps**
- Consider increasing [max_connections](https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-MAX-CONNECTIONS) of the database instance, [learn more](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Consider increasing [max_connections](https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-MAX-CONNECTIONS) of the database instance, [learn more](https://sourcegraph.com/docs/admin/config/postgres-conf)
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#postgres-usage-connections-percentage).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -2260,7 +2260,7 @@ Generated query for warning alert: `max((max(src_codeintel_upload_queued_duratio
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#precise-code-intel-worker-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -3204,7 +3204,7 @@ Generated query for warning alert: `max((max(src_codeintel_commit_graph_queued_d
**Next steps**
- **Enabled permissions for the first time:** Wait for few minutes and see if the number goes down.
- **Otherwise:** Increase the API rate limit to [GitHub](https://docs.sourcegraph.com/admin/external_service/github#github-com-rate-limits), [GitLab](https://docs.sourcegraph.com/admin/external_service/gitlab#internal-rate-limits) or [Bitbucket Server](https://docs.sourcegraph.com/admin/external_service/bitbucket_server#internal-rate-limits).
- **Otherwise:** Increase the API rate limit to [GitHub](https://sourcegraph.com/docs/admin/external_service/github#github-com-rate-limits), [GitLab](https://sourcegraph.com/docs/admin/external_service/gitlab#internal-rate-limits) or [Bitbucket Server](https://sourcegraph.com/docs/admin/external_service/bitbucket_server#internal-rate-limits).
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#worker-perms-syncer-outdated-perms).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -3331,7 +3331,7 @@ Generated query for warning alert: `max((max(src_query_runner_worker_total{job=~
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#worker-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -4448,7 +4448,7 @@ Generated query for critical alert: `max((max(max_over_time(src_conf_client_time
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#repo-updater-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -4893,7 +4893,7 @@ Generated query for critical alert: `max((max(max_over_time(src_conf_client_time
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#searcher-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -5278,7 +5278,7 @@ Generated query for critical alert: `max((max(max_over_time(src_conf_client_time
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#symbols-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -5987,7 +5987,7 @@ Generated query for warning alert: `max((sum by (code) (increase(src_zoekt_reque
- Enabling shard merging for Zoekt: Set SRC_ENABLE_SHARD_MERGING="1" for zoekt-indexserver. Use this option
if your corpus of repositories has a high percentage of small, rarely updated repositories. See
[documentation](https://docs.sourcegraph.com/code_search/explanations/search_details#shard-merging).
[documentation](https://sourcegraph.com/docs/code-search/features#shard-merging).
- Creating additional Zoekt replicas: This spreads all the shards out amongst more replicas, which
means that each _individual_ replica will have fewer shards. This, in turn, decreases the
amount of memory map areas that a _single_ replica can create (in order to load the shards into memory).
@ -6576,7 +6576,7 @@ Generated query for warning alert: `max((sum by (rule_group) (rate(prometheus_ru
**Next steps**
- Check the Container monitoring (not available on server) panels and try increasing resources for Prometheus if necessary.
- Ensure that your [`observability.alerts` configuration](https://docs.sourcegraph.com/admin/observability/alerting#setting-up-alerting) (in site configuration) is valid.
- Ensure that your [`observability.alerts` configuration](https://sourcegraph.com/docs/admin/observability/alerting#setting-up-alerting) (in site configuration) is valid.
- Check if the relevant alert integration service is experiencing downtime or issues.
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#prometheus-alertmanager-notification-latency).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -6608,7 +6608,7 @@ Generated query for warning alert: `max((sum by (integration) (rate(alertmanager
**Next steps**
- Ensure that your [`observability.alerts` configuration](https://docs.sourcegraph.com/admin/observability/alerting#setting-up-alerting) (in site configuration) is valid.
- Ensure that your [`observability.alerts` configuration](https://sourcegraph.com/docs/admin/observability/alerting#setting-up-alerting) (in site configuration) is valid.
- Check if the relevant alert integration service is experiencing downtime or issues.
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#prometheus-alertmanager-notification-failures).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -6641,7 +6641,7 @@ Generated query for warning alert: `max((sum by (integration) (rate(alertmanager
**Next steps**
- Check Prometheus logs for messages related to configuration loading.
- Ensure any [custom configuration you have provided Prometheus](https://docs.sourcegraph.com/admin/observability/metrics#prometheus-configuration) is valid.
- Ensure any [custom configuration you have provided Prometheus](https://sourcegraph.com/docs/admin/observability/metrics#prometheus-configuration) is valid.
- More help interpreting this metric is available in the [dashboards reference](./dashboards.md#prometheus-prometheus-config-status).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -6672,7 +6672,7 @@ Generated query for warning alert: `min((prometheus_config_last_reload_successfu
**Next steps**
- Ensure that your [`observability.alerts` configuration](https://docs.sourcegraph.com/admin/observability/alerting#setting-up-alerting) (in site configuration) is valid.
- Ensure that your [`observability.alerts` configuration](https://sourcegraph.com/docs/admin/observability/alerting#setting-up-alerting) (in site configuration) is valid.
- More help interpreting this metric is available in the [dashboards reference](./dashboards.md#prometheus-alertmanager-config-status).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
@ -7661,7 +7661,7 @@ Generated query for critical alert: `max((max(max_over_time(src_conf_client_time
**Next steps**
- Increase SRC_PGSQL_MAX_OPEN together with giving more memory to the database if needed
- Scale up Postgres memory/cpus - [see our scaling guide](https://docs.sourcegraph.com/admin/config/postgres-conf)
- Scale up Postgres memory/cpus - [see our scaling guide](https://sourcegraph.com/docs/admin/config/postgres-conf)
- If using GCP Cloud SQL, check for high lock waits or CPU usage in query insights
- Learn more about the related dashboard panel in the [dashboards reference](./dashboards.md#embeddings-mean-blocked-seconds-per-conn-request).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:

View File

@ -4,7 +4,7 @@
This document contains a complete reference on Sourcegraph's available dashboards, as well as details on how to interpret the panels and metrics.
To learn more about Sourcegraph's metrics and how to view these dashboards, see [our metrics guide](https://docs.sourcegraph.com/admin/observability/metrics).
To learn more about Sourcegraph's metrics and how to view these dashboards, see [our metrics guide](https://sourcegraph.com/docs/admin/observability/metrics).
## Frontend
@ -5223,7 +5223,7 @@ p95 response time to incoming webhook requests from code hosts.
Increases in response time can point to too much load on the database to keep up with the incoming requests.
See this documentation page for more details on webhook requests: (https://docs.sourcegraph.com/admin/config/webhooks/incoming)
See this documentation page for more details on webhook requests: (https://sourcegraph.com/docs/admin/config/webhooks/incoming)
This panel has no related alerts.
@ -11478,7 +11478,7 @@ Query: `max by (type) (ceil(rate(src_repo_perms_syncer_sync_errors_total[1m])))`
<p class="subtitle">Total number of repos scheduled for permissions sync</p>
Indicates how many repositories have been scheduled for a permissions sync.
More about repository permissions synchronization [here](https://docs.sourcegraph.com/admin/permissions/syncing#scheduling)
More about repository permissions synchronization [here](https://sourcegraph.com/docs/admin/permissions/syncing#scheduling)
This panel has no related alerts.
@ -22485,7 +22485,7 @@ Query: `sum by(job) (scrape_samples_post_metric_relabeling{job!=""})`
A high value here indicates Prometheus rule evaluation is taking longer than expected.
It might indicate that certain rule groups are taking too long to evaluate, or Prometheus is underprovisioned.
Rules that Sourcegraph ships with are grouped under `/sg_config_prometheus`. [Custom rules are grouped under `/sg_prometheus_addons`](https://docs.sourcegraph.com/admin/observability/metrics#prometheus-configuration).
Rules that Sourcegraph ships with are grouped under `/sg_config_prometheus`. [Custom rules are grouped under `/sg_prometheus_addons`](https://sourcegraph.com/docs/admin/observability/metrics#prometheus-configuration).
Refer to the [alerts reference](./alerts.md#prometheus-prometheus-rule-eval-duration) for 1 alert related to this panel.
@ -22506,7 +22506,7 @@ Query: `sum by(rule_group) (avg_over_time(prometheus_rule_group_last_duration_se
<p class="subtitle">Failed prometheus rule evaluations over 5m by rule group</p>
Rules that Sourcegraph ships with are grouped under `/sg_config_prometheus`. [Custom rules are grouped under `/sg_prometheus_addons`](https://docs.sourcegraph.com/admin/observability/metrics#prometheus-configuration).
Rules that Sourcegraph ships with are grouped under `/sg_config_prometheus`. [Custom rules are grouped under `/sg_prometheus_addons`](https://sourcegraph.com/docs/admin/observability/metrics#prometheus-configuration).
Refer to the [alerts reference](./alerts.md#prometheus-prometheus-rule-eval-failures) for 1 alert related to this panel.

View File

@ -6,7 +6,7 @@ FROM alpine:3.14@sha256:92d13cc58a46e012300ef49924edc56de5642ada25c9a457dce4a6db
LABEL org.opencontainers.image.url=https://sourcegraph.com/
LABEL org.opencontainers.image.source=https://github.com/sourcegraph/sourcegraph/
LABEL org.opencontainers.image.documentation=https://docs.sourcegraph.com/
LABEL org.opencontainers.image.documentation=https://sourcegraph.com/docs/
# Add the sourcegraph group, user, and create the home directory.
#

View File

@ -1,6 +1,6 @@
# Sourcegraph cAdvisor
Learn more about the Sourcegraph cAdvisor distribution in the [cAdvisor documentation](https://docs.sourcegraph.com/dev/background-information/observability/cadvisor).
Learn more about the Sourcegraph cAdvisor distribution in the [cAdvisor documentation](https://sourcegraph.com/docs/dev/background-information/observability/cadvisor).
## Updating the image

View File

@ -12,7 +12,7 @@ LABEL org.opencontainers.image.created=${DATE}
LABEL org.opencontainers.image.version=${VERSION}
LABEL org.opencontainers.image.url=https://sourcegraph.com/
LABEL org.opencontainers.image.source=https://github.com/sourcegraph/sourcegraph/
LABEL org.opencontainers.image.documentation=https://docs.sourcegraph.com/
LABEL org.opencontainers.image.documentation=https://sourcegraph.com/docs/
LABEL com.sourcegraph.github.url=https://github.com/sourcegraph/sourcegraph/commit/${COMMIT_SHA}
VOLUME /var/lib/docker

View File

@ -2,7 +2,7 @@
Vanilla Grafana image with provisioned Sourcegraph dashboards and config.
To learn more, refer to the [Sourcegraph observability developer guide](https://docs.sourcegraph.com/dev/background-information/observability) and [monitoring architecture](https://handbook.sourcegraph.com/engineering/observability/monitoring_architecture#sourcegraph-grafana).
To learn more, refer to the [Sourcegraph observability developer guide](https://sourcegraph.com/docs/dev/background-information/observability) and [monitoring architecture](https://handbook.sourcegraph.com/engineering/observability/monitoring_architecture#sourcegraph-grafana).
## Image API

View File

@ -5,7 +5,7 @@ This distribution of the [OpenTelemetry collector](https://opentelemetry.io/docs
- [selected integrations](#integrations) (receivers, exporters, and extensions) for the OpenTelemetry collector
- [basic collector configuration](#configurations) that can be used out-of-the-box in `/etc/otel-collector/configs` with the `--config` flag for some common Sourcegraph deployment configurations.
This custom build undergoes Sourcegraph's [image vulnerability scanning](https://docs.sourcegraph.com/dev/background-information/ci#image-vulnerability-scanning) to audit the bundled dependencies.
This custom build undergoes Sourcegraph's [image vulnerability scanning](https://sourcegraph.com/docs/dev/background-information/ci#image-vulnerability-scanning) to audit the bundled dependencies.
To get started:

View File

@ -5,7 +5,7 @@ The `sourcegraph/prometheus` image provides an all-in-one image through `prom-wr
- Vanilla Prometheus with embedded Sourcegraph configuration
- Bundled Alertmanager with a `siteConfigSubscriber` sidecar service to automatically apply relevant configuration changes to Alertmanager
To learn more, refer to the [Sourcegraph observability developer guide](https://docs.sourcegraph.com/dev/background-information/observability) and [monitoring architecture](https://handbook.sourcegraph.com/engineering/observability/monitoring_architecture#sourcegraph-prometheus).
To learn more, refer to the [Sourcegraph observability developer guide](https://sourcegraph.com/docs/dev/background-information/observability) and [monitoring architecture](https://handbook.sourcegraph.com/engineering/observability/monitoring_architecture#sourcegraph-prometheus).
## Image API

View File

@ -1,3 +1,3 @@
# prom-wrapper
Prom-wrapper is a service that ships with the [Sourcegraph Prometheus image](https://docs.sourcegraph.com/dev/background-information/observability/prometheus).
Prom-wrapper is a service that ships with the [Sourcegraph Prometheus image](https://sourcegraph.com/docs/dev/background-information/observability/prometheus).

View File

@ -1,7 +1,7 @@
// Command prom-wrapper provides a wrapper command for Prometheus that
// also handles Sourcegraph configuration changes and making changes to Prometheus.
//
// See https://docs.sourcegraph.com/dev/background-information/observability/prometheus
// See https://sourcegraph.com/docs/dev/background-information/observability/prometheus
package main
import (

View File

@ -27,7 +27,7 @@ const (
colorGood = "#00FF00" // green
)
const docsURL = "https://docs.sourcegraph.com"
const docsURL = "https://sourcegraph.com/docs"
const alertsDocsPathPath = "admin/observability/alerts"
// alertsReferenceURL generates a link to the alerts reference page that embeds the appropriate version

2
go.mod
View File

@ -8,7 +8,7 @@ go 1.21
// or intentional forks.
replace (
// We use a fork of Alertmanager to allow prom-wrapper to better manipulate Alertmanager configuration.
// See https://docs.sourcegraph.com/dev/background-information/observability/prometheus
// See https://sourcegraph.com/docs/dev/background-information/observability/prometheus
github.com/prometheus/alertmanager => github.com/sourcegraph/alertmanager v0.21.1-0.20211110092431-863f5b1ee51b
// We publish 'dev/ci/images' as a package for import in other tooling.
// When developing Sourcegraph itself, this replace uses the local package instead of a pushed version.

View File

@ -157,7 +157,7 @@ func TestAuthzProvidersFromConfig(t *testing.T) {
},
},
expAuthzAllowAccessByDefault: false,
expSeriousProblems: []string{"Did not find authentication provider matching \"https://gitlab.mine\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://docs.sourcegraph.com/admin/auth) exists for https://gitlab.mine."},
expSeriousProblems: []string{"Did not find authentication provider matching \"https://gitlab.mine\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://sourcegraph.com/docs/admin/auth) exists for https://gitlab.mine."},
},
{
description: "1 GitLab connection with authz enabled, no GitLab auth provider",
@ -178,7 +178,7 @@ func TestAuthzProvidersFromConfig(t *testing.T) {
},
},
expAuthzAllowAccessByDefault: false,
expSeriousProblems: []string{"Did not find authentication provider matching \"https://gitlab.mine\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://docs.sourcegraph.com/admin/auth) exists for https://gitlab.mine."},
expSeriousProblems: []string{"Did not find authentication provider matching \"https://gitlab.mine\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://sourcegraph.com/docs/admin/auth) exists for https://gitlab.mine."},
},
{
description: "Two GitLab connections with authz enabled, two matching GitLab auth providers",
@ -1806,7 +1806,7 @@ func TestValidateExternalServiceConfig(t *testing.T) {
"authorization": { "identityProvider": { "type": "oauth" } }
}
`,
assert: includes("Did not find authentication provider matching \"https://gitlab.foo.bar\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://docs.sourcegraph.com/admin/auth) exists for https://gitlab.foo.bar."),
assert: includes("Did not find authentication provider matching \"https://gitlab.foo.bar\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://sourcegraph.com/docs/admin/auth) exists for https://gitlab.foo.bar."),
},
{
kind: extsvc.KindGitLab,
@ -1820,7 +1820,7 @@ func TestValidateExternalServiceConfig(t *testing.T) {
ps: []schema.AuthProviders{
{Gitlab: &schema.GitLabAuthProvider{Url: "https://gitlab.foo.bar"}},
},
assert: excludes("Did not find authentication provider matching \"https://gitlab.foo.bar\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://docs.sourcegraph.com/admin/auth) exists for https://gitlab.foo.bar."),
assert: excludes("Did not find authentication provider matching \"https://gitlab.foo.bar\". Check the [**site configuration**](/site-admin/configuration) to verify an entry in [`auth.providers`](https://sourcegraph.com/docs/admin/auth) exists for https://gitlab.foo.bar."),
},
{
kind: extsvc.KindGitLab,
@ -1838,7 +1838,7 @@ func TestValidateExternalServiceConfig(t *testing.T) {
}
}
`,
assert: includes("Did not find authentication provider matching type bar and configID foo. Check the [**site configuration**](/site-admin/configuration) to verify that an entry in [`auth.providers`](https://docs.sourcegraph.com/admin/auth) matches the type and configID."),
assert: includes("Did not find authentication provider matching type bar and configID foo. Check the [**site configuration**](/site-admin/configuration) to verify that an entry in [`auth.providers`](https://sourcegraph.com/docs/admin/auth) matches the type and configID."),
},
{
kind: extsvc.KindGitLab,
@ -1864,7 +1864,7 @@ func TestValidateExternalServiceConfig(t *testing.T) {
},
},
},
assert: excludes("Did not find authentication provider matching type bar and configID foo. Check the [**site configuration**](/site-admin/configuration) to verify that an entry in [`auth.providers`](https://docs.sourcegraph.com/admin/auth) matches the type and configID."),
assert: excludes("Did not find authentication provider matching type bar and configID foo. Check the [**site configuration**](/site-admin/configuration) to verify that an entry in [`auth.providers`](https://sourcegraph.com/docs/admin/auth) matches the type and configID."),
},
{
kind: extsvc.KindGitLab,
@ -1890,7 +1890,7 @@ func TestValidateExternalServiceConfig(t *testing.T) {
},
},
},
assert: excludes("Did not find authentication provider matching type bar and configID foo. Check the [**site configuration**](/site-admin/configuration) to verify that an entry in [`auth.providers`](https://docs.sourcegraph.com/admin/auth) matches the type and configID."),
assert: excludes("Did not find authentication provider matching type bar and configID foo. Check the [**site configuration**](/site-admin/configuration) to verify that an entry in [`auth.providers`](https://sourcegraph.com/docs/admin/auth) matches the type and configID."),
},
{
kind: extsvc.KindGitLab,

View File

@ -315,7 +315,7 @@ func marshalJSON(v any) []byte {
// need a Bitbucket Server API up and running to run those tests. But if
// you want to work on these tests / code, you need to start a new instance
// of Bitbucket Server with docker, create an Application Link as per
// https://docs.sourcegraph.com/admin/external_service/bitbucket_server, and
// https://sourcegraph.com/docs/admin/external_service/bitbucket_server, and
// then run the tests with -update=true.
type fixtures struct {
users map[string]*bitbucketserver.User

Some files were not shown because too many files have changed in this diff Show More