From 9b8db81d32cd50007192d4b9a325b7db09962786 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Sun, 6 Sep 2026 04:11:26 -0600 Subject: [PATCH] Fix broken anchors and links found by check-links --check-anchors Amp-Thread-ID: https://ampcode.com/threads/T-01a07623-9d65-7356-96b8-2bebb31ffa5a Co-authored-by: Amp --- docs/admin/audit-log.mdx | 2 +- docs/admin/auth/builtin.mdx | 4 +- docs/admin/auth/index.mdx | 18 ++++----- docs/admin/auth/login-form.mdx | 2 +- docs/admin/auth/saml/azure-ad.mdx | 2 +- docs/admin/auth/saml/index.mdx | 2 +- docs/admin/auth/saml/microsoft-adfs.mdx | 4 +- docs/admin/code-hosts/aws-codecommit.mdx | 2 +- docs/admin/code-hosts/bitbucket-server.mdx | 6 +-- docs/admin/code-hosts/gerrit.mdx | 2 +- docs/admin/code-hosts/github.mdx | 18 ++++----- docs/admin/code-hosts/gitlab.mdx | 2 +- docs/admin/code-hosts/non-git.mdx | 2 +- docs/admin/code-hosts/rate-limits.mdx | 12 +++--- .../authorization-and-authentication.mdx | 4 +- docs/admin/config/batch-changes.mdx | 2 +- docs/admin/executors/index.mdx | 2 +- docs/admin/faq.mdx | 6 +-- ...ng-version-contexts-to-search-contexts.mdx | 4 +- docs/admin/how-to/index.mdx | 2 +- docs/admin/how-to/internal-github-repos.mdx | 2 +- docs/admin/how-to/monorepo-issues.mdx | 2 +- docs/admin/how-to/site-admin-quickstart.mdx | 2 +- docs/admin/index.mdx | 4 +- docs/admin/migration/opengrok.mdx | 6 +-- docs/admin/outbound-request-log.mdx | 4 +- docs/admin/permissions/index.mdx | 2 +- docs/admin/permissions/syncing.mdx | 2 +- docs/admin/permissions/webhooks.mdx | 2 +- docs/admin/repo/auth.mdx | 2 +- docs/admin/repo/git-config.mdx | 2 +- docs/admin/repo/perforce.mdx | 10 ++--- docs/admin/repo/update-frequency.mdx | 8 ++-- docs/admin/scim.mdx | 2 +- docs/admin/search.mdx | 4 +- docs/admin/security-event-logs.mdx | 2 +- docs/admin/telemetry/protocol.mdx | 4 +- docs/admin/webhooks/incoming.mdx | 4 +- docs/analytics/api.mdx | 2 +- docs/batch-changes/batch-spec-templating.mdx | 6 +-- .../batch-spec-yaml-reference.mdx | 28 +++++++------- .../batch-changes/configuring-credentials.mdx | 2 +- docs/batch-changes/create-a-batch-change.mdx | 2 +- docs/batch-changes/delete-a-batch-change.mdx | 2 +- docs/batch-changes/faq.mdx | 2 +- .../handling-errored-changesets.mdx | 2 +- docs/batch-changes/rebasing-changesets.mdx | 2 +- ...reexecuting-batch-specs-multiple-times.mdx | 2 +- .../site-admin-configuration.mdx | 4 +- .../tracking-existing-changesets.mdx | 2 +- docs/cloud/index.mdx | 4 +- .../automatically-generated-data-series.mdx | 2 +- .../explanations/code-insights-filters.mdx | 2 +- .../current-limitations-of-code-insights.mdx | 2 +- ...ng-a-custom-dashboard-of-code-insights.mdx | 2 +- .../how-tos/filtering-an-insight.mdx | 4 +- .../language-insight-quickstart.mdx | 4 +- docs/code-insights/quickstart.mdx | 2 +- .../references/common-use-cases.mdx | 2 +- .../code-insights/references/requirements.mdx | 2 +- .../auto-indexing-configuration.mdx | 22 +++++------ docs/code-navigation/auto-indexing.mdx | 6 +-- docs/code-navigation/envvars.mdx | 6 +-- docs/code-navigation/explanations/uploads.mdx | 2 +- .../how-to/index-other-languages.mdx | 6 +-- docs/code-navigation/index.mdx | 2 +- .../inference-configuration.mdx | 2 +- .../precise-code-navigation.mdx | 4 +- docs/code-search/features.mdx | 2 +- docs/code-search/how-to/opengrok.mdx | 10 ++--- docs/code-search/index.mdx | 2 +- docs/code-search/queries/index.mdx | 4 +- docs/code-search/types/symbol.mdx | 2 +- .../capabilities/agentic-context-fetching.mdx | 2 +- docs/cody/capabilities/chat.mdx | 2 +- docs/cody/clients/cody-with-sourcegraph.mdx | 2 +- docs/cody/clients/install-jetbrains.mdx | 4 +- docs/cody/clients/install-vscode.mdx | 4 +- docs/cody/core-concepts/index.mdx | 2 +- docs/cody/enterprise/model-configuration.mdx | 2 +- .../getting-started/github-vs-sourcegraph.mdx | 10 ++--- docs/getting-started/index.mdx | 4 +- docs/integration/bitbucket-server.mdx | 4 +- docs/integration/github.mdx | 2 +- docs/integration/gitlab.mdx | 2 +- docs/integration/gitolite.mdx | 4 +- docs/integration/phabricator.mdx | 8 ++-- .../deploy/docker-compose/operations.mdx | 6 +-- .../deploy/docker-compose/upgrade.mdx | 2 +- docs/self-hosted/deploy/kubernetes/azure.mdx | 2 +- .../deploy/kubernetes/configure.mdx | 38 +++++++++---------- .../deploy/kubernetes/kustomize.mdx | 6 +-- .../deploy/kubernetes/kustomize/eks.mdx | 2 +- .../deploy/kubernetes/kustomize/gke.mdx | 2 +- .../deploy/kubernetes/kustomize/index.mdx | 22 +++++------ .../deploy/kubernetes/kustomize/migrate.mdx | 8 ++-- .../deploy/kubernetes/operations.mdx | 4 +- .../deploy/kubernetes/troubleshoot.mdx | 4 +- .../deploy/machine-images/aws-ami.mdx | 2 +- .../deploy/machine-images/aws-oneclick.mdx | 2 +- .../self-hosted/deploy/machine-images/gce.mdx | 2 +- docs/self-hosted/deploy/repositories.mdx | 4 +- .../self-hosted/deploy/single-node/script.mdx | 2 +- .../self-hosted/deployment-best-practices.mdx | 4 +- docs/self-hosted/email.mdx | 6 +-- docs/self-hosted/external-services/index.mdx | 2 +- docs/self-hosted/faq.mdx | 6 +-- docs/self-hosted/how-to/dirty-database.mdx | 4 +- docs/self-hosted/how-to/index.mdx | 6 +-- docs/self-hosted/how-to/monitoring-guide.mdx | 2 +- .../how-to/postgres14-index-corruption.mdx | 2 +- .../rebuild-corrupt-postgres-indexes.mdx | 2 +- .../how-to/unfinished-migration.mdx | 4 +- docs/self-hosted/http-https-configuration.mdx | 6 +-- docs/self-hosted/observability/alerting.mdx | 6 +-- docs/self-hosted/observability/logs.mdx | 2 +- docs/self-hosted/observability/metrics.mdx | 2 +- .../observability/troubleshooting.mdx | 8 ++-- docs/self-hosted/pprof.mdx | 2 +- .../updates/migrator/migrator-operations.mdx | 2 +- .../migrator/upgrading-early-versions.mdx | 2 +- docs/self-hosted/workers.mdx | 2 +- docs/technical-changelog.mdx | 4 +- 123 files changed, 274 insertions(+), 274 deletions(-) diff --git a/docs/admin/audit-log.mdx b/docs/admin/audit-log.mdx index 82d6574a6..953982d6d 100644 --- a/docs/admin/audit-log.mdx +++ b/docs/admin/audit-log.mdx @@ -135,7 +135,7 @@ Audit logs are structured logs delivered as JSON to STDERR. As long as one can i ### Log Output -All audit logs are delivered to **STDERR** for each individual [component](/self-hosted/deploy/kubernetes/scale#core-components). +All audit logs are delivered to **STDERR** for each individual [component](/self-hosted/deploy/kubernetes/scale). ### Filtering Audit Logs diff --git a/docs/admin/auth/builtin.mdx b/docs/admin/auth/builtin.mdx index 521d0f0f5..9bbc00b19 100644 --- a/docs/admin/auth/builtin.mdx +++ b/docs/admin/auth/builtin.mdx @@ -1,6 +1,6 @@ # Builtin password authentication -The [`builtin` auth provider](/admin/config/site-config#builtin-password-authentication) manages user accounts inside Sourcegraph. It supports user signup, login, and password reset. This is the simplest provider type to set up, and is the default auth provider on a fresh installation for the first user so they can create an account and become site admin. +The [`builtin` auth provider](/admin/auth/builtin) manages user accounts inside Sourcegraph. It supports user signup, login, and password reset. This is the simplest provider type to set up, and is the default auth provider on a fresh installation for the first user so they can create an account and become site admin. Use this auth provider, if you have no organizational requirements to use a SSO provider. @@ -84,7 +84,7 @@ When [SMTP is enabled](/self-hosted/email), special behaviours apply to whether ## Account lockout -Password reset links expire after 4 hours by default - this can be configured in site configuration with the [`auth.passwordResetLinkExpiry`](/admin/config/site-config#auth-passwordResetLinkExpiry) field. +Password reset links expire after 4 hours by default - this can be configured in site configuration with the [`auth.passwordResetLinkExpiry`](/admin/config/site-config) field. Account will be locked out for 30 minutes after 5 consecutive failed sign-in attempts within one hour for the builtin authentication provider. The threshold and duration of lockout and consecutive periods can be customized via `"auth.lockout"` in the site configuration: diff --git a/docs/admin/auth/index.mdx b/docs/admin/auth/index.mdx index 3df9e0c21..331ad9b33 100644 --- a/docs/admin/auth/index.mdx +++ b/docs/admin/auth/index.mdx @@ -34,7 +34,7 @@ The following methods are supported for sign up and sign in: - [HTTP authentication proxies](#http-authentication-proxies) - [Username header prefixes](#username-header-prefixes) -The authentication providers are configured in the [`auth.providers`](/admin/config/site-config#authentication-providers) site configuration option. +The authentication providers are configured in the [`auth.providers`](/admin/config/site-config) site configuration option. ## Programmatic authentication @@ -50,7 +50,7 @@ If you are unsure which auth provider is right for you, we recommend applying th order: - If you have no external identity providers (i.e., not SSO) or are just trying to spin Sourcegraph - up as quickly as possible to try, use [`builtin`](#builtin-password-authentication) authentication. You can + up as quickly as possible to try, use [`builtin`](/admin/auth/builtin) authentication. You can always change the auth configuration later, and user identities from external providers will be linked automatically to existing Sourcegraph accounts using verified email addresses. - If you are deploying Sourcegraph behind a HTTP authentication proxy service, use the @@ -116,7 +116,7 @@ configuration. Leave the `url` field empty for GitHub.com. -Once you've configured GitHub as a sign-on provider, you may also want to [add GitHub repositories to Sourcegraph](/admin/code-hosts/github#repository-syncing). +Once you've configured GitHub as a sign-on provider, you may also want to [add GitHub repositories to Sourcegraph](/admin/code-hosts/github#selecting-repositories-to-sync). ### How to control user sign-up and sign-in with GitHub auth provider @@ -405,7 +405,7 @@ Users can then add Gerrit credentials by visiting their **Settings** > **Account ## OpenID Connect -The [`openidconnect` auth provider](/admin/config/site-config#openid-connect-including-google-workspace) authenticates users via OpenID Connect, which is supported by many external services, including: +The [`openidconnect` auth provider](/admin/auth#openid-connect) authenticates users via OpenID Connect, which is supported by many external services, including: - [Google Workspace (Google accounts)](#google-workspace-google-accounts) - [Okta](https://developer.okta.com/docs/api/resources/oidc.html) @@ -427,7 +427,7 @@ To configure Sourcegraph to authenticate users via OpenID Connect: 1. Provide the OpenID Connect client's issuer, client ID, and client secret in the Sourcegraph site configuration shown below. 1. (Optional) Require users to have a specific email domain name to authenticate (e.g., to limit users to only those from your organization). -Example [`openidconnect` auth provider](/admin/config/site-config#openid-connect-including-google-workspace) configuration: +Example [`openidconnect` auth provider](/admin/auth#openid-connect) configuration: ```json { @@ -449,7 +449,7 @@ Example [`openidconnect` auth provider](/admin/config/site-config#openid-connect Sourcegraph supports the OpenID Connect Discovery standard for configuring the auth provider (using the values provided in the document at, e.g., `https://oidc.example.com/.well-known/openid-configuration`). -See the [`openid` auth provider documentation](/admin/config/site-config#openid-connect-including-google-workspace) for the full set of configuration options. +See the [`openid` auth provider documentation](/admin/auth#openid-connect) for the full set of configuration options. ### How to control user sign-up with OpenID auth provider @@ -478,7 +478,7 @@ Google's Workspace (formerly known as G Suite) supports OpenID Connect, which is 1. Use the **client ID** and **client secret** values in Sourcegraph site configuration (as shown in the example below). 1. Set your Google Workspace domain in `requireEmailDomain` to prevent users outside your organization from signing in. -Example [`openidconnect` auth provider](/admin/config/site-config#openid-connect-including-google-workspace) configuration for Google Workspace: +Example [`openidconnect` auth provider](/admin/auth#openid-connect) configuration for Google Workspace: ```json { @@ -547,7 +547,7 @@ Consequently, you can only sign in via an auth provider if your email on Sourceg Let's say the email field in your Sourcegraph account was kept blank when a site admin created the account for you, but the username matches your username on GitHub or GitLab. Will this work? If you try to sign in to SG with GitHub or GitLab, it won't work, and you will see an error informing you that a verified email is missing. Exceptions to this rule are [HTTP Proxies](#http-authentication-proxies), where there's an option to make the link via username only. -For [Bitbucket](/admin/config/authorization-and-authentication#bitbucket-server-bitbucket-data-center-authorization), we don't support OAuth. Still, the match between the chosen auth provider used with Bitbucket and a user's Bitbucket account happens via username. +For [Bitbucket](/admin/config/authorization-and-authentication#bitbucket-server--bitbucket-data-center-authorization), we don't support OAuth. Still, the match between the chosen auth provider used with Bitbucket and a user's Bitbucket account happens via username. Using only a username to match a Sourcegraph account to an auth provider account is not recommended, as you can see [here](/admin/code-hosts/gitlab#username), for example. Usernames in Sourcegraph are mutable, so a malicious user could change a username, elevating their privileges. @@ -556,7 +556,7 @@ Usernames in Sourcegraph are mutable, so a malicious user could change a usernam Sourcegraph will automatically link accounts from multiple external auth providers, resulting in a single user account on Sourcegraph. That way a user can login with multiple auth methods and end up being logged in with the same Sourcegraph account. In general, to link accounts, the following condition needs to be met: -At the time of signing in with the new account, any of the email addresses configured on the user account on the auth provider must match any of the **verified** email addresses on the user account on the Sourcegraph side. If there is a match, the accounts are linked, [otherwise a new user account is created if auth provider is configured to support user sign ups](#how-to-control-user-sign-up). +At the time of signing in with the new account, any of the email addresses configured on the user account on the auth provider must match any of the **verified** email addresses on the user account on the Sourcegraph side. If there is a match, the accounts are linked, [otherwise a new user account is created if auth provider is configured to support user sign ups](#how-to-control-user-sign-up-and-sign-in-with-github-auth-provider). ## Username normalization diff --git a/docs/admin/auth/login-form.mdx b/docs/admin/auth/login-form.mdx index 38576c8a9..dd922af96 100644 --- a/docs/admin/auth/login-form.mdx +++ b/docs/admin/auth/login-form.mdx @@ -8,7 +8,7 @@ The login form allows users to sign in to Sourcegraph using [configured auth pro Supported for Sourcegraph versions 5.1 or more. -These options do not apply to [`builtin`](/admin/auth/#builtin-password-authentication) and +These options do not apply to [`builtin`](/admin/auth/builtin) and [`http-header`](/admin/auth/#http-authentication-proxies) auth providers. - The builtin auth provider has its own login form. diff --git a/docs/admin/auth/saml/azure-ad.mdx b/docs/admin/auth/saml/azure-ad.mdx index 58c67b6e5..3bb3ae4f5 100644 --- a/docs/admin/auth/saml/azure-ad.mdx +++ b/docs/admin/auth/saml/azure-ad.mdx @@ -21,7 +21,7 @@ ## 2. Add the SAML auth provider to Sourcegraph site config -[Add a SAML auth provider](/admin/auth/#add-a-saml-provider) with `identityProviderMetadataURL` set to the "App Federation Metadata Url" you recorded in the previous section. Here is an example of what your site configuration should look like: +[Add a SAML auth provider](/admin/auth/saml#add-a-saml-provider) with `identityProviderMetadataURL` set to the "App Federation Metadata Url" you recorded in the previous section. Here is an example of what your site configuration should look like: ```json { diff --git a/docs/admin/auth/saml/index.mdx b/docs/admin/auth/saml/index.mdx index 94fcfd602..7b374dd31 100644 --- a/docs/admin/auth/saml/index.mdx +++ b/docs/admin/auth/saml/index.mdx @@ -16,7 +16,7 @@ Select your SAML identity provider for setup instructions: - [JumpCloud](/admin/auth/saml/jump-cloud) - [Other](/admin/auth/saml/generic) -For advanced SAML configuration options, see the [`saml` auth provider documentation](/admin/config/site-config#saml). +For advanced SAML configuration options, see the [`saml` auth provider documentation](/admin/auth/saml). > NOTE: Sourcegraph currently supports at most 1 SAML auth provider at a time (but you can configure additional auth providers of other types). This should not be an issue for 99% of customers. diff --git a/docs/admin/auth/saml/microsoft-adfs.mdx b/docs/admin/auth/saml/microsoft-adfs.mdx index 9797efa52..54c85c93c 100644 --- a/docs/admin/auth/saml/microsoft-adfs.mdx +++ b/docs/admin/auth/saml/microsoft-adfs.mdx @@ -12,7 +12,7 @@ These instructions guide you through configuring Sourcegraph as a relying party - Active Directory instance where all users have email and username attributes. - An instance of ADFS running on Windows Server, joined to your Active Directory domain. -- Sourcegraph should be [configured to use HTTPS](/self-hosted/http-https-configuration#nginx-ssl-https-configuration). +- Sourcegraph should be [configured to use HTTPS](/self-hosted/http-https-configuration#nginx-sslhttps-configuration). - Ensure that `externalURL` in [site config](/admin/config/site-config) meets the following criteria: - It is the URL used by end users (no trailing slash). @@ -191,4 +191,4 @@ error, double-check the relying party identifiers of the Relying Party Trust ent ### Other troubleshooting -See [SAML troubleshooting](/admin/auth/saml/#saml-troubleshooting) for more tips. +See [SAML troubleshooting](/admin/auth/saml#troubleshooting) for more tips. diff --git a/docs/admin/code-hosts/aws-codecommit.mdx b/docs/admin/code-hosts/aws-codecommit.mdx index 54b70f895..1a1c638c2 100644 --- a/docs/admin/code-hosts/aws-codecommit.mdx +++ b/docs/admin/code-hosts/aws-codecommit.mdx @@ -137,7 +137,7 @@ To add CodeCommit repositories in Docker Container: ### Mounting SSH keys into the container 1. Copy all the files at your `$HOME/.ssh directory` to `$HOME/.sourcegraph/config/ssh` directory. - 1. Read our [guide here](/self-hosted/deploy/docker-compose/#git-ssh-configuration) for Docker Compose deployments + 1. Read our [guide here](/self-hosted/deploy/docker-compose/configuration#git-ssh-configuration) for Docker Compose deployments 1. Read our [guide here](/self-hosted/deploy/kubernetes/configure#ssh-for-cloning) for Kubernetes deployments 1. Start (or restart) the container. 1. Connect Sourcegraph to AWS CodeCommit by going to **Sourcegraph > Site Admin > Manage code hosts > Generic Git host** and add the following: diff --git a/docs/admin/code-hosts/bitbucket-server.mdx b/docs/admin/code-hosts/bitbucket-server.mdx index f6d34d502..bb6aa6f91 100644 --- a/docs/admin/code-hosts/bitbucket-server.mdx +++ b/docs/admin/code-hosts/bitbucket-server.mdx @@ -14,7 +14,7 @@ To connect Bitbucket Server / Bitbucket Data Center to Sourcegraph: 1. Configure the connection to Bitbucket Server / Bitbucket Data Center using the action buttons above the text field, and additional fields can be added using Cmd/Ctrl+Space for auto-completion. See the [configuration documentation below](#configuration). 1. Press **Add repositories**. -Also consider installing the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-server-plugin) which enables native code navigation for every Bitbucket user when browsing code and reviewing pull requests, allows for faster permission syncing between Sourcegraph and Bitbucket Server / Bitbucket Data Center and adds support for webhooks to Bitbucket Server / Bitbucket Data Center. +Also consider installing the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-plugin) which enables native code navigation for every Bitbucket user when browsing code and reviewing pull requests, allows for faster permission syncing between Sourcegraph and Bitbucket Server / Bitbucket Data Center and adds support for webhooks to Bitbucket Server / Bitbucket Data Center. ## Access token permissions @@ -163,11 +163,11 @@ By installing the [Bitbucket Server plugin](/integration/bitbucket-server), you ### Fast permission syncing -With the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-server-plugin) you can enable fast permission syncing: +With the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-plugin) you can enable fast permission syncing: 1. Connect Bitbucket Server / Bitbucket Data Center to Sourcegraph (_see instructions above_). 1. Follow the [instructions to set up repository permissions](#repository-permissions) with Bitbucket Server / Bitbucket Data Center. -1. Install the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-server-plugin) on your Bitbucket Server / Bitbucket Data Center instance. +1. Install the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-plugin) on your Bitbucket Server / Bitbucket Data Center instance. 1. In Sourcegraph, go to **Site admin > Manage code hosts** and edit the Bitbucket Server / Bitbucket Data Center configuration. 1. Add the `"plugin.permissions"` property: diff --git a/docs/admin/code-hosts/gerrit.mdx b/docs/admin/code-hosts/gerrit.mdx index 1daa1857a..d51244236 100644 --- a/docs/admin/code-hosts/gerrit.mdx +++ b/docs/admin/code-hosts/gerrit.mdx @@ -92,7 +92,7 @@ Users should now be able to authenticate their Sourcegraph accounts using their ## Have users authenticate their Sourcegraph accounts using their Gerrit HTTP credentials -After [configuring Gerrit as a code host connection](#configure-gerrit-as-code-host-connection) and [adding Gerrit as an authentication provider](#add-gerrit-as-an-authnetication-provider), users will be able to authenticate their Sourcegraph accounts using their Gerrit HTTP credentials: +After [configuring Gerrit as a code host connection](#configure-gerrit-as-a-code-host-connection) and [adding Gerrit as an authentication provider](#add-gerrit-as-an-authentication-provider), users will be able to authenticate their Sourcegraph accounts using their Gerrit HTTP credentials: As a user: diff --git a/docs/admin/code-hosts/github.mdx b/docs/admin/code-hosts/github.mdx index 394bdc81f..f9389e81b 100644 --- a/docs/admin/code-hosts/github.mdx +++ b/docs/admin/code-hosts/github.mdx @@ -88,7 +88,7 @@ When creating a code host connection for a GitHub App with multiple installation > NOTE: When you create a GitHub App, Sourcegraph automatically sets up an [incoming webhook](/admin/webhooks/incoming) for the app. This webhook subscribes to events for any repository or organization the app has access to, allowing Sourcegraph to keep repository and permission data in sync with GitHub. -> NOTE: If you are using [Batch Changes](/batch-changes/), you can create a GitHub App to perform [commit signing](/admin/config/batch-changes#commit-signing-for-github) (Beta). +> NOTE: If you are using [Batch Changes](/batch-changes/), you can create a GitHub App to perform [commit signing](/admin/config/batch-changes#commit-signing-with-github-apps) (Beta). #### Multiple installations @@ -290,10 +290,10 @@ For more details, see [GitHub API access](#github-api-access). There are four fields for configuring which repositories are mirrored/synchronized: -- [`repos`](/admin/code-hosts/github#repos)A list of repositories in `owner/name` format. The order determines the order in which we sync repository metadata and is safe to change. -- [`orgs`](/admin/code-hosts/github#orgs)A list of organizations (every repository belonging to the organization will be cloned). -- [`repositoryQuery`](/admin/code-hosts/github#repositoryQuery)A list of strings with three pre-defined options (`public`, `affiliated`, `none`, none of which are subject to result limitations), and/or a [GitHub advanced search query](https://github.com/search/advanced). Note: There is an existing limitation that requires the latter, GitHub advanced search queries, to return [less than 1000 results](#repositoryquery-returns-first-1000-results-only). -- [`exclude`](/admin/code-hosts/github#exclude)A list of repositories to exclude which takes precedence over the `repos`, `orgs`, and `repositoryQuery` fields. +- [`repos`](/admin/code-hosts/github#configuration)A list of repositories in `owner/name` format. The order determines the order in which we sync repository metadata and is safe to change. +- [`orgs`](/admin/code-hosts/github#configuration)A list of organizations (every repository belonging to the organization will be cloned). +- [`repositoryQuery`](/admin/code-hosts/github#configuration)A list of strings with three pre-defined options (`public`, `affiliated`, `none`, none of which are subject to result limitations), and/or a [GitHub advanced search query](https://github.com/search/advanced). Note: There is an existing limitation that requires the latter, GitHub advanced search queries, to return less than 1000 results. +- [`exclude`](/admin/code-hosts/github#configuration)A list of repositories to exclude which takes precedence over the `repos`, `orgs`, and `repositoryQuery` fields. ## Rate limits @@ -321,7 +321,7 @@ See [Internal rate limits](/admin/code-hosts/rate-limits#internal-rate-limits). Prerequisite for configuring repository permission syncing: [Add GitHub as an authentication provider](/admin/auth/#github). -> NOTE: If your GitHub organization enforces SAML SSO, consider configuring [`requiredSsoOrgs`](/admin/auth/#requiredssoOrgs) in your GitHub auth provider to ensure users properly authorize the OAuth application during sign-in. This helps prevent permissions syncing issues caused by tokens that lack SSO authorization. +> NOTE: If your GitHub organization enforces SAML SSO, consider configuring [`requiredSsoOrgs`](/admin/auth#github) in your GitHub auth provider to ensure users properly authorize the OAuth application during sign-in. This helps prevent permissions syncing issues caused by tokens that lack SSO authorization. Then, add or edit the GitHub connection as described above and include the `authorization` field: @@ -338,7 +338,7 @@ Repo-centric permission syncing is done by calling the [list repository collabor > IMPORTANT: We strongly recommend configuring both read and write access to associated repositories for permission syncing due to GitHub's token scope requirements. Without write access, there will be a conflict between [user-centric sync](/admin/permissions/syncing#troubleshooting) and repo-centric sync. In that case, [disable repo-centric permission sync](/admin/permissions/syncing#disable-repo-centric-permission-sync) (supported in Sourcegraph 5.0.4+). -> IMPORTANT: Optional, but strongly recommended - [continue with configuring webhooks for permissions](/admin/webhooks/incoming#user-permissions). +> IMPORTANT: Optional, but strongly recommended - [continue with configuring webhooks for permissions](/admin/webhooks/incoming#github). @@ -372,13 +372,13 @@ If you would like internal repositories to remain private, but you're experienci ### Trigger permissions sync from GitHub webhooks -Follow the link to [configure webhooks for permissions for Github](/admin/webhooks/incoming#user-permissions) +Follow the link to [configure webhooks for permissions for Github](/admin/webhooks/incoming#github) ### Teams and organizations permissions caching > NOTE: This is an experimental feature. -> WARNING: The following section is experimental and might not work properly anymore on new Sourcegraph versions (post 4.0+). Please prefer [configuring webhooks for permissions instead](/admin/webhooks/incoming#user-permissions) +> WARNING: The following section is experimental and might not work properly anymore on new Sourcegraph versions (post 4.0+). Please prefer [configuring webhooks for permissions instead](/admin/webhooks/incoming#github) Github code host can leverage caching mechanisms to reduce the number of API calls used when syncing permissions. This can significantly reduce the amount of time it takes to perform a full cycle of permissions sync due to reduced instances of being rate limited by the code host, and is useful for code hosts with very large numbers of users and repositories. diff --git a/docs/admin/code-hosts/gitlab.mdx b/docs/admin/code-hosts/gitlab.mdx index 0522c4c83..6d580a8e0 100644 --- a/docs/admin/code-hosts/gitlab.mdx +++ b/docs/admin/code-hosts/gitlab.mdx @@ -104,7 +104,7 @@ In this case, a user's OAuth token will be used to get a list of repositories th This method requires administrator access to GitLab so that Sourcegraph can access the [admin GitLab Users API endpoint](https://docs.gitlab.com/ee/api/users.html#for-admins). For each GitLab user, this endpoint provides the user ID that comes from the authentication provider, so Sourcegraph can associate a user in its system to a user in GitLab. -Prerequisite: Add the [SAML](/admin/auth/#saml) or [OpenID Connect](/admin/auth/#openid-connect) +Prerequisite: Add the [SAML](/admin/auth/saml) or [OpenID Connect](/admin/auth/#openid-connect) authentication provider you use to sign into GitLab. Then, [add or edit a GitLab connection](#repository-syncing) using an administrator (sudo-level) personal access token, and include the `authorization` field: diff --git a/docs/admin/code-hosts/non-git.mdx b/docs/admin/code-hosts/non-git.mdx index fb4b8705c..8fc15c9d1 100644 --- a/docs/admin/code-hosts/non-git.mdx +++ b/docs/admin/code-hosts/non-git.mdx @@ -57,7 +57,7 @@ In order to keep the code in the local repository up to date, you will need to r In addition to serving a local directory, `src-expose` can periodically run a command of your choice to fetch changes from a remote and combine them into a single new Git commit. -For example, if your `src-expose` is using a [configuration YAML file](#next-steps--advanced-configuration) that contains the following: +For example, if your `src-expose` is using a [configuration YAML file](#next-steps-advanced-configuration) that contains the following: ```yaml # before is a command run before sync. before is run from root. diff --git a/docs/admin/code-hosts/rate-limits.mdx b/docs/admin/code-hosts/rate-limits.mdx index 269e8765c..db2c3b718 100644 --- a/docs/admin/code-hosts/rate-limits.mdx +++ b/docs/admin/code-hosts/rate-limits.mdx @@ -30,7 +30,7 @@ Sourcegraph monitors external rate limits for the following code hosts: Internal rate limits refer to self-imposed rate limits within Sourcegraph. While Sourcegraph adheres to external rate limits, sometimes more control is necessary, or a code host might not have rate limit monitoring available or configured. In these cases, internal rate limits can be configured. -A [global default internal rate limit](/admin/config/site-config#defaultRateLimit) can be configured in the [site configuration](/admin/config/site-config). This limit applies to all code host connections that don't have a specific rate limit configured. +A [global default internal rate limit](/admin/config/site-config) can be configured in the [site configuration](/admin/config/site-config). This limit applies to all code host connections that don't have a specific rate limit configured. > NOTE: This is the default rate limit _per code host connection_. It is not the total rate limit of all the code host connections. @@ -71,8 +71,8 @@ This entry tells us that a rate limit is configured for a GitHub external servic Sourcegraph supports internal rate limit configuration for the following connections: -- [GitHub](/admin/code-hosts/github#rateLimit) -- [GitLab](/admin/code-hosts/gitlab#rateLimit) -- [Bitbucket Cloud](/admin/code-hosts/bitbucket-cloud#rateLimit) -- [Bitbucket Server](/admin/code-hosts/bitbucket-server#rateLimit) -- [Perforce](/admin/repo/perforce#rateLimit) +- [GitHub](/admin/code-hosts/github#configuration) +- [GitLab](/admin/code-hosts/gitlab#configuration) +- [Bitbucket Cloud](/admin/code-hosts/bitbucket-cloud#configuration) +- [Bitbucket Server](/admin/code-hosts/bitbucket-server#configuration) +- [Perforce](/admin/repo/perforce#configuration) diff --git a/docs/admin/config/authorization-and-authentication.mdx b/docs/admin/config/authorization-and-authentication.mdx index e2976070e..5f22fd7ee 100644 --- a/docs/admin/config/authorization-and-authentication.mdx +++ b/docs/admin/config/authorization-and-authentication.mdx @@ -9,7 +9,7 @@ We suggest configuring both when using Sourcegraph Enterprise. If you do not con ## Authentication -Sourcegraph supports username/password auth by default and SAML, OAuth, HTTP Proxy auth, and OpenID Connect if configured. Changing a username in Sourcegraph will allow the user to escalate permissions, so if you are syncing permissions, you will need to add the following to your site config at `https://sourcegraph.yourdomain.com/siteadmin/configuration` ([Learn more about viewing and editing your site configuration.](/admin/config/site-config#view-and-edit-site-configuration)) +Sourcegraph supports username/password auth by default and SAML, OAuth, HTTP Proxy auth, and OpenID Connect if configured. Changing a username in Sourcegraph will allow the user to escalate permissions, so if you are syncing permissions, you will need to add the following to your site config at `https://sourcegraph.yourdomain.com/siteadmin/configuration` ([Learn more about viewing and editing your site configuration.](/admin/config/site-config)) ```json { @@ -51,7 +51,7 @@ Built-in username/password authentication is Sourcegraph’s default authenticat Set `allowSignup` to `false` if you want to create user accounts instead of allowing the user to create their own. -Learn more about [built-in password authentication](/admin/auth/#builtin-password-authentication). +Learn more about [built-in password authentication](/admin/auth/builtin). ### GitHub Enterprise or GitHub Cloud authentication and authorization diff --git a/docs/admin/config/batch-changes.mdx b/docs/admin/config/batch-changes.mdx index f87655a59..876ae4398 100644 --- a/docs/admin/config/batch-changes.mdx +++ b/docs/admin/config/batch-changes.mdx @@ -332,7 +332,7 @@ However, if the user deletion is permanent, deleting both account and data, then The Batch Spec Library offers curated examples and guided templates that make large-scale code modifications accessible to developers at every skill level. As a site admin you can manage the library. -The library distinguishes between [templates](#templates) and [examples](#library-examples). Examples are batch specs that are meant to be modified by power users who are comfortable with the batch spec syntax. Templates, on the other hand, are batch specs that contain variables that the user can provide data for through form fields without having to modify the batch spec code. +The library distinguishes between [templates](#templates) and [examples](#examples-2). Examples are batch specs that are meant to be modified by power users who are comfortable with the batch spec syntax. Templates, on the other hand, are batch specs that contain variables that the user can provide data for through form fields without having to modify the batch spec code. Sourcegraph instances come with a couple of examples out of the box. You can use the GraphQL APIs to [manage the Batch Spec Library](#managing-the-batch-spec-library). diff --git a/docs/admin/executors/index.mdx b/docs/admin/executors/index.mdx index b69f32bda..9c5eeb82d 100644 --- a/docs/admin/executors/index.mdx +++ b/docs/admin/executors/index.mdx @@ -64,7 +64,7 @@ Self-hosted executors authenticate to Sourcegraph with a shared secret: 1. Configure the same secret on each executor as `EXECUTOR_FRONTEND_PASSWORD`, or through the equivalent setting for its deployment method. -The executor authentication secret is not a Sourcegraph user access token and is not managed on the **Access tokens** page. See [Site configuration](/admin/config/site-config#view-and-edit-site-configuration) for more information about editing site configuration. +The executor authentication secret is not a Sourcegraph user access token and is not managed on the **Access tokens** page. See [Site configuration](/admin/config/site-config) for more information about editing site configuration. ## Monitor executor instances diff --git a/docs/admin/faq.mdx b/docs/admin/faq.mdx index 826766af3..a717579f0 100644 --- a/docs/admin/faq.mdx +++ b/docs/admin/faq.mdx @@ -3,7 +3,7 @@ ## Does Sourcegraph support SVN? For Subversion and other non-Git code hosts, the recommended way to make these accessible in -Sourcegraph is through [`src-expose`](/admin/code-hosts/other#experimental-src-expose). +Sourcegraph is through [`src-expose`](/admin/code-hosts/non-git#installing-src-expose). Alternatively, you can use [`git-svn`](https://git-scm.com/docs/git-svn) or [`svg2git`](https://github.com/svn-all-fast-export/svn2git) to convert Subversion repositories to @@ -18,7 +18,7 @@ method by modifying the `auth.providers` field in site configuration. However, t administrator may themselves be unable to sign in. If this is the case, then a site administrator can update the configuration if they have direct `docker exec` or `kubectl exec` access to the Sourcegraph instance. Follow the [instructions to update the site config if the web UI is -inaccessible](/admin/config/site-config#editing-your-site-configuration-if-you-cannot-access-the-web-ui). +inaccessible](/admin/config/site-config). ## Sourcegraph is making unauthorized requests to the git server @@ -28,7 +28,7 @@ makes a request without the password included. If a 401 Unauthorized is returned More information can be found [here](https://confluence.atlassian.com/bitbucketserverkb/two-401-responses-for-every-git-opperation-938854756.html). If this behaviour is undesired, the `gitURLType` in the [external service configuration](/admin/code-hosts/github#configuration) -should be set to `ssh` instead of `http`. This will also require [ssh keys to be set up](/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication). +should be set to `ssh` instead of `http`. This will also require [ssh keys to be set up](/admin/repo/auth). ## Sourcegraph is not returning results from a repository unless "repo:" is included diff --git a/docs/admin/how-to/converting-version-contexts-to-search-contexts.mdx b/docs/admin/how-to/converting-version-contexts-to-search-contexts.mdx index 850c917c7..f430ba1c9 100644 --- a/docs/admin/how-to/converting-version-contexts-to-search-contexts.mdx +++ b/docs/admin/how-to/converting-version-contexts-to-search-contexts.mdx @@ -1,6 +1,6 @@ # How to convert version contexts to search contexts -This guide will provide steps for migrating from [version contexts](/code-search/features#version-contexts-sunsetting) to [search contexts](/code-search/features#search-contexts) on your private Sourcegraph instance. +This guide will provide steps for migrating from version contexts to [search contexts](/code-search/features#search-contexts) on your private Sourcegraph instance. ## Prerequisites @@ -23,7 +23,7 @@ Reload after saving changes to see search contexts enabled. 1. Log in to your private Sourcegraph instance as a site admin. 2. Navigate to `https://your_sourcegraph_instance.com/contexts`. -3. Press `Convert version contexts`. A list of [existing version contexts](/code-search/features#version-contexts-sunsetting) found in the site configuration will be shown. +3. Press `Convert version contexts`. A list of existing version contexts found in the site configuration will be shown. 4. Convert either all version contexts at once, or specific individual version contexts as desired. 5. Navigate back to `https://your_sourcegraph_instance.com/contexts`. Converted version contexts will be listed. diff --git a/docs/admin/how-to/index.mdx b/docs/admin/how-to/index.mdx index b7cc5d376..16d6aef7a 100644 --- a/docs/admin/how-to/index.mdx +++ b/docs/admin/how-to/index.mdx @@ -8,7 +8,7 @@ - [How to remove users or edit users with the GraphQL API](/admin/how-to/mutate-user-api) - [How to manage feature flags with the GraphQL API](/admin/how-to/manage-feature-flags-with-graphql) - [How to troubleshoot a failure to update repositories when new repositories are added](/admin/how-to/update-repo-failure) -- [How to purge deleted repository data from Sourcegraph](/admin/how-to/remove-repo#manually-purge-deleted-repository-data-from-disk) +- [How to purge deleted repository data from Sourcegraph](/admin/how-to/remove-repo#remove-corrupted-repository-data-from-sourcegraph) - [How to address common monorepo problems](/admin/how-to/monorepo-issues) - [How to import a set of internal repositories to Sourcegraph](/admin/how-to/internal-github-repos) - [Migrating code intelligence data from LSIF to SCIP (Sourcegraph 4.5 -> 4.6)](/admin/how-to/lsif-scip-migration) diff --git a/docs/admin/how-to/internal-github-repos.mdx b/docs/admin/how-to/internal-github-repos.mdx index 78ce63ab1..f155bd710 100644 --- a/docs/admin/how-to/internal-github-repos.mdx +++ b/docs/admin/how-to/internal-github-repos.mdx @@ -12,7 +12,7 @@ This document assumes that you have: ## Steps to import internal GitHub repositories -1. Using the [repositoryQuery](/admin/code-hosts/github#repositoryQuery) configuration option, pass the `org` flag to specify the name of the organization the internal repositories belong to and; +1. Using the [repositoryQuery](/admin/code-hosts/github#configuration) configuration option, pass the `org` flag to specify the name of the organization the internal repositories belong to and; 2. Add `is : internal` to the same line. For example: diff --git a/docs/admin/how-to/monorepo-issues.mdx b/docs/admin/how-to/monorepo-issues.mdx index 1c7872122..aa1f92a77 100644 --- a/docs/admin/how-to/monorepo-issues.mdx +++ b/docs/admin/how-to/monorepo-issues.mdx @@ -43,7 +43,7 @@ Here's an example of a diff to improve symbols performance in a k8s deployment: + memory: 8G ``` -_Learn more about managing resources in [docker-compose](/self-hosted/deploy/docker-compose/#operations) and [kubernetes](/self-hosted/deploy/kubernetes/operations)_ +_Learn more about managing resources in [docker-compose](/self-hosted/deploy/docker-compose/configuration#adjust-resources) and [kubernetes](/self-hosted/deploy/kubernetes/operations)_ ## Slow hover tooltip results diff --git a/docs/admin/how-to/site-admin-quickstart.mdx b/docs/admin/how-to/site-admin-quickstart.mdx index 4bd30c38a..3c790b37f 100644 --- a/docs/admin/how-to/site-admin-quickstart.mdx +++ b/docs/admin/how-to/site-admin-quickstart.mdx @@ -8,7 +8,7 @@ This guide will walk you through the features and functionalities available to y ### What is the best deployment option for me? -We recommend Docker Compose for most initial production deployments. You can [migrate to a different deployment method](/self-hosted/updates/#migrating-to-a-new-deployment-type) later on if needed. +We recommend Docker Compose for most initial production deployments. You can [migrate to a different deployment method](/self-hosted/updates) later on if needed. If you need a deployment option that offers a higher level of scalability and availability, the [Kubernetes deployment](/self-hosted/deploy/kubernetes/) is recommended. diff --git a/docs/admin/index.mdx b/docs/admin/index.mdx index 0ff10c2f8..b6034113f 100644 --- a/docs/admin/index.mdx +++ b/docs/admin/index.mdx @@ -33,7 +33,7 @@ Sourcegraph administration is primarily managed by site administrators, who are - [Global and user settings](/admin/config/settings) - [Configuring Authorization and Authentication](/admin/config/authorization-and-authentication) - [User authentication](/admin/auth/) - - [Built-in password authentication](/admin/auth/#builtin-password-authentication) + - [Built-in password authentication](/admin/auth/builtin) - [GitHub authentication](/admin/auth/#github) - [GitLab authentication](/admin/auth/#gitlab) - [OpenID connect](/admin/auth/#openid-connect) @@ -59,7 +59,7 @@ Sourcegraph administration is primarily managed by site administrators, who are ## Additional resources - [Migrate to Sourcegraph](/admin/migration/) -- [Full guide to site config options](/admin/config/site-config#auth-sessionExpiry) +- [Full guide to site config options](/admin/config/site-config) - [Changelog](https://sourcegraph.com/changelog) to track releases and updates - [Configure webhooks](/admin/webhooks/) - [Configure search scopes](/code-search/working/snippets) diff --git a/docs/admin/migration/opengrok.mdx b/docs/admin/migration/opengrok.mdx index 5822b2c4d..992a8952a 100644 --- a/docs/admin/migration/opengrok.mdx +++ b/docs/admin/migration/opengrok.mdx @@ -46,7 +46,7 @@ The following sections guide you through the migration process. ### Deploying Sourcegraph -We offer several methods for deploying Sourcegraph for various requirements—see [Getting started](/#getting-started) to learn more about how to get started with Sourcegraph. +We offer several methods for deploying Sourcegraph for various requirements—see [Getting started](/getting-started) to learn more about how to get started with Sourcegraph. Choose a deployment option and follow the instructions. When you've signed into your Sourcegraph instance as a site admin, continue to the next section. @@ -74,9 +74,9 @@ When you've added repositories and confirmed that you can search and browse them Like Oracle OpenGrok, Sourcegraph is self-hosted. You control who can access it. Sourcegraph supports many user authentication and security options: -- [OpenID Connect user authentication](/admin/auth/#openid-connect) and [SAML user authentication](/admin/auth/#saml) (for Google/Google Workspace accounts, Okta, OneLogin, etc.) +- [OpenID Connect user authentication](/admin/auth/#openid-connect) and [SAML user authentication](/admin/auth/saml) (for Google/Google Workspace accounts, Okta, OneLogin, etc.) - [HTTP user authentication proxies](/admin/auth/#http-authentication-proxies) -- [Builtin username-password authentication](/admin/auth/#builtin-authentication) +- [Builtin username-password authentication](/admin/auth/builtin) - [TLS/SSL and other HTTP/HTTPS configuration](/self-hosted/http-https-configuration) ### Rolling out Sourcegraph organization-wide diff --git a/docs/admin/outbound-request-log.mdx b/docs/admin/outbound-request-log.mdx index 5e3340ce5..3f3d5a1f4 100644 --- a/docs/admin/outbound-request-log.mdx +++ b/docs/admin/outbound-request-log.mdx @@ -10,7 +10,7 @@ This document assumes you are a [site admin](/admin/). ## Enabling the logs -This feature is off by default. You can enable it by setting `outboundRequestLogLimit` to a non-zero value in the [site config](/admin/config/site-config#outboundRequestLogLimit). The recommended value is `50`. +This feature is off by default. You can enable it by setting `outboundRequestLogLimit` to a non-zero value in the [site config](/admin/config/site-config). The recommended value is `50`. You can later disable it by setting `outboundRequestLogLimit` to `0`, or by removing the setting entirely. @@ -40,7 +40,7 @@ To recreate a request for debugging, you can copy the cURL command for any reque Keep in mind that some headers might be redacted (you'll see the word "REDACTED" in their place), in which case you'll need to add the missing pieces manually. -Note: You can set the `redactOutboundRequestHeaders` [site config](/admin/config/site-config#redactOutboundRequestHeaders) option to `false` to disable the redaction of headers and make the "Copy curl" function more convenient. But for security reasons, this setting is only respected in development environments. +Note: You can set the `redactOutboundRequestHeaders` [site config](/admin/config/site-config) option to `false` to disable the redaction of headers and make the "Copy curl" function more convenient. But for security reasons, this setting is only respected in development environments. ## Troubleshooting diff --git a/docs/admin/permissions/index.mdx b/docs/admin/permissions/index.mdx index 5bd8b24a7..ee4da4d93 100644 --- a/docs/admin/permissions/index.mdx +++ b/docs/admin/permissions/index.mdx @@ -49,7 +49,7 @@ To set up permissions by [syncing them from a code host](/admin/permissions/sync - [Bitbucket Cloud](/admin/code-hosts/bitbucket-cloud#repository-permissions) - [Bitbucket Server](/admin/code-hosts/bitbucket-server#repository-permissions) - [Gerrit](/admin/code-hosts/gerrit#add-gerrit-as-an-authentication-provider) - - [Perforce](/admin/repo/perforce#repository-permissions) + - [Perforce](/admin/repo/perforce#repository-permissions-beta) - [Azure DevOps](/admin/code-hosts/azuredevops#permissions-syncing) It's also possible to use other methods to get permission data from a code host into the Sourcegraph instance. diff --git a/docs/admin/permissions/syncing.mdx b/docs/admin/permissions/syncing.mdx index a4134af5c..f65868900 100644 --- a/docs/admin/permissions/syncing.mdx +++ b/docs/admin/permissions/syncing.mdx @@ -9,7 +9,7 @@ permissions. Both are on by default, resulting in double polling: Sourcegraph collects this information and stores it in internal database. -To see which code hosts support permission syncing, please refer to [Supported code hosts table](/admin/#supported-code-hosts). +To see which code hosts support permission syncing, please refer to [Supported code hosts table](/admin/code-hosts). ## How it works diff --git a/docs/admin/permissions/webhooks.mdx b/docs/admin/permissions/webhooks.mdx index ff5c7c719..b03d2f117 100644 --- a/docs/admin/permissions/webhooks.mdx +++ b/docs/admin/permissions/webhooks.mdx @@ -35,4 +35,4 @@ not be sent to Sourcegraph. ## Configuring webhooks -Please follow the link for [configuring permission syncing webhooks for GitHub](/admin/webhooks/incoming#user-permissions). +Please follow the link for [configuring permission syncing webhooks for GitHub](/admin/webhooks/incoming#github). diff --git a/docs/admin/repo/auth.mdx b/docs/admin/repo/auth.mdx index 495585d9e..30ee35558 100644 --- a/docs/admin/repo/auth.mdx +++ b/docs/admin/repo/auth.mdx @@ -31,7 +31,7 @@ Some providers may require additional configuration, consult the [code host spec ## Mounting SSH keys into the container -- [Sourcegraph with Docker Compose](/self-hosted/deploy/docker-compose/): See [the Docker Compose git configuration guide](/self-hosted/deploy/docker-compose/#git-configuration). +- [Sourcegraph with Docker Compose](/self-hosted/deploy/docker-compose/): See [the Docker Compose git configuration guide](/self-hosted/deploy/docker-compose/configuration#git-configuration). - [Sourcegraph with Kubernetes](/self-hosted/deploy/kubernetes/): See [Configure repository cloning via SSH](/self-hosted/deploy/kubernetes/configure#ssh-for-cloning). ## Troubleshooting diff --git a/docs/admin/repo/git-config.mdx b/docs/admin/repo/git-config.mdx index 19f070df3..8e9f63c97 100644 --- a/docs/admin/repo/git-config.mdx +++ b/docs/admin/repo/git-config.mdx @@ -4,7 +4,7 @@ Sourcegraph supports customising [git-config](https://git-scm.com/docs/git-confi This guide documents how to configure git-config. To set up SSH and authentication for repositories, see [Repository authentication](/admin/repo/auth). -- [Sourcegraph with Docker Compose](/self-hosted/deploy/docker-compose/): See [the Docker Compose git configuration guide](/self-hosted/deploy/docker-compose/#git-configuration). +- [Sourcegraph with Docker Compose](/self-hosted/deploy/docker-compose/): See [the Docker Compose git configuration guide](/self-hosted/deploy/docker-compose/configuration#git-configuration). - [Sourcegraph with Kubernetes](/self-hosted/deploy/kubernetes/): See [Configure repository cloning via SSH](/self-hosted/deploy/kubernetes/configure#ssh-for-cloning). ## Example: alternate clone URL for repos diff --git a/docs/admin/repo/perforce.mdx b/docs/admin/repo/perforce.mdx index f3cdda69e..cf0e4180a 100644 --- a/docs/admin/repo/perforce.mdx +++ b/docs/admin/repo/perforce.mdx @@ -16,11 +16,11 @@ To enable Perforce code host connections, a site admin must: 1. Configure which depots are mirrored/synchronized as Git repositories to Sourcegraph: - - [`depots`](/admin/repo/perforce#depots) + - [`depots`](/admin/repo/perforce#configuration) A list of depot paths that can be either a depot root or an arbitrary subdirectory. **Note**: Only `"local"` type depots are supported. - - [`p4.user`](/admin/repo/perforce#p4-user) + - [`p4.user`](/admin/repo/perforce#configuration) The user to be authenticated for `p4` CLI, and should be capable of performing: @@ -35,7 +35,7 @@ To enable Perforce code host connections, a site admin must: - `p4 group` - `p4 users` - - [`p4.passwd`](/admin/repo/perforce#p4-passwd) + - [`p4.passwd`](/admin/repo/perforce#configuration) The ticket to be used for authenticating the `p4.user`. It is recommended to create tickets of users in a group that never expire. Use the command `p4 -u login -p -a` to obtain a ticket value. @@ -62,7 +62,7 @@ It's worthwhile to note some limitations of this process: - When syncing depots [p4-fusion](https://github.com/salesforce/p4-fusion) is used to convert Perforce depots into git repositories so that Sourcegraph can index them. - Rename of a Perforce depot, including changing the depot on the Perforce server or the `repositoryPathPattern` config option, will cause a re-import of the depot. -- Unless [permissions syncing](#repository-permissions) is enabled, Sourcegraph is not aware of the depot permissions, so it can't enforce access restrictions. +- Unless [permissions syncing](#repository-permissions-beta) is enabled, Sourcegraph is not aware of the depot permissions, so it can't enforce access restrictions. ## Perforce labels @@ -77,7 +77,7 @@ This behaviour can be disabled by setting `noConvertLabels` to `true` in the fus ## Repository permissions (Beta) -To enforce file-level permissions for Perforce depots using the [Perforce protects file](https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_protect.html), include the `authorization` field in the configuration of the Perforce code host connection you created [above](#add-a-perforce-code-host): +To enforce file-level permissions for Perforce depots using the [Perforce protects file](https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_protect.html), include the `authorization` field in the configuration of the Perforce code host connection you created [above](#add-a-perforce-code-host-connection): ```json { diff --git a/docs/admin/repo/update-frequency.mdx b/docs/admin/repo/update-frequency.mdx index e839f8af3..f3ae15bfd 100644 --- a/docs/admin/repo/update-frequency.mdx +++ b/docs/admin/repo/update-frequency.mdx @@ -16,20 +16,20 @@ If you wish to control how frequently repositories are discovered or how frequen - Code host configuration: see [Rate limits](/admin/code-hosts/rate-limits) -- Site configuration: [repoListUpdateInterval](/admin/config/site-config#repoListUpdateInterval) controls how frequently we check the code host _for new repositories_ in minutes. +- Site configuration: [repoListUpdateInterval](/admin/config/site-config) controls how frequently we check the code host _for new repositories_ in minutes. > NOTE: Internal rate limiting is currently only enforced for HTTP requests to code hosts. That means it's used when, for example, syncing changesets in [batch changes](/batch-changes/), repository permissions and repository metadata from code hosts. ### Limiting the number of Code host Git requests -- [gitMaxCodehostRequestsPerSecond](/admin/config/site-config#gitMaxCodehostRequestsPerSecond) controls how many code host git operations can be run against a code host per second, per gitserver. -- [gitMaxConcurrentClones](/admin/config/site-config#gitMaxConcurrentClones) controls the maximum number of _concurrent_ cloning/pulling operations per gitserver that Sourcegraph will perform. +- [gitMaxCodehostRequestsPerSecond](/admin/config/site-config) controls how many code host git operations can be run against a code host per second, per gitserver. +- [gitMaxConcurrentClones](/admin/config/site-config) controls the maximum number of _concurrent_ cloning/pulling operations per gitserver that Sourcegraph will perform. You may also choose to disable automatic Git updates entirely and instead [configure repository webhooks](/admin/repo/webhooks). ## Repo Updater State -> NOTE: [Instrumentation](/admin/faq#i-am-getting-error-cluster-information-not-available-in-the-instrumentation-page-what-should-i-do) (where Repo Updater State resides) is only available for Kubernetes instances. +> NOTE: [Instrumentation](/self-hosted/faq#i-am-getting-error-cluster-information-not-available-in-the-instrumentation-page-what-should-i-do) (where Repo Updater State resides) is only available for Kubernetes instances. **Repo Updater State** is a useful debugging tool for site admins to monitor: diff --git a/docs/admin/scim.mdx b/docs/admin/scim.mdx index c4e86a2f1..17054f49a 100644 --- a/docs/admin/scim.mdx +++ b/docs/admin/scim.mdx @@ -37,7 +37,7 @@ Sourcegraph supports SCIM 2.0 for provisioning and de-provisioning _users_. ## How to use -To use SCIM, you must have an existing IdP configured as an auth provider on your Sourcegraph instance. For authenticating SCIM requests, we currently support Bearer token authentication. We have a guide for Okta setup [below](#setting-up-okta-as-the-idp). +To use SCIM, you must have an existing IdP configured as an auth provider on your Sourcegraph instance. For authenticating SCIM requests, we currently support Bearer token authentication. We have a guide for Okta setup [below](#configuring-scim-for-okta). To configure: diff --git a/docs/admin/search.mdx b/docs/admin/search.mdx index 3e871819b..ce6f0573a 100644 --- a/docs/admin/search.mdx +++ b/docs/admin/search.mdx @@ -6,7 +6,7 @@ See "[Code search overview](/code-search/)" for general information about Source ### Maximum file size -By default, files larger than 1 MB are excluded from search results. Use the [search.largeFiles](/admin/config/site-config#search-largeFiles) keyword to specify files to be indexed and searched regardless of size. Regardless of where you set the `search.largeFiles` environment variable, Sourcegraph will continue to ignore binary files, even if the size of the file is less than the limit you set. +By default, files larger than 1 MB are excluded from search results. Use the [search.largeFiles](/admin/config/site-config) keyword to specify files to be indexed and searched regardless of size. Regardless of where you set the `search.largeFiles` environment variable, Sourcegraph will continue to ignore binary files, even if the size of the file is less than the limit you set. ### Maximum timeout @@ -153,7 +153,7 @@ So, assuming that you have 300,000 repositories and a memory map limit of 65,536 ``` Sourcegraph's monitoring system also includes an [alert for this -scenario and mitigation steps](/self-hosted/observability/alerts#zoekt-memory-map-areas-percentage-used). +scenario and mitigation steps](/self-hosted/observability/alerts#zoekt-memory_map_areas_percentage_used). ### Shard merging diff --git a/docs/admin/security-event-logs.mdx b/docs/admin/security-event-logs.mdx index 7db2cb09d..54a1a4c6c 100644 --- a/docs/admin/security-event-logs.mdx +++ b/docs/admin/security-event-logs.mdx @@ -112,7 +112,7 @@ This guide goes into the details of Security Event Logging in Sourcegraph ### What if I don't want these events to be logged? -- To turn off all security event logs, you can [set the variable](/admin/audit-log#excessive-audit-logging) in the site config +- To turn off all security event logs, you can [set the variable](/admin/audit-log#configuring) in the site config ### How can I correlate the actorID or userID to a user in the application? diff --git a/docs/admin/telemetry/protocol.mdx b/docs/admin/telemetry/protocol.mdx index 8b25a7a42..bf357f1cd 100644 --- a/docs/admin/telemetry/protocol.mdx +++ b/docs/admin/telemetry/protocol.mdx @@ -56,7 +56,7 @@ To learn more, refer to our [telemetry documentation](https://sourcegraph.com/do | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [string](#string) | |

Generated ID of the event, currently expected to be UUID v4.

| -| timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | |

Timestamp of when the original event was recorded.

| +| timestamp | [google.protobuf.Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | |

Timestamp of when the original event was recorded.

| | feature | [string](#string) | |

Feature associated with the event in camelCase, e.g. 'myFeature'.

| | action | [string](#string) | |

Action associated with the event in camelCase, e.g. 'pageView'.

| | source | [EventSource](#telemetrygateway-v1-EventSource) | |

Source of the event.

| @@ -194,7 +194,7 @@ callsites, and is the primary means of recording product interaction metadata. | version | [int32](#int32) | |

Version of the event parameters, used for indicating the "shape" of this

event's metadata, beginning at 0. Useful for denoting if the shape of

metadata has changed in any way.

| | legacy_metadata | [EventParameters.LegacyMetadataEntry](#telemetrygateway-v1-EventParameters-LegacyMetadataEntry) | repeated | **Deprecated.**

DEPRECATED, legacy metadata format that only accepted int64 - use the new

'metadata' field instead, which accepts float values. Values sent through

this proto field will be merged into the new metadata attributes.

| | metadata | [EventParameters.MetadataEntry](#telemetrygateway-v1-EventParameters-MetadataEntry) | repeated |

Strictly typed exported-by-default metadata, restricted to numeric values

to ensure no sensitive attributes are exported. Sourcegraph telemetry SDKs

must use programming language type-checking to ensure metadata keys are

statically known.

| -| private_metadata | [google.protobuf.Struct](#google-protobuf-Struct) | optional |

Additional potentially sensitive metadata - i.e. not restricted to numeric

values.

🚨 SECURITY: This metadata is NOT exported from instances by default, as it

can contain arbitrarily-shaped data that may accidentally contain sensitive

or private contents.

This metadata is only exported on an allowlist basis based on terms of

use agreements and combinations of event feature and action, alongside

careful audit of callsites. For the list of allowlisted properties, refer

to this generated page:

https://sourcegraph.com/docs/admin/telemetry/private-metadata-allowlist

| +| private_metadata | [google.protobuf.Struct](https://protobuf.dev/reference/protobuf/google.protobuf/#struct) | optional |

Additional potentially sensitive metadata - i.e. not restricted to numeric

values.

🚨 SECURITY: This metadata is NOT exported from instances by default, as it

can contain arbitrarily-shaped data that may accidentally contain sensitive

or private contents.

This metadata is only exported on an allowlist basis based on terms of

use agreements and combinations of event feature and action, alongside

careful audit of callsites. For the list of allowlisted properties, refer

to this generated page:

https://sourcegraph.com/docs/admin/telemetry/private-metadata-allowlist

| | billing_metadata | [EventBillingMetadata](#telemetrygateway-v1-EventBillingMetadata) | optional |

Optional billing-related metadata.

| diff --git a/docs/admin/webhooks/incoming.mdx b/docs/admin/webhooks/incoming.mdx index da5d3e194..f5e4325f1 100644 --- a/docs/admin/webhooks/incoming.mdx +++ b/docs/admin/webhooks/incoming.mdx @@ -133,11 +133,11 @@ Done! Sourcegraph will now receive webhook events to sync data with lower latenc ### Bitbucket server -The [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-server-plugin) enables the Bitbucket Server / Bitbucket Data Center instance to send webhooks to Sourcegraph. +The [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-plugin) enables the Bitbucket Server / Bitbucket Data Center instance to send webhooks to Sourcegraph. Webhooks with the plugin can be installed globally, which is recommended to cover for all repositories. -1. Install the latest version of the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-server-plugin) on your Bitbucket Server / Bitbucket Data Center instance. +1. Install the latest version of the [Sourcegraph Bitbucket Server plugin](/integration/bitbucket-server#sourcegraph-bitbucket-plugin) on your Bitbucket Server / Bitbucket Data Center instance. 1. On your Bitbucket Server / Bitbucket Data Center instance, go to **Administration > Add-ons > Sourcegraph** 1. Fill in the **Add a webhook** form - **Name**: A unique name representing your Sourcegraph instance. diff --git a/docs/analytics/api.mdx b/docs/analytics/api.mdx index ae19db78b..45844e200 100644 --- a/docs/analytics/api.mdx +++ b/docs/analytics/api.mdx @@ -10,7 +10,7 @@ To get started, visit the [Sourcegraph Analytics access tokens management page]( ## API reference -To authenticate to the API, follow the instructions for [token creation](#token-creation). +To authenticate to the API, follow the instructions for [token creation](#access-tokens). Export your access token as an environment variable: diff --git a/docs/batch-changes/batch-spec-templating.mdx b/docs/batch-changes/batch-spec-templating.mdx index 09c6e3fe7..313044f94 100644 --- a/docs/batch-changes/batch-spec-templating.mdx +++ b/docs/batch-changes/batch-spec-templating.mdx @@ -4,7 +4,7 @@ Understand how to use templating to make your batch changes more powerful.

-[Certain fields](#fields-with-template-support) in a [batch spec YAML](/batch-changes/batch-spec-yaml-reference) support templating to create even more powerful and performant batch changes. Templating in a batch spec uses the delimiters `${{` and `}}`. Inside the delimiters, [template variables](#template-variables) and [template helper functions](#template-helpers-functions) may be used to produce a text value. +[Certain fields](#fields-with-template-support) in a [batch spec YAML](/batch-changes/batch-spec-yaml-reference) support templating to create even more powerful and performant batch changes. Templating in a batch spec uses the delimiters `${{` and `}}`. Inside the delimiters, [template variables](#template-variables) and [template helper functions](#template-helper-functions) may be used to produce a text value. ## Example batch spec with templating @@ -117,7 +117,7 @@ The following template variables are available in the fields under `changesetTem - `${{ replace "a/b/c/d" "/" "-" }}` - Replaces occurrences of the second argument in the first one with the last one - `${{ split repository.name "/" }}` - Splits the first argument into a list of strings at each occurrence of the last argument - `${{ matches repository.name "github.com/my-org/terra*" }}` - Matches the first argument against the glob pattern in the second argument, returning true/false -- `${{ "${{ repository.name }}" }}` - Outputs the inner expression as a literal string, for example, to [ignore the inner set of `${{ }}`](/batch-changes/faq#how-can-i-use-github-expression-syntax---literally-in-my-batch-spec) +- `${{ "${{ repository.name }}" }}` - Outputs the inner expression as a literal string, for example, to [ignore the inner set of `${{ }}`](/batch-changes/faq#github-expression-syntax) The features of Go's [`text/template`](https://golang.org/pkg/text/template/) package are also available, including conditionals and loops, since it is the underlying templating engine. @@ -286,7 +286,7 @@ steps: container: golang ``` -Combine the [template helper functions](#template-helpers-functions) with the helper functions built into Go's [`text/template`](https://pkg.go.dev/text/template) library: +Combine the [template helper functions](#template-helper-functions) with the helper functions built into Go's [`text/template`](https://pkg.go.dev/text/template) library: ```yaml changesetTemplate: diff --git a/docs/batch-changes/batch-spec-yaml-reference.mdx b/docs/batch-changes/batch-spec-yaml-reference.mdx index 82e595549..feefc39b6 100644 --- a/docs/batch-changes/batch-spec-yaml-reference.mdx +++ b/docs/batch-changes/batch-spec-yaml-reference.mdx @@ -121,7 +121,7 @@ To match a branch other than the default, `branch` or `branches` can be used to If multiple branches are matched for the same repository, then - [`changesetTemplate.branch`](#changesettemplate-branch) will need to have a + [`changesetTemplate.branch`](#changesettemplatebranch) will need to have a different value for each branch. @@ -299,7 +299,7 @@ steps: ## `steps.outputs` -Output variables that are set after the [`steps.run`](#steps-run) command has been executed. These variables are available in the global `outputs` namespace as `outputs.` [template variables](/batch-changes/batch-spec-templating) in the `run`, `env`, and `outputs` properties of subsequent steps, and the [`changesetTemplate`](#changesettemplate). Two steps with the same output variable name will overwrite the previous contents. +Output variables that are set after the [`steps.run`](#stepsrun) command has been executed. These variables are available in the global `outputs` namespace as `outputs.` [template variables](/batch-changes/batch-spec-templating) in the `run`, `env`, and `outputs` properties of subsequent steps, and the [`changesetTemplate`](#changesettemplate). Two steps with the same output variable name will overwrite the previous contents. ### Examples @@ -367,13 +367,13 @@ The value the output should be set to. ## `steps.outputs..format` -The format of the corresponding [`steps.outputs..value`](#outputs-value). When this is set to something other than `text`, it will be parsed as the given format. +The format of the corresponding [`steps.outputs..value`](#stepsoutputsnamevalue). When this is set to something other than `text`, it will be parsed as the given format. Possible values: `text`, `yaml`, `json`. Default is `text`. ## `steps.if` -Condition to check before executing the step. If the value of the `if:` attribute is `true` (boolean) or `"true``` (string), then the step is executed in the given repository (or workspace, in case [workspaces](#workspaces) are used). Otherwise, the step is skipped. +Condition to check before executing the step. If the value of the `if:` attribute is `true` (boolean) or `"true"` (string), then the step is executed in the given repository (or workspace, in case [workspaces](#workspaces) are used). Otherwise, the step is skipped. As an optimization, the [Sourcegraph CLI](/cli/) tries to evaluate the condition _before_ starting to execute any `steps`. If the condition can be evaluated ahead of time and the result of the evaluation is false, then the execution of the step won't be attempted for the repository, which leads to better cache utilization. @@ -596,7 +596,7 @@ The body (description) of the changeset on the code host. If the code supports M The name of the Git branch to create or update each repository with the changes. -If multiple branches within the same repository are matched in [`on.repository`](#on-repository), then this value must be dynamic since creating multiple branches with the same name in the same repository is impossible. This is often most easily accomplished with the `repository.branch` template variable. For example, this will create `new-feature-3.34` and `new-feature-3.35` branches: +If multiple branches within the same repository are matched in [`on.repository`](#onrepository), then this value must be dynamic since creating multiple branches with the same name in the same repository is impossible. This is often most easily accomplished with the `repository.branch` template variable. For example, this will create `new-feature-3.34` and `new-feature-3.35` branches: ```yaml on: @@ -706,7 +706,7 @@ published: ``` - The standalone `"*``` is quoted in the key to avoid ambiguity in the YAML + The standalone `"*"` is quoted in the key to avoid ambiguity in the YAML document. @@ -852,11 +852,11 @@ The name of the directory in which file diffs should be grouped together. The na ## `transformChanges.group.branch` -The branch that should be used for this additional changeset. This **overwrites the [`changesetTemplate.branch`](#changesettemplate-branch)** when creating the additional changeset. +The branch that should be used for this additional changeset. This **overwrites the [`changesetTemplate.branch`](#changesettemplatebranch)** when creating the additional changeset. The branch cannot be nested under the - [`changesetTemplate.branch`](#changesettemplate-branch), i.e. if the + [`changesetTemplate.branch`](#changesettemplatebranch), i.e. if the `changesetTemplate.branch` is `my-batch-change` then this can _not_ be `my-batch-change/my-subdirectory` since [git doesn't allow that](https://stackoverflow.com/a/22630664). Additionally, branch names must @@ -865,9 +865,9 @@ The branch that should be used for this additional changeset. This **overwrites ## `transformChanges.group.title` -(Optional) The title that should be used for this additional changeset. This **overwrites the [`changesetTemplate.title`](#changesettemplate-title)** when creating the additional changeset. +(Optional) The title that should be used for this additional changeset. This **overwrites the [`changesetTemplate.title`](#changesettemplatetitle)** when creating the additional changeset. -The title supports the same template variables as [`changesetTemplate.title`](#changesettemplate-title). When rendering the group title, `${{ steps.path }}` is set to this group's [`directory`](#transformchangesgroupdirectory). +The title supports the same template variables as [`changesetTemplate.title`](#changesettemplatetitle). When rendering the group title, `${{ steps.path }}` is set to this group's [`directory`](#transformchangesgroupdirectory). ## `transformChanges.group.repository` @@ -877,13 +877,13 @@ The title supports the same template variables as [`changesetTemplate.title`](#c The optional `workspaces` property allows users to define where projects are located in repositories and cause the [`steps`](#steps) to be executed for each project instead of once per repository. That allows easier creation of multiple changesets in large repositories. -For each repository yielded by [`on`](#on), a Sourcegraph search is used to get the locations of the `rootAtLocationOf` file. Each location serves as a workspace for executing the `steps` instead of the repository's root. Use the [`workspaces.in`](#workspaces-in) property to scope the definitions of workspaces. Omitting it is treated as `*`. +For each repository yielded by [`on`](#on), a Sourcegraph search is used to get the locations of the `rootAtLocationOf` file. Each location serves as a workspace for executing the `steps` instead of the repository's root. Use the [`workspaces.in`](#workspacesin) property to scope the definitions of workspaces. Omitting it is treated as `*`. Since multiple workspaces in the same repository can produce multiple changesets, it's **required** to use templating to produce a unique - [`changesetTemplate.branch`](#changesettemplate-branch) for each produced - changeset. See the [examples](#workspaces-examples) below. + [`changesetTemplate.branch`](#changesettemplatebranch) for each produced + changeset. See the [examples](#examples-18) below. ### Examples @@ -947,7 +947,7 @@ changesetTemplate: branch: ${{ join_if "-" "my-multi-workspace-batch-change" (replace steps.path "/" "-") }} ``` -Using [`steps.outputs`](#steps-outputs) to dynamically create unique branch names: +Using [`steps.outputs`](#stepsoutputs) to dynamically create unique branch names: ```yaml # [...] diff --git a/docs/batch-changes/configuring-credentials.mdx b/docs/batch-changes/configuring-credentials.mdx index 31a6e9b03..cb0af6048 100644 --- a/docs/batch-changes/configuring-credentials.mdx +++ b/docs/batch-changes/configuring-credentials.mdx @@ -304,7 +304,7 @@ When Sourcegraph is configured to [clone repositories using SSH via the `gitURLT EXPERIMENTAL: Using GitHub Apps to authenticate Batch Changes is currently experimental, and there may still be some rough edges. -GitHub apps follow the same concepts as [personal and global access tokens](#types-of-access-tokens-used-by-batch-changes). +GitHub apps follow the same concepts as [personal and global access tokens](#types-of-credentials-used-by-batch-changes). ### Limitations diff --git a/docs/batch-changes/create-a-batch-change.mdx b/docs/batch-changes/create-a-batch-change.mdx index 0080cf2cb..07f7eae5b 100644 --- a/docs/batch-changes/create-a-batch-change.mdx +++ b/docs/batch-changes/create-a-batch-change.mdx @@ -64,7 +64,7 @@ The library contains examples that you can apply right into your batch spec if y ### Executing your batch spec -When the spec is ready to run, ensure the [preview](/batch-changes/create-a-batch-change#previewing-workspaces) is up to date and then click **Run batch spec**. This takes you to the execution screen. On this page, you see: +When the spec is ready to run, ensure the [preview](/batch-changes/create-a-batch-change#previewing-batch-spec-and-workspaces) is up to date and then click **Run batch spec**. This takes you to the execution screen. On this page, you see: - Run statistics at the top - All the workspaces, including status and diff stat, in the left panel diff --git a/docs/batch-changes/delete-a-batch-change.mdx b/docs/batch-changes/delete-a-batch-change.mdx index 1c59f2cca..1a5a94fd8 100644 --- a/docs/batch-changes/delete-a-batch-change.mdx +++ b/docs/batch-changes/delete-a-batch-change.mdx @@ -4,7 +4,7 @@ Learn in detail about how to close, delete, and opt out of a Batch Change.

-You can close a batch change when you no longer need it, when all changes have been merged, or when you decide not to make changes. A closed batch change still appears in the [batch changes list](/batch-changes/create-a-batch-change#viewing-batch-changes). To completely remove it, you can delete the batch change. +You can close a batch change when you no longer need it, when all changes have been merged, or when you decide not to make changes. A closed batch change still appears in the [batch changes list](/batch-changes/create-a-batch-change). To completely remove it, you can delete the batch change. Any user with [admin access to the batch change](/batch-changes/permissions-in-batch-changes#permission-levels-for-batch-changes) can close or delete it. diff --git a/docs/batch-changes/faq.mdx b/docs/batch-changes/faq.mdx index 934be401f..d682f25a8 100644 --- a/docs/batch-changes/faq.mdx +++ b/docs/batch-changes/faq.mdx @@ -143,7 +143,7 @@ To tell Sourcegraph not to evaluate `${{ }}` like a regular [template delimiter] ${{ "${{ leave me alone! }}" }} ``` -Remember the context in which the inner `${{ }}` will be evaluated, and be sure to escape characters as appropriate. Check out the cheat sheet for an [example](/batch-changes/batch-spec-cheat-sheet#write-a-github-actions-workflow-that-includes-github-expression-syntax) within a shell script. +Remember the context in which the inner `${{ }}` will be evaluated, and be sure to escape characters as appropriate. Check out the cheat sheet for an [example](/batch-changes/batch-spec-cheat-sheet#github-expression-syntax) within a shell script. ## How is commit author determined for commits produced from Batch Changes? diff --git a/docs/batch-changes/handling-errored-changesets.mdx b/docs/batch-changes/handling-errored-changesets.mdx index 4154f1810..b3f1175d7 100644 --- a/docs/batch-changes/handling-errored-changesets.mdx +++ b/docs/batch-changes/handling-errored-changesets.mdx @@ -56,7 +56,7 @@ src batch apply -f YOUR_BATCH_SPEC.batch.yaml more information on these commands.
-Examples of errors that requires [manual retrying](#manual-retrying-by-re-applying-the-batch-change-spec) are as follows: +Examples of errors that requires [manual retrying](#manual-retrying-of-errored-changesets) are as follows: - No [Batch Changes credentials](/batch-changes/configuring-credentials) have been set up for the affected code host - The configured code host connection needs a different type of credentials (for example, with SSH keys) diff --git a/docs/batch-changes/rebasing-changesets.mdx b/docs/batch-changes/rebasing-changesets.mdx index 6ddd991f6..3cf00dafb 100644 --- a/docs/batch-changes/rebasing-changesets.mdx +++ b/docs/batch-changes/rebasing-changesets.mdx @@ -12,7 +12,7 @@ If your codehost requires changesets to be up to date with the main branch, you ## Requirements -- Sourcegraph instance with repositories in it. See the [Quickstart](/#quick-install) guide on how to set up a Sourcegraph instance +- Sourcegraph instance with repositories in it. See the [Quickstart](/self-hosted/deploy) guide on how to set up a Sourcegraph instance - A [global service account token](/batch-changes/configuring-credentials#global-service-account-tokens) for Batch Changes (**a personal access token cannot currently be used for importing changesets**) ## Select changesets to rebase diff --git a/docs/batch-changes/reexecuting-batch-specs-multiple-times.mdx b/docs/batch-changes/reexecuting-batch-specs-multiple-times.mdx index 16a3eccdb..64c039e8f 100644 --- a/docs/batch-changes/reexecuting-batch-specs-multiple-times.mdx +++ b/docs/batch-changes/reexecuting-batch-specs-multiple-times.mdx @@ -28,7 +28,7 @@ Whenever [Sourcegraph CLI](/cli/) re-executes the same batch spec, it checks a * Whether a cached result can be used is dependent on multiple things: - The repository's default branch's revision didn't change (because if new commits have been pushed to the repository, re-executing the `steps` might lead to different results) -- The `steps` themselves didn't change, including all their inputs, such as [`steps.env`](/batch-changes/batch-spec-yaml-reference#environmentarray), and the `steps.run` field (which can change between executions if it uses [templating](/batch-changes/batch-spec-templating) and is dynamically built from search results) +- The `steps` themselves didn't change, including all their inputs, such as [`steps.env`](/batch-changes/batch-spec-yaml-reference#stepsenv), and the `steps.run` field (which can change between executions if it uses [templating](/batch-changes/batch-spec-templating) and is dynamically built from search results) That also means that [Sourcegraph CLI](/cli/) can use cached results when re-executing a **changed batch spec**, as long as the changes didn't affect the `steps` and the results they produce. diff --git a/docs/batch-changes/site-admin-configuration.mdx b/docs/batch-changes/site-admin-configuration.mdx index 084499ae1..524bce723 100644 --- a/docs/batch-changes/site-admin-configuration.mdx +++ b/docs/batch-changes/site-admin-configuration.mdx @@ -17,8 +17,8 @@ Using Batch Changes requires a [code host connection](/admin/code-hosts/) to a s - [Rollout windows](/admin/config/batch-changes#rollout-windows), which control the rate at which Batch Changes will publish changesets on code hosts - [Forks](/admin/config/batch-changes#forks), which push branches created by Batch Changes onto forks of the upstream repository instead of the repository itself - [Outgoing webhooks](/admin/webhooks/outgoing), which publish events related to batch changes and changesets to enable deeper integrations with your other tools and systems - - [Auto-delete branch on merge/close](/admin/config/batch-changes#automatically-delete-branches-on-merge-close), which automatically deletes branches created by Batch Changes when changesets are merged or closed - - [Commit signing for GitHub](/admin/config/batch-changes#commit-signing-for-github), which signs commits created by Batch Changes via a GitHub App (Beta) + - [Auto-delete branch on merge/close](/admin/config/batch-changes#automatically-delete-branches-on-mergeclose), which automatically deletes branches created by Batch Changes when changesets are merged or closed + - [Commit signing for GitHub](/admin/config/batch-changes#commit-signing-with-github-apps), which signs commits created by Batch Changes via a GitHub App (Beta) - [Batch spec library](/admin/config/batch-changes#batch-spec-library), which help your users write batch specs and follow best practices ## Disable Batch Changes diff --git a/docs/batch-changes/tracking-existing-changesets.mdx b/docs/batch-changes/tracking-existing-changesets.mdx index cfad94d92..2b18c09e9 100644 --- a/docs/batch-changes/tracking-existing-changesets.mdx +++ b/docs/batch-changes/tracking-existing-changesets.mdx @@ -12,7 +12,7 @@ Batch Changes allow you not only to [publish changesets](/batch-changes/publishi ## Requirements -- Sourcegraph instance with repositories in it. See the [Quickstart](/#quick-install) guide on how to set up a Sourcegraph instance +- Sourcegraph instance with repositories in it. See the [Quickstart](/self-hosted/deploy) guide on how to set up a Sourcegraph instance - A [global service account token](/batch-changes/configuring-credentials#global-service-account-tokens) for Batch Changes (**a personal access token cannot currently be used for importing changesets**) ## Importing changesets into a batch change diff --git a/docs/cloud/index.mdx b/docs/cloud/index.mdx index 04864de2c..b367104fa 100644 --- a/docs/cloud/index.mdx +++ b/docs/cloud/index.mdx @@ -31,7 +31,7 @@ As part of this service you will receive a number of benefits from our team, inc - Initial resource estimations based on your organization & code size. - Putting forward a transparent deployment & cost estimate plan. -- Your own `example.sourcegraphcloud.com` domain with fully managed [DNS & HTTPS](/self-hosted/http-https-configuration). Optionally, you can [bring your own domain](#custom-domain). +- Your own `example.sourcegraphcloud.com` domain with fully managed [DNS & HTTPS](/self-hosted/http-https-configuration). Optionally, you can [bring your own domain](#custom-domains). - Hardware provisioning, software installation, and kernel configuration done for you. - Direct assistance in: - [Adding repositories from all of your code hosts to Sourcegraph](/admin/code-hosts/) @@ -152,7 +152,7 @@ All Sourcegraph Cloud instances are provisioned with a Sourcegraph-managed SMTP - [Code Monitoring](/code-monitoring/) notifications - Inviting other users to a Sourcegraph instance, or to an organization/team on a Sourcegraph instance - Important updates to user accounts (for example, creation of API keys) -- For [`builtin` authentication](/admin/auth/#builtin-password-authentication), password resets and email verification +- For [`builtin` authentication](/admin/auth/builtin), password resets and email verification By default, emails will be sent from an `@cloud.sourcegraph.com` email address. To test email delivery, refer to [sending a test email](/self-hosted/email#sending-a-test-email). diff --git a/docs/code-insights/explanations/automatically-generated-data-series.mdx b/docs/code-insights/explanations/automatically-generated-data-series.mdx index 04fe3867c..b9ff95337 100644 --- a/docs/code-insights/explanations/automatically-generated-data-series.mdx +++ b/docs/code-insights/explanations/automatically-generated-data-series.mdx @@ -48,5 +48,5 @@ Any matches that return values over a 100 characters will be truncated. This is ### Regular expression capture group resources -- [Example regular expressions for common use cases](/code-insights/references/common-use-cases#automatic-version-and-pattern-tracking) +- [Example regular expressions for common use cases](/code-insights/references/common-use-cases#versions-and-patterns) - [General additional capture groups documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Ranges) diff --git a/docs/code-insights/explanations/code-insights-filters.mdx b/docs/code-insights/explanations/code-insights-filters.mdx index 83662c361..9fe5c9217 100644 --- a/docs/code-insights/explanations/code-insights-filters.mdx +++ b/docs/code-insights/explanations/code-insights-filters.mdx @@ -21,7 +21,7 @@ If you combine both filters, the inclusion pattern will be applied first, then t ### `context:` Query-based search context filters -You can use a [query-based search context](/code-search/working/search-contexts#beta-query-based-search-contexts) to filter your insights to only results matching repositories that match the `repo:` or `-repo:` filter of the query-based context. +You can use a [query-based search context](/code-search/working/search-contexts#query-based-search-contexts) to filter your insights to only results matching repositories that match the `repo:` or `-repo:` filter of the query-based context. You can use this to filter multiple insights to a group of repositories that need only be maintained in one location. When you update a context that's being used as a filter, the next time you load the page, the filtered insight will reflect the updated context. As with explicit `repo:` filters, only repository regex expressions are allowed: you cannot specify repository revisions or predicate filters. diff --git a/docs/code-insights/explanations/current-limitations-of-code-insights.mdx b/docs/code-insights/explanations/current-limitations-of-code-insights.mdx index 1484686eb..8695592e8 100644 --- a/docs/code-insights/explanations/current-limitations-of-code-insights.mdx +++ b/docs/code-insights/explanations/current-limitations-of-code-insights.mdx @@ -78,7 +78,7 @@ Code Insights does not yet support running over specific revisions. ## VCS limitations -Code Insights by default can **not** query repositories that have [sub-repo permissions](/admin/permissions/api#Setting-sub-repository-permissions-for-users) configured. Note that some repositories can sync sub-repo permissions from the code host - Perforce depots currently (6.4). +Code Insights by default can **not** query repositories that have [sub-repo permissions](/admin/permissions/api#setting-sub-repository-permissions-for-users) configured. Note that some repositories can sync sub-repo permissions from the code host - Perforce depots currently (6.4). The reason for that restriction is security concerns around exposing the code in those repositories to users who should not be able to access it. diff --git a/docs/code-insights/how-tos/creating-a-custom-dashboard-of-code-insights.mdx b/docs/code-insights/how-tos/creating-a-custom-dashboard-of-code-insights.mdx index 1b3fdda25..dbf964c01 100644 --- a/docs/code-insights/how-tos/creating-a-custom-dashboard-of-code-insights.mdx +++ b/docs/code-insights/how-tos/creating-a-custom-dashboard-of-code-insights.mdx @@ -12,7 +12,7 @@ Click "Create new dashboard" in the top right corner and name your dashboard. Da ## 3. Select a visibility level -Set a visibility level for your dashboard. Dashboards [respect insights' permissions](/code-insights/explanations/viewing-code-insights#dashboard-visibility-respects-insights-visibility), so don't create an organization-shared dashboard if you have private insights you want to attach to it. +Set a visibility level for your dashboard. Dashboards [respect insights' permissions](/code-insights/explanations/viewing-code-insights#dashboard-visibility), so don't create an organization-shared dashboard if you have private insights you want to attach to it. - Private: visible only to you - Shared with [an organization](/admin/organizations): visible to everyone in the organization diff --git a/docs/code-insights/how-tos/filtering-an-insight.mdx b/docs/code-insights/how-tos/filtering-an-insight.mdx index 3dc78ac1d..c3bd60d33 100644 --- a/docs/code-insights/how-tos/filtering-an-insight.mdx +++ b/docs/code-insights/how-tos/filtering-an-insight.mdx @@ -28,9 +28,9 @@ Examples: ### 3. Or, filter to include a reusable group of repositories using a query-based search context -In the `context:` field of the filter panel, you can use a [query-based search context](/code-search/working/search-contexts#beta-query-based-search-contexts) to filter your insights to only results matching repositories that match the query-based context's `repo:` filter. +In the `context:` field of the filter panel, you can use a [query-based search context](/code-search/working/search-contexts#query-based-search-contexts) to filter your insights to only results matching repositories that match the query-based context's `repo:` filter. -First, if you haven't already created a search context, create a [query-based search context](/code-search/working/search-contexts#beta-query-based-search-contexts). You can define any group of repos using the syntax `repo:(^github\.com/sourcegraph/sourcegraph$|^github\.com/sourcegraph/about$...)`. +First, if you haven't already created a search context, create a [query-based search context](/code-search/working/search-contexts#query-based-search-contexts). You can define any group of repos using the syntax `repo:(^github\.com/sourcegraph/sourcegraph$|^github\.com/sourcegraph/about$...)`. Then, in the context field, reference the search context's name, usually `@owner/name-of-context`. diff --git a/docs/code-insights/language-insight-quickstart.mdx b/docs/code-insights/language-insight-quickstart.mdx index 2723c24f9..32eb8dc54 100644 --- a/docs/code-insights/language-insight-quickstart.mdx +++ b/docs/code-insights/language-insight-quickstart.mdx @@ -4,7 +4,7 @@ Get started and create your first [language code insight](/code-insights/) in 5 ## Introduction -> This quickstart guide assumes that **you have already completed [step 1, enabling the feature flag](/code-insights/quickstart#1-enable-the-experimental-feature-flag)**, on the main code insights quickstart guide. +> This quickstart guide assumes that **you have already completed [step 1, enabling the feature flag](/code-insights/quickstart#1-if-need-be-enable-the-experimental-feature-flag)**, on the main code insights quickstart guide. In this guide, you'll create a Sourcegraph language code insight that shows the percentage of lines of code in a repository by language. @@ -14,7 +14,7 @@ For more information about Code Insights see the [Code Insights](/code-insights/ ### 1. Visit your Sourcegraph instance /Insights page and select "+ Create new insight" -If you don't see the /Insights page you need to [enable code insights](quickstart#1-enable-the-experimental-feature-flag). +If you don't see the /Insights page you need to [enable code insights](/code-insights/quickstart#1-if-need-be-enable-the-experimental-feature-flag). ### 2. On the insight type selection page, select "Create language usage insight" diff --git a/docs/code-insights/quickstart.mdx b/docs/code-insights/quickstart.mdx index 2f2533c09..2ad382d01 100644 --- a/docs/code-insights/quickstart.mdx +++ b/docs/code-insights/quickstart.mdx @@ -13,7 +13,7 @@ For more information about Code Insights see the [Code Insights](/code-insights/ ## Requirements - You are a Sourcegraph enterprise customer. (Want code insights but aren't enterprise? [Let us know](mailto:feedback@sourcegraph.com).) -- Your Sourcegraph instance has at least 1 repository. (See "[Quickstart](/#quick-install)" on how to setup a Sourcegraph instance.) +- Your Sourcegraph instance has at least 1 repository. (See "[Quickstart](/self-hosted/deploy)" on how to setup a Sourcegraph instance.) - Your Sourcegraph instance is deployed via [Docker Compose](/self-hosted/deploy/docker-compose/) or [Kubernetes](/self-hosted/deploy/kubernetes/). - You are running Sourcegraph version 3.31.1 (August 2021 release) or later. - Note: If you're on Sourcegraph version 3.24 to 3.28, you can instead follow [this gist](https://gist.github.com/Joelkw/f0582b164578aabc3ac936dee43f23e0) to create an insight. Due to the early stage of the product, it's more likely you'll run into trouble, though, so we recommend that you either upgrade your Sourcegraph or reach out to your Sourcegraph reps for help. diff --git a/docs/code-insights/references/common-use-cases.mdx b/docs/code-insights/references/common-use-cases.mdx index e22f988c9..eb699b133 100644 --- a/docs/code-insights/references/common-use-cases.mdx +++ b/docs/code-insights/references/common-use-cases.mdx @@ -4,7 +4,7 @@ Here are some common use cases for Code Insights and example data series queries For all use cases, you can also explore your insight by [filtering repositories in real time](/code-insights/how-tos/filtering-an-insight) or add any [Sourcegraph search filter](/code-search/queries/language#search-pattern) to the data series query to filter by language, directory, or content. Currently, the sample queries using commit and diff searches are only supported for insights running over explicit lists of specific repositories. -_The sample queries below make the assumption you [do not want to search fork or archived](/code-insights/references/common-reasons-code-insights-may-not-match-search-results#not-including-fork-no-and-archived-no-in-your-insight-query) repositories. You can include those flags if you do._ +_The sample queries below make the assumption you [do not want to search fork or archived](/code-insights/references/common-reasons-code-insights-may-not-match-search-results#for-versions-pre-340-not-including-forkno-and-archivedno-in-your-insight-query) repositories. You can include those flags if you do._ ## Popular diff --git a/docs/code-insights/references/requirements.mdx b/docs/code-insights/references/requirements.mdx index 4cbfde7b7..9e104cdd6 100644 --- a/docs/code-insights/references/requirements.mdx +++ b/docs/code-insights/references/requirements.mdx @@ -17,4 +17,4 @@ You can only use Code Insights on a [Docker Compose](/self-hosted/deploy/docker- Sourcegraph Code Insights is compatible with any [Sourcegraph-compatible code host](/admin/repo/). -If the repo has [sub-repo permissions](/admin/permissions/api#Setting-sub-repository-permissions-for-users) configured, an admin will need to set `experimentalSettings.subRepoPermissions.allowCodeInsights` to `true` in site config to allow Code Insights to query that repo. +If the repo has [sub-repo permissions](/admin/permissions/api#setting-sub-repository-permissions-for-users) configured, an admin will need to set `experimentalSettings.subRepoPermissions.allowCodeInsights` to `true` in site config to allow Code Insights to query that repo. diff --git a/docs/code-navigation/auto-indexing-configuration.mdx b/docs/code-navigation/auto-indexing-configuration.mdx index f2e06f115..ec5da26b6 100644 --- a/docs/code-navigation/auto-indexing-configuration.mdx +++ b/docs/code-navigation/auto-indexing-configuration.mdx @@ -10,7 +10,7 @@ This document details the expected contents of [explicit index job configuration The root of the configuration has one top-level key, `index_jobs`, documented below. -### [`index_jobs`](#index-jobs) +### [`index_jobs`](#index_jobs) The index jobs field defines a set of [index job objects](#index-job-object) describing the actions to perform to successfully index a fresh clone of a repository. Each index job is executed independently (and possibly in parallel) by an executor. @@ -33,33 +33,33 @@ The pre-indexing steps, indexer container, local steps, and indexer arguments ar Each indexing job object can be configured with the following keys. -#### [`steps`](#index-job-steps) +#### [`steps`](#steps) The steps field defines an ordered sequence of pre-indexing actions (formatted as a [Docker step object](#docker-step-object)). Each step is executed before the indexer itself is invoked. -#### [`indexer`](#index-job-indexer) +#### [`indexer`](#indexer) The name of the Docker image distribution of the target indexer. -#### [`local_steps`](#index-job-local-steps) +#### [`local_steps`](#local_steps) An ordered sequence of commands to execute within a container running the configured indexer image. These commands are passed directly into the target container via `docker exec`, one at a time. Local steps should be used over Docker steps when the intended side effects alter state outside of the workspace on disk (e.g., setting up environment variables or installing OS packages require by the indexer tool). -#### [`indexer_args`](#index-job-indexer-args) +#### [`indexer_args`](#indexer_args) An ordered sequence of arguments that make up the indexing command. The indexing command is passed directly into the target container via `docker exec`. This step is expected to produce a code graph index artifact (as described by the `root` and `outfile` fields, described below). -#### [`root`](#index-job-root) +#### [`root`](#root) The working directory within the Docker container where the provided local steps and indexer commands are executed. This working directory is relative to the root of the target repository. An empty value (the default) indicates the root of the repository. This is also the directory relative to the path where the code graph index artifact is produced. -#### [`outfile`](#index-job-outfile) +#### [`outfile`](#outfile) The path to the code graph index artifact produced by the indexer, which is uploaded to the target Sourcegraph instance via [`src` CLI](/cli/) after the index step has completed successfully. This path is relative to the index job `root` (defined above). If not supplied, the value is assumed to be `dump.lsif` (which is the default artifact name of many indexers). Supply this argument when the target indexer produces a differently named artifact. Alternatively, some indexers provide flags to change the artifact name; in which case `dump.lsif` can be supplied there and a value for this key can be omitted. -#### [`requested_envvars`](#index-job-requested-envvars) +#### [`requested_envvars`](#requested_envvars) List of environment variables needed. These are made accessible to steps, local_steps, and the indexer_args command. @@ -102,15 +102,15 @@ Each configured Docker step is executed sequentially using the same volume-mount Each Docker step object can be configured with the following keys. -#### [`image`](#docker-step-image) +#### [`image`](#image) The name of the Docker image in which the configured commands are executed. -#### [`commands`](#docker-step-commands) +#### [`commands`](#commands) An ordered sequence of commands to execute within a container running the configured image. These commands are passed directly into the target container via `docker exec`, one at a time. -#### [`root`](#docker-step-root) +#### [`root`](#root-1) The working directory within the Docker container where the provided commands are executed. This working directory is relative to the root of the target repository. An empty value (the default) indicates the root of the repository. diff --git a/docs/code-navigation/auto-indexing.mdx b/docs/code-navigation/auto-indexing.mdx index 25647f9c8..394b70cd1 100644 --- a/docs/code-navigation/auto-indexing.mdx +++ b/docs/code-navigation/auto-indexing.mdx @@ -9,7 +9,7 @@ With Sourcegraph deployments supporting [executors](/admin/executors/), your repository contents can be automatically analyzed to produce a code graph index file. Once [auto-indexing is enabled](/code-navigation/auto-indexing#enable-auto-indexing) and [auto-indexing policies are configured](/code-navigation/auto-indexing#configure-auto-indexing), repositories will be periodically cloned into an executor sandbox, analyzed, and the resulting index file will be uploaded back to the Sourcegraph instance. -Auto-indexing is currently available for Go, TypeScript, JavaScript, Python, Ruby and JVM repositories. See also [dependency navigation](/code-navigation/features#dependency-navigation) for instructions on how to setup cross-dependency navigation depending on what language ecosystem you use. +Auto-indexing is currently available for Go, TypeScript, JavaScript, Python, Ruby and JVM repositories. See also [dependency navigation](/code-navigation/features) for instructions on how to setup cross-dependency navigation depending on what language ecosystem you use. ## Enable auto-indexing @@ -35,7 +35,7 @@ This step will control the scheduling of indexing jobs which are made available ### Tune the index scheduler -The frequency of index job scheduling can be tuned via the following environment variables read by `worker` service containers running the [`codeintel-auto-indexing`](/self-hosted/workers#codeintel-auto-indexing) task. +The frequency of index job scheduling can be tuned via the following environment variables read by `worker` service containers running the [`codeintel-auto-indexing`](/self-hosted/workers#codeintel-autoindexing-scheduler) task. - **`PRECISE_CODE_INTEL_AUTO_INDEXING_TASK_INTERVAL`**: The time to run periodic codeintel auto-indexing tasks. The default is every 2 minutes - **`PRECISE_CODE_INTEL_AUTO_INDEXING_REPOSITORY_PROCESS_DELAY`**: The minimum time that the same repository can be considered for auto-index scheduling. The default is every 24 hours @@ -144,7 +144,7 @@ For **NPM**, you can create a [secret named `NPM_TOKEN`](https://docs.npmjs.com/ ## Language support -Auto-indexing is currently available for Go, TypeScript, JavaScript, Python, Ruby and JVM repositories. See also [dependency navigation](/code-navigation/features#dependency-navigation) for instructions on how to setup cross-dependency navigation depending on what language ecosystem you use. +Auto-indexing is currently available for Go, TypeScript, JavaScript, Python, Ruby and JVM repositories. See also [dependency navigation](/code-navigation/features) for instructions on how to setup cross-dependency navigation depending on what language ecosystem you use. ## Lifecycle of an indexing job diff --git a/docs/code-navigation/envvars.mdx b/docs/code-navigation/envvars.mdx index b74815c5f..cbd526055 100644 --- a/docs/code-navigation/envvars.mdx +++ b/docs/code-navigation/envvars.mdx @@ -30,7 +30,7 @@ The following are variables are read from the `worker` service to control code g ### `codeintel-commitgraph` -The following variables influence the behavior of the [`codeintel-commitgraph` worker task](/self-hosted/workers#codeintel-commitgraph). +The following variables influence the behavior of the [`codeintel-commitgraph` worker task](/self-hosted/workers#codeintel-commitgraph-updater). | **Name** | **Default** | **Description** | | ------------------------------------------------------ | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | @@ -40,7 +40,7 @@ The following variables influence the behavior of the [`codeintel-commitgraph` w ### `codeintel-auto-indexing` -The following variables influence the behavior of the [`codeintel-auto-indexing` worker task](/self-hosted/workers#codeintel-auto-indexing). +The following variables influence the behavior of the [`codeintel-auto-indexing` worker task](/self-hosted/workers#codeintel-autoindexing-scheduler). | **Name** | **Default** | **Description** | | --------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- | @@ -59,7 +59,7 @@ The following settings should be the same for the [`frontend`](#frontend) servic ### `codeintel-janitor` -The following variables influence the behavior of the [`codeintel-janitor` worker task](/self-hosted/workers#codeintel-janitor). +The following variables influence the behavior of the [`codeintel-janitor` worker task](/self-hosted/workers#codeintel-upload-janitor). | **Name** | **Default** | **Description** | | | ------------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- | diff --git a/docs/code-navigation/explanations/uploads.mdx b/docs/code-navigation/explanations/uploads.mdx index 8436af333..b31e0ab8b 100644 --- a/docs/code-navigation/explanations/uploads.mdx +++ b/docs/code-navigation/explanations/uploads.mdx @@ -40,7 +40,7 @@ Sourcegraph maintains a mapping from a commit of a repository to the set of uplo Upon a state change in an upload, we flag the repository as needing an update. Subsequently, the worker service updates the commit graph and asynchronously clears the flag for that repository. -When an upload changes state, the repository is flagged as requiring an update status. Then the [`worker` service](/self-hosted/workers#codeintel-commitgraph) +When an upload changes state, the repository is flagged as requiring an update status. Then the [`worker` service](/self-hosted/workers#codeintel-commitgraph-updater) will update the commit graph and unset the flag for that repository asynchronously. While this flag is set, the repository's commit graph is considered `stale`. This means there may be some upload records in a `COMPLETED` state that aren't yet used to resolve code navigation queries. diff --git a/docs/code-navigation/how-to/index-other-languages.mdx b/docs/code-navigation/how-to/index-other-languages.mdx index 804ddfb5b..04e714cab 100644 --- a/docs/code-navigation/how-to/index-other-languages.mdx +++ b/docs/code-navigation/how-to/index-other-languages.mdx @@ -46,8 +46,8 @@ The `src-cli` upload command will try to infer the repository and git commit by If you're using Sourcegraph.com or have enabled - [`lsifEnforceAuth`](/admin/config/site-config#lsifEnforceAuth) you need to - [supply a GitHub token](#proving-ownership-of-a-github-repository) supplied + [`lsifEnforceAuth`](/admin/config/site-config) you need to + supply a GitHub token supplied via the `-github-token` flag in the command above. @@ -82,5 +82,5 @@ Possible errors that can happen during upload include: - Clone in progress: the instance doesn't have the necessary data to process your upload yet, retry in a few minutes - Unknown repository (404): check your `-endpoint` and make sure you can view the repository on your Sourcegraph instance - Invalid commit (404): try visiting the repository at that commit on your Sourcegraph instance to trigger an update -- Invalid auth when using Sourcegraph.com or when [`lsifEnforceAuth`](/admin/config/site-config#lsifEnforceAuth) is `true` (401 for an invalid token or 404 if the repository cannot be found on GitHub.com): make sure your GitHub token is valid and that the repository is correct +- Invalid auth when using Sourcegraph.com or when [`lsifEnforceAuth`](/admin/config/site-config) is `true` (401 for an invalid token or 404 if the repository cannot be found on GitHub.com): make sure your GitHub token is valid and that the repository is correct - Unexpected errors (500s): reach out to your Sourcegraph support team for assistance diff --git a/docs/code-navigation/index.mdx b/docs/code-navigation/index.mdx index 83444757b..793d94b8d 100644 --- a/docs/code-navigation/index.mdx +++ b/docs/code-navigation/index.mdx @@ -71,7 +71,7 @@ Code Navigation helps you with the following tasks: | [Hover](/code-navigation/features#hover) | Quickly view a symbol's type signature and documentation without switching to another source file | | [Go to definition](/code-navigation/features#go-to-definition) | Click the button or symbol name, navigates you to the symbol's definition | | [Find references](/code-navigation/features#find-references) | Selecting it in the hover lists all references, definitions, and implementations at the bottom, including precise and search-based results | -| [Find implementations](/code-navigation/features#find-implementations) | Click to go to a symbol's interface definition or, at the interface, see all implementations across repositories, including interfaces implemented by a struct | +| [Find implementations](/code-navigation/features) | Click to go to a symbol's interface definition or, at the interface, see all implementations across repositories, including interfaces implemented by a struct | | [Perform an action](/code-navigation/features#perform-an-action) | When browsing code, you can perform a couple of actions like open in code host, raw download and view blame. | diff --git a/docs/code-navigation/inference-configuration.mdx b/docs/code-navigation/inference-configuration.mdx index 92de99eaf..04fae0356 100644 --- a/docs/code-navigation/inference-configuration.mdx +++ b/docs/code-navigation/inference-configuration.mdx @@ -193,7 +193,7 @@ This auto-indexing-specific library defines the following four path pattern cons This library also defines the following two pattern collection constructors. -- `new_path_combine(patterns)` creates a pattern collection object (to be used with [recognizers](#sg-autoindex-recognizers)) from the given set of path `pattern`s. +- `new_path_combine(patterns)` creates a pattern collection object (to be used with [recognizers](#sgautoindexrecognizer)) from the given set of path `pattern`s. - Type: `((pattern | array[pattern])...) -> pattern` - `new_path_exclude(patterns)` creates a new _inverted_ pattern collection object. Paths matching these `pattern`s are filtered out from the set of matching filepaths given to a recognizer's `generate` function. - Type: `((pattern | array[pattern])...) -> pattern` diff --git a/docs/code-navigation/precise-code-navigation.mdx b/docs/code-navigation/precise-code-navigation.mdx index 5400a4308..2d3a67c75 100644 --- a/docs/code-navigation/precise-code-navigation.mdx +++ b/docs/code-navigation/precise-code-navigation.mdx @@ -31,8 +31,8 @@ Precise code navigation relies on the open source [SCIP Code Intelligence Protoc 1. **Manual indexing**. Index a repository and upload it to your Sourcegraph instance: - - [Index a Go repository](/code-navigation/how-to/index-a-go-repository#manual-indexing) - - [Index a TypeScript or JavaScript repository](/code-navigation/how-to/index-a-typescript-and-javascript-repository#manual-indexing) + - [Index a Go repository](/code-navigation/how-to/index-a-go-repository#indexing) + - [Index a TypeScript or JavaScript repository](/code-navigation/how-to/index-a-typescript-and-javascript-repository#one-off-indexing-using-scip-typescript-locally) - [Index a Java, Scala, or Kotlin repository](https://sourcegraph.github.io/scip-java/docs/getting-started.html) - [Index a Python repository](https://sourcegraph.com/github.com/sourcegraph/scip-python) - [Index a Ruby repository](https://sourcegraph.com/github.com/sourcegraph/scip-ruby) diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index b86a4d8f3..fc119ae8d 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -43,7 +43,7 @@ See the [query syntax](/code-search/queries#filters-diff-and-commit-searches-onl Searching over commit messages is supported in Sourcegraph by adding `type:commit` to your search query. Separately, you can also use the `message:"any string"` parameter to filter `type:diff` searches for a given commit message. Commit message searches can narrowed down further with filters such as author and time. -See our [query syntax](/code-search/queries#diff-and-commit-searches-only) documentation for a comprehensive list of supported parameters. +See our [query syntax](/code-search/queries#filters-diff-and-commit-searches-only) documentation for a comprehensive list of supported parameters. ## Symbol search diff --git a/docs/code-search/how-to/opengrok.mdx b/docs/code-search/how-to/opengrok.mdx index 5ec10f588..89f727b4d 100644 --- a/docs/code-search/how-to/opengrok.mdx +++ b/docs/code-search/how-to/opengrok.mdx @@ -15,9 +15,9 @@ Oracle OpenGrok provides wildcard support for searches. For example, to find all strings beginning with `foo`, you can use the wildcard search `foo*`. Similarly, OpenGrok provides the `?` operator for single character wildcards. -Sourcegraph, [provides full regular expression search](/code-search/queries#regexp-search), with support for the [RE2 syntax](https://golang.org/s/re2syntax). The same search above would take the form `foo.*` (or in this case, just `foo`, since Sourcegraph automatically supports partial matches). Much more powerful regexp expressions are available. +Sourcegraph, [provides full regular expression search](/code-search/queries#regular-expression-search), with support for the [RE2 syntax](https://golang.org/s/re2syntax). The same search above would take the form `foo.*` (or in this case, just `foo`, since Sourcegraph automatically supports partial matches). Much more powerful regexp expressions are available. -(Note that Sourcegraph also provides a [literal search mode](/code-search/queries#Literal-search-default) by default, in which there's no need to escape special characters. This simplifies searches such as `foo(`, which would result in an error in regexp mode.) +(Note that Sourcegraph also provides a [literal search mode](/code-search/queries#keyword-search-default) by default, in which there's no need to escape special characters. This simplifies searches such as `foo(`, which would result in an error in regexp mode.) ### Selecting repositories and branches @@ -29,7 +29,7 @@ Sourcegraph provides a search filter (`repo:`) that supports regexp and partial | - To search in a distinct list of repositories, you can use a ` |` character as a regexp OR operator: `pattern repo:github.com/org/repository1 | github.com/org/repository2`. | | - Note this query could be simplified further using more advanced regexp matching if the two repos share part of their names, such as: `pattern repo:github.com/org/repository(1 | 2)`. | | -Sourcegraph also allows site admins to create pre-defined repository groupings, using [version contexts](/code-search/features#version-contexts-experimental). +Sourcegraph also allows site admins to create pre-defined repository groupings, using [search contexts](/code-search/features#search-contexts). ### Searching in non-master (unindexed) branches, tags, and commits @@ -43,9 +43,9 @@ Sourcegraph also provides the ability to search on multiple Git revisions in a s Oracle OpenGrok doesn't index most single-character strings (such as for special characters like `{`, `}`, `[`, `]`, `+`, `-`, and more), and non-alpha-numeric characters generally. -Sourcegraph indexes all characters, and can search for strings of any length. Using the default [literal search mode](/code-search/queries#Literal-search-default), any search (including those with special characters like `foo.bar`, `try {`, `i++`, `i-=1`, `foo->bar`, and more), will all be searchable without special handling. Using [regexp mode](/code-search/queries#regexp-search) would require escaping special characters. +Sourcegraph indexes all characters, and can search for strings of any length. Using the default [literal search mode](/code-search/queries#keyword-search-default), any search (including those with special characters like `foo.bar`, `try {`, `i++`, `i-=1`, `foo->bar`, and more), will all be searchable without special handling. Using [regexp mode](/code-search/queries#regular-expression-search) would require escaping special characters. -The only exceptions are colon characters, which are by default used for specifying a [search keyword](#search-keywords) on Sourcegraph. Any search containing colons can be done using the `content:` keyword (for example, `content:"foo::bar"`) to explicitly mark it as the search string. +The only exceptions are colon characters, which are by default used for specifying a [search keyword](#search-filters) on Sourcegraph. Any search containing colons can be done using the `content:` keyword (for example, `content:"foo::bar"`) to explicitly mark it as the search string. ### Boolean operators diff --git a/docs/code-search/index.mdx b/docs/code-search/index.mdx index 35ee97cc6..196bf2438 100644 --- a/docs/code-search/index.mdx +++ b/docs/code-search/index.mdx @@ -96,7 +96,7 @@ Code Search main features include: - Use [search contexts](/code-search/features#search-contexts) to search across a set of repositories at specific revisions - Curate [saved searches](/code-search/features#saved-searches) for yourself or your org - Use [code monitoring](/code-monitoring/) to set up notifications for code changes that match a query -- View [language statistics](/code-search/features#statistics) for search results +- View [language statistics](/code-search/features) for search results {' '} diff --git a/docs/code-search/queries/index.mdx b/docs/code-search/queries/index.mdx index b8dfa9f3b..a2612276a 100644 --- a/docs/code-search/queries/index.mdx +++ b/docs/code-search/queries/index.mdx @@ -13,7 +13,7 @@ For a graphical view of Sourcegraph's query syntax, see the [search language ref ## Search patterns -This section documents the search pattern syntax in Sourcegraph. To match file content, you need to specify a search pattern. Search patterns are optional when searching [commits](#filters-diff-and-commit-searches-only), [filenames](#filename-search), or [repository names](#repository-name-search). +This section documents the search pattern syntax in Sourcegraph. To match file content, you need to specify a search pattern. Search patterns are optional when searching [commits](#filters-diff-and-commit-searches-only), [filenames](#filename-search), or [repository names](#repository-names). ### Keyword search (default) @@ -70,7 +70,7 @@ The following filters can be used on all searches (using [RE2 syntax](https://go | **rev:revision-pattern**
_alias: revision_ | 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](#repository-revisions) documentation to learn more | [`repo:sourcegraph/sourcegraph rev:v3.14.0 mux`](https://sourcegraph.com/search?q=repo:sourcegraph/sourcegraph+rev:v3.14.0+mux&patternType=keyword) | | **file:regexp-pattern**
_alias: f_ | Only include file results whose full path matches the regexp. The regexp is unanchored by default: to match against the entire path, use regexp anchors like `^README.md$`. | [`file:\.js$ httptest`](https://sourcegraph.com/search?q=file:%5C.js%24+httptest)
[`file:internal/ httptest`](https://sourcegraph.com/search?q=file:internal/+httptest) | | **-file:regexp-pattern**
_alias: -f_ | Exclude file results whose full path matches the regexp. The regexp is unanchored by default: to match against the entire path, use regexp anchors like `^README.md$`. | [`file:\.js$ -file:test http`](https://sourcegraph.com/search?q=file:%5C.js%24+-file:test+http) | -| **content:"pattern"** | Set the search pattern with a dedicated parameter. Useful when searching literally for a string that may conflict with the [search pattern syntax](#search-pattern-syntax). In between the quotes, the `\` character will need to be escaped (`\\` to evaluate for `\`) | [`repo:sourcegraph content:"repo:sourcegraph"`](https://sourcegraph.com/search?q=repo:sourcegraph+content:"repo:sourcegraph"&patternType=keyword) | +| **content:"pattern"** | Set the search pattern with a dedicated parameter. Useful when searching literally for a string that may conflict with the [search pattern syntax](#search-patterns). In between the quotes, the `\` character will need to be escaped (`\\` to evaluate for `\`) | [`repo:sourcegraph content:"repo:sourcegraph"`](https://sourcegraph.com/search?q=repo:sourcegraph+content:"repo:sourcegraph"&patternType=keyword) | | **-content:"pattern"** | Exclude results from files whose content matches the pattern. | [`file:Dockerfile alpine -content:alpine:latest`](https://sourcegraph.com/search?q=file:Dockerfile+alpine+-content:alpine:latest&patternType=keyword) | | **select:_result-type_**
**select:repo**
**select:commit.diff.added**
**select:commit.diff.removed**
**select:file**
**select:content**
**select:symbol._symbol-type_**
**select:file.owners** _(Experimental)_ | Shows only query results for a given type. For example, `select:repo` displays only distinct repository paths from search results, and `select:commit.diff.added` shows only added code matching the search. See [language definition](/code-search/queries/language#select) for full list of possible values | [`fmt.Errorf select:repo`](https://sourcegraph.com/search?q=fmt.Errorf+select:repo&patternType=keyword) | | **language:language-name**
_alias: lang, l_ | Only include results from files in the specified programming language | [`language:typescript encoding`](https://sourcegraph.com/search?q=language:typescript+encoding) | diff --git a/docs/code-search/types/symbol.mdx b/docs/code-search/types/symbol.mdx index 18d9cf71f..2e857e23f 100644 --- a/docs/code-search/types/symbol.mdx +++ b/docs/code-search/types/symbol.mdx @@ -22,7 +22,7 @@ The extracted `ctags` symbols are also used for the symbol sidebar, which catego Here is the query path for symbol searches: -- **Zoekt**: if [indexed search](/admin/search#indexed-search) is enabled and the search is for the tip commit of an indexed branch, then Zoekt will service the query and it should respond quickly. Zoekt indexes the default branch (usually `master` or `main`) and can be configured for [multi-branch indexing](/code-search/features#multi-branch-indexing-experimental). The high commit frequency of monorepos reduces the likelihood that Zoekt will be able to respond to symbol searches. Zoekt **eagerly** indexes by listening to repository updates, whereas the searcher service **lazily** indexes the commit being searched. +- **Zoekt**: if [indexed search](/admin/search#indexed-search) is enabled and the search is for the tip commit of an indexed branch, then Zoekt will service the query and it should respond quickly. Zoekt indexes the default branch (usually `master` or `main`) and can be configured for [multi-branch indexing](/code-search/features#multi-branch-indexing). The high commit frequency of monorepos reduces the likelihood that Zoekt will be able to respond to symbol searches. Zoekt **eagerly** indexes by listening to repository updates, whereas the searcher service **lazily** indexes the commit being searched. - **Searcher service with Rockskip enabled**: if [Rockskip](/code-navigation/rockskip) is enabled, it'll search for symbols stored in Postgres. After initial indexing, queries should be resolved quickly. - **Searcher service with an index for the commit**: if the searcher service has already indexed this commit (i.e. someone has visited the commit before) then the query should be resolved quickly. Indexes are deleted in LRU fashion to remain under the configured maximum disk usage which [defaults to 100GB](/code-navigation/search-based-code-navigation#what-configuration-settings-can-i-apply). - **Searcher service with an index for a different commit**: if the searcher service has already indexed a **different** commit in the same repository, then it will make a copy of the previous index on disk then run [ctags](https://github.com/universal-ctags/ctags#readme) on the files that changed between the two commits and update the symbols in the new index. This process takes roughly 20 seconds on a monorepo with 40M LOC and 400K files. diff --git a/docs/cody/capabilities/agentic-context-fetching.mdx b/docs/cody/capabilities/agentic-context-fetching.mdx index f1265e770..af2b6903c 100644 --- a/docs/cody/capabilities/agentic-context-fetching.mdx +++ b/docs/cody/capabilities/agentic-context-fetching.mdx @@ -65,7 +65,7 @@ Agentic context fetching is enabled by default. It uses LLM reflection and basic You can disable agentic context in your extension settings using `cody.agenticContext`. -Terminal access for Enterprise users is disabled by default. To enable it, set the `agentic-chat-cli-tool-experimental` feature flag [terminal access](#terminal-commands). +Terminal access for Enterprise users is disabled by default. To enable it, set the `agentic-chat-cli-tool-experimental` feature flag [terminal access](#terminal-access). ## MCP support diff --git a/docs/cody/capabilities/chat.mdx b/docs/cody/capabilities/chat.mdx index 320127e01..3ab601164 100644 --- a/docs/cody/capabilities/chat.mdx +++ b/docs/cody/capabilities/chat.mdx @@ -88,7 +88,7 @@ Image upload support varies by client. Check the [feature parity reference](/cod Cody allows you to select the LLM you want to use for your chat, which is optimized for speed versus accuracy. Enterprise users with the new [model configuration](/cody/enterprise/model-configuration) can use the LLM selection dropdown to choose a chat model. -You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-commands). +You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-prompts). ## Smart Apply and Execute code suggestions diff --git a/docs/cody/clients/cody-with-sourcegraph.mdx b/docs/cody/clients/cody-with-sourcegraph.mdx index 58e95b4f3..b2cbc0dbf 100644 --- a/docs/cody/clients/cody-with-sourcegraph.mdx +++ b/docs/cody/clients/cody-with-sourcegraph.mdx @@ -41,7 +41,7 @@ The chat interface with your Code Search queries opens parallel to your query se ## Chat with Cody on the web interface -The feature set for the Cody chat is the same as the IDE extensions. Your previous chats can be viewed from the **History** tab. Claude 3.5 Sonnet is selected as the default chat model. You can change this LLM model based on your use case to optimize speed, accuracy, or cost. Enterprise users with the new [model configuration](/cody/enterprise/model-configuration) can use the LLM selection dropdown to choose a chat model. You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-commands). +The feature set for the Cody chat is the same as the IDE extensions. Your previous chats can be viewed from the **History** tab. Claude 3.5 Sonnet is selected as the default chat model. You can change this LLM model based on your use case to optimize speed, accuracy, or cost. Enterprise users with the new [model configuration](/cody/enterprise/model-configuration) can use the LLM selection dropdown to choose a chat model. You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-prompts). To help you automate your key tasks in your development workflow, you get **[Prompts](/cody/capabilities/prompts)**. If you are a part of an organization on Sourcegraph.com or a self-hosted Sourcegraph instance, you can view these pre-built Prompts created by your teammates. On the contrary, you can create your Prompts via the **Prompt Library** from your Sourcegraph instance. diff --git a/docs/cody/clients/install-jetbrains.mdx b/docs/cody/clients/install-jetbrains.mdx index fe9451c9b..785ba625c 100644 --- a/docs/cody/clients/install-jetbrains.mdx +++ b/docs/cody/clients/install-jetbrains.mdx @@ -159,7 +159,7 @@ Enterprise users can leverage the full power of the Sourcegraph search engine as {' '} - Read more about [Context fetching mechanisms](/cody/core-concepts/context/#context-fetching-mechanism) + Read more about [Context fetching mechanisms](/cody/core-concepts/context#cody-context-fetching-features) in detail. @@ -221,7 +221,7 @@ All you need to do is select and highlight the code line with the error and clic ## Supported LLM models -Enterprise users who have [model configuration](/cody/enterprise/model-configuration#model-configuration) configured can also select from the available models for their instance. On instances with the ["completions" configuration](/cody/enterprise/model-configuration#completions-configuration), a site admin determines the LLM, which cannot be changed within the editor. +Enterprise users who have [model configuration](/cody/enterprise/model-configuration#model-configuration) configured can also select from the available models for their instance. On instances with the ["completions" configuration](/cody/enterprise/model-configuration), a site admin determines the LLM, which cannot be changed within the editor. Read and learn more about the [supported diff --git a/docs/cody/clients/install-vscode.mdx b/docs/cody/clients/install-vscode.mdx index 1b139eb48..401840204 100644 --- a/docs/cody/clients/install-vscode.mdx +++ b/docs/cody/clients/install-vscode.mdx @@ -195,7 +195,7 @@ Enterprise users can use the full power of the Sourcegraph search engine as Cody {' '} - Read more about [Context fetching mechanism](/cody/core-concepts/context/#context-fetching-mechanism) + Read more about [Context fetching mechanism](/cody/core-concepts/context#cody-context-fetching-features) in detail. @@ -268,7 +268,7 @@ Enterprise users get Claude 3.5 Sonnet as the default LLM models without extra c Provisioned throughput via AWS is not supported for 3.5 Sonnet. -You also get additional capabilities like BYOLLM (Bring Your Own LLM), supporting Single-Tenant and Self Hosted setups for flexible coding environments. Your site administrator determines the LLM, and cannot be changed within the editor. However, Cody Enterprise users when using Sourcegraph Model Provider (Cody Gateway) have the ability to [configure custom models](/model-provider#configuring-custom-models) from Anthropic, OpenAI, and Google Gemini. +You also get additional capabilities like BYOLLM (Bring Your Own LLM), supporting Single-Tenant and Self Hosted setups for flexible coding environments. Your site administrator determines the LLM, and cannot be changed within the editor. However, Cody Enterprise users when using Sourcegraph Model Provider (Cody Gateway) have the ability to [configure custom models](/model-provider) from Anthropic, OpenAI, and Google Gemini. Read more about all the supported LLM models diff --git a/docs/cody/core-concepts/index.mdx b/docs/cody/core-concepts/index.mdx index 56e2c896b..a5284b2a5 100644 --- a/docs/cody/core-concepts/index.mdx +++ b/docs/cody/core-concepts/index.mdx @@ -31,7 +31,7 @@ diff --git a/docs/cody/enterprise/model-configuration.mdx b/docs/cody/enterprise/model-configuration.mdx index 11d66a0a5..eb18be0b2 100644 --- a/docs/cody/enterprise/model-configuration.mdx +++ b/docs/cody/enterprise/model-configuration.mdx @@ -25,7 +25,7 @@ The model configuration for Cody is managed through the `"modelConfiguration"` f | [`sourcegraph`](/cody/enterprise/model-configuration#sourcegraph-provided-models) | Configures access to Sourcegraph-provided models available through Cody Gateway. | | [`providerOverrides`](/cody/enterprise/model-configuration#provider-overrides) | Configures access to models through your keys with most common LLM providers (BYOK) or hosted behind any openaicompatible endpoint | | [`modelOverrides`](/cody/enterprise/model-configuration#model-overrides) | Extends or modifies the list of models Cody recognizes and their configurations. | -| [`selfHostedModels`](/cody/enterprise/model-configuration#self-hosted-models) | Adds models to Cody’s recognized models list with default configurations provided by Sourcegraph. Only available for certain models; general models can be configured in `modelOverrides`. | +| [`selfHostedModels`](/cody/enterprise/model-configuration) | Adds models to Cody’s recognized models list with default configurations provided by Sourcegraph. Only available for certain models; general models can be configured in `modelOverrides`. | | [`defaultModels`](/cody/enterprise/model-configuration#default-models) | Specifies the models assigned to each Cody feature (chat, fast chat, autocomplete). | ## Getting started with `modelConfiguration` diff --git a/docs/getting-started/github-vs-sourcegraph.mdx b/docs/getting-started/github-vs-sourcegraph.mdx index f8d45c2f9..12cd2e0ed 100644 --- a/docs/getting-started/github-vs-sourcegraph.mdx +++ b/docs/getting-started/github-vs-sourcegraph.mdx @@ -111,7 +111,7 @@ GitHub code search supports searching across issues, pull requests, and discussi Sourcegraph allows you to search both indexed and unindexed code. Sourcegraph’s [current limitations](/admin/search) on indexed code are: -- Files larger than 1 MB are excluded unless you explicitly specify them in [search.largeFiles](/admin/config/site-config#search-largeFile) to be indexed and searched regardless of size +- Files larger than 1 MB are excluded unless you explicitly specify them in [search.largeFiles](/admin/config/site-config) to be indexed and searched regardless of size - Binary files are excluded - Files other than UTF-8 are excluded @@ -131,7 +131,7 @@ In addition to searching your organization’s private code, you can use Sourceg Sourcegraph offers [structural search](/code-search/types/structural), and GitHub code search does not offer this search method. Structural search lets you match richer syntax patterns, specifically in code and structured data formats like JSON. Sourcegraph offers structural search on indexed code and uses [Comby syntax](https://comby.dev/docs/syntax-reference) for structural matching of code blocks or nested expressions. For example, the `fmt.Sprintf` function is a popular print function in Go. [Here](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/about%24+fmt.Sprintf%28...%29&patternType=structural&_ga=2.204781593.827352295.1667227568-1057140468.1661198534&_gac=1.118615675.1665776224.CjwKCAjwkaSaBhA4EiwALBgQaJCOc6GlhIDQyg6HQScgfSBQpoFTUf7T_NNqEX5JaobtCS08GUEJuRoCIlIQAvD_BwE&_gl=1*1r2u5zs*_ga*MTA1NzE0MDQ2OC4xNjYxMTk4NTM0*_ga_E82CCDYYS1*MTY2NzUwODExNC4xMTQuMS4xNjY3NTA5NjUyLjAuMC4w) is a pattern that matches all of the arguments in `fmt.Sprintf` in our code using structural search compared to the [search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/about%24+fmt.Sprintf%28...%29&patternType=regexp) using regex. -Both GitHub code search and Sourcegraph support regular expression and keyword search. [Regular expression](/code-search/queries#standard-search) helps you find code that matches a pattern (including classes of characters like letters, numbers, and whitespace) and can restrict the results to anchors like the start of a line, the end of a line, or word boundary. Keyword search matches on individual terms, supporting both literal searches and flexible keyword-style queries. +Both GitHub code search and Sourcegraph support regular expression and keyword search. [Regular expression](/code-search/queries#regular-expression-search) helps you find code that matches a pattern (including classes of characters like letters, numbers, and whitespace) and can restrict the results to anchors like the start of a line, the end of a line, or word boundary. Keyword search matches on individual terms, supporting both literal searches and flexible keyword-style queries. GitHub’s search syntax can be found [here](https://cs.github.com/about/syntax), and Sourcegraph’s search syntax can be found [here](/code-search/queries). @@ -149,7 +149,7 @@ Symbol search makes it easier to find specific functions, variables, and more by Both GitHub code search and Sourcegraph support symbol searching. GitHub supports symbol search in 10 languages, including C#, Python, Go, Java, JavaScript, TypeScript, PHP, Protocol Buffers, Ruby, and Rust. -Sourcegraph’s [symbol search](/code-navigation/features#symbol-search) is available for more than 75 languages. +Sourcegraph’s [symbol search](/code-search/features#symbol-search) is available for more than 75 languages. | **Features** | **GitHub** | **Sourcegraph** | | --------------------------------------- | -------------------------------------------------------------------------------------------------- | --------------- | @@ -221,7 +221,7 @@ Search contexts are an alternative way to narrow down the scope of your search t You can create custom search contexts to be simple or advanced with GitHub. Simple search contexts are things such as repository or organization name, and advanced search contexts can mix multiple attributes, including languages. GitHub’s search contexts allow for more personalization than Sourcegraph. -With Sourcegraph, a [search context](/code-search/working/search-contexts) represents the body of code that will be searched. Search contexts can be private to the user who creates it or shared with other users on the same Sourcegraph instance. [Query-based ](/code-search/working/search-contexts#beta-query-based-search-contexts)search contexts (beta) are an additional way to create search contexts based on variables like repository, rev, file, lang, case, fork, and visibility. Both [OR] and [AND] expressions are allowed to help further narrow the scope of query-based search contexts. +With Sourcegraph, a [search context](/code-search/working/search-contexts) represents the body of code that will be searched. Search contexts can be private to the user who creates it or shared with other users on the same Sourcegraph instance. [Query-based ](/code-search/working/search-contexts#query-based-search-contexts)search contexts (beta) are an additional way to create search contexts based on variables like repository, rev, file, lang, case, fork, and visibility. Both [OR] and [AND] expressions are allowed to help further narrow the scope of query-based search contexts. | **Features** | **GitHub** | **Sourcegraph** | | --------------- | ----------------------- | ------------------------------------ | @@ -254,7 +254,7 @@ GitHub’s [precise code navigation](https://docs.github.com/en/repositories/wor Sourcegraph’s [precise code navigation](/code-navigation/precise-code-navigation) is not heuristic-based. Instead, it uses SCIP and LSIF data to deliver precomputed code navigation, meaning that it is fast and compiler-accurate. It is the only 100% accurate solution for code navigation between Sourcegraph’s and GitHub’s offerings. -Because precise code navigation uses code graph (SCIP) data, it is not susceptible to false positives or other potential errors (such as those caused by symbols with the same name). It also supports cross-repository navigation, which shows symbol usage across repositories and [transitive dependencies](/code-navigation/features#beta-dependency-navigation). It also has a unique feature, “Find implementations,” which allows you to navigate to a symbol’s interface definition or find all the places an interface is being implemented. +Because precise code navigation uses code graph (SCIP) data, it is not susceptible to false positives or other potential errors (such as those caused by symbols with the same name). It also supports cross-repository navigation, which shows symbol usage across repositories and [transitive dependencies](/code-navigation/features). It also has a unique feature, “Find implementations,” which allows you to navigate to a symbol’s interface definition or find all the places an interface is being implemented. Sourcegraph’s precise code navigation is opt-in and requires you to upload code graph data (LSIF or SCIP) to Sourcegraph. This data can be automatically generated and uploaded to Sourcegraph via [auto-indexing](/code-navigation/auto-indexing). For repositories without SCIP or LSIF data, Sourcegraph automatically falls back to search-based code navigation. diff --git a/docs/getting-started/index.mdx b/docs/getting-started/index.mdx index 66a39b182..ca140b583 100644 --- a/docs/getting-started/index.mdx +++ b/docs/getting-started/index.mdx @@ -45,7 +45,7 @@ Sourcegraph's main features are: - [Code Insights](#code-insights): reveal high-level information about your codebase at its current state and over time to track migrations, version usage, vulnerability remediation, ownership, and anything else you can search in Sourcegraph - [Batch Changes](#batch-changes): make large-scale code changes across many repositories and code hosts - [Integrations](#integrations) with code hosts, code review tools, editors, web browsers, etc. -- [MCP Server](#mcp-server-integration): Connect AI tools and IDEs to Sourcegraph's code intelligence capabilities through the Model Context Protocol +- [MCP Server](#mcp-server): Connect AI tools and IDEs to Sourcegraph's code intelligence capabilities through the Model Context Protocol ## How do I start using Sourcegraph? @@ -71,7 +71,7 @@ Sourcegraph code search is fast, works across all your repositories at any commi - [Powerful, flexible query syntax](/code-search/queries) - [Commit diff search](/code-search/features#commit-diff-search) - [Commit message search](/code-search/features#commit-message-search) -- [Saved search scopes](/code-search/features#search-scopes) +- [Saved search scopes](/code-search/features#saved-searches) - [Search contexts to search across a set of repositories at specific revisions](/code-search/features#search-contexts) - [Saved search monitoring](/code-monitoring/) diff --git a/docs/integration/bitbucket-server.mdx b/docs/integration/bitbucket-server.mdx index 9c806e9e6..92d01552b 100644 --- a/docs/integration/bitbucket-server.mdx +++ b/docs/integration/bitbucket-server.mdx @@ -7,7 +7,7 @@ You can use Sourcegraph with Git repositories hosted on [Bitbucket Server](https | [Repository syncing](/admin/code-hosts/bitbucket-server) | ✅ | | [Webhooks](/admin/code-hosts/bitbucket-server#webhooks) | ✅ | | [Repository permissions](/admin/code-hosts/bitbucket-server#repository-permissions) | ✅ | -| [Sourcegraph Bitbucket Server plugin](#sourcegraph-bitbucket-server-plugin) | ✅ | +| [Sourcegraph Bitbucket Server plugin](#sourcegraph-bitbucket-plugin) | ✅ | | [Browser extension](#browser-extension) | ✅ | ## Repository syncing @@ -143,7 +143,7 @@ The plugin uses `RepositoryService`, `UserManager`, `UserService` and `SecurityS The [Sourcegraph browser extension](/integration/browser-extension) supports Bitbucket Server / Bitbucket Data Center. When installed in your web browser, it adds hover tooltips, go-to-definition, find-references, and code search to files and pull requests viewed on Bitbucket Server / Bitbucket Data Center. 1. Install the [Sourcegraph browser extension](/integration/browser-extension). -1. [Configure the browser extension](/integration/browser-extension#configuring-the-sourcegraph-instance-to-use) to use your Sourcegraph instance. +1. [Configure the browser extension](/integration/browser-extension) to use your Sourcegraph instance. 1. To allow the browser extension to work on your Bitbucket Server / Bitbucket Data Center instance: - Navigate to any page on Bitbucket Server / Bitbucket Data Center. - Right-click the Sourcegraph icon in the browser extension toolbar. diff --git a/docs/integration/github.mdx b/docs/integration/github.mdx index ba4fc0476..44469c0a6 100644 --- a/docs/integration/github.mdx +++ b/docs/integration/github.mdx @@ -26,7 +26,7 @@ Site admins can [configure Sourcegraph to allow users to sign in via GitHub](/ad The [Sourcegraph browser extension](/integration/browser-extension) supports GitHub. When installed in your web browser, it adds hover tooltips, go-to-definition, find-references, and code search to files and pull requests viewed on GitHub and GitHub Enterprise. 1. Install the [Sourcegraph browser extension](/integration/browser-extension). -1. [Configure the browser extension](/integration/browser-extension#configuring-the-sourcegraph-instance-to-use) to use your Sourcegraph instance. +1. [Configure the browser extension](/integration/browser-extension) to use your Sourcegraph instance. - You can also use [`https://sourcegraph.com`](https://sourcegraph.com) for public code only. diff --git a/docs/integration/gitlab.mdx b/docs/integration/gitlab.mdx index 89b60cc4a..0700e574a 100644 --- a/docs/integration/gitlab.mdx +++ b/docs/integration/gitlab.mdx @@ -33,7 +33,7 @@ GitLab instances can be configured to show Sourcegraph code navigation natively. The [Sourcegraph browser extension](/integration/browser-extension) supports GitLab. When installed in your web browser, it adds hover tooltips, go-to-definition, find-references, and code search to files and merge requests viewed on GitLab. 1. Install the [Sourcegraph browser extension](/integration/browser-extension). -1. [Configure the browser extension](/integration/browser-extension#configuring-the-sourcegraph-instance-to-use) to use your Sourcegraph instance. +1. [Configure the browser extension](/integration/browser-extension) to use your Sourcegraph instance. - You can also use [`https://sourcegraph.com`](https://sourcegraph.com) for public code from GitLab.com only. diff --git a/docs/integration/gitolite.mdx b/docs/integration/gitolite.mdx index 1ac9de9d3..d605e7adf 100644 --- a/docs/integration/gitolite.mdx +++ b/docs/integration/gitolite.mdx @@ -4,12 +4,12 @@ You can use Sourcegraph with [Gitolite](http://gitolite.com/). | Feature | Supported? | | ------------------------------------------------------------------- | ---------- | -| [Repository syncing](/admin/code-hosts/gitolite#repository-syncing) | ✅ | +| [Repository syncing](/admin/code-hosts/gitolite#configuration) | ✅ | | [Browser extension](#browser-extension) | ❌ | ## Repository syncing -Site admins can [sync Gitolite repositories to Sourcegraph](/admin/code-hosts/gitolite#repository-syncing). +Site admins can [sync Gitolite repositories to Sourcegraph](/admin/code-hosts/gitolite#configuration). ## Browser extension diff --git a/docs/integration/phabricator.mdx b/docs/integration/phabricator.mdx index 64331e99e..902eded58 100644 --- a/docs/integration/phabricator.mdx +++ b/docs/integration/phabricator.mdx @@ -6,8 +6,8 @@ This Phabricator integration does not support listing and mirroring Phabricator | Feature | Supported? | | ------------------------------------------------------------------------------------------------ | ---------- | -| [Repository syncing and mirroring](/admin/code-hosts/phabricator#repository-linking-and-syncing) | ❌ | -| [Repository association](/admin/code-hosts/phabricator#repository-linking-and-syncing) | ✅ | +| [Repository syncing and mirroring](/admin/code-hosts/phabricator#repository-association) | ❌ | +| [Repository association](/admin/code-hosts/phabricator#repository-association) | ✅ | | [Repository permission syncing](/admin/permissions/syncing) | ❌ | | [User authentication](/admin/auth/) | ❌ | | [Browser extension](#browser-extension) | ✅ | @@ -15,14 +15,14 @@ This Phabricator integration does not support listing and mirroring Phabricator ## Repository association -Site admins can [associate Phabricator repositories with Sourcegraph](/admin/code-hosts/phabricator#repository-syncing-and-linking). +Site admins can [associate Phabricator repositories with Sourcegraph](/admin/code-hosts/phabricator#repository-association). ## Browser extension The [Sourcegraph browser extension](/integration/browser-extension) supports Phabricator. When installed in your web browser, it adds hover tooltips, go-to-definition, find-references, and code search to files and diffs viewed on Phabricator. 1. Install the [Sourcegraph browser extension](/integration/browser-extension). -1. [Configure the browser extension](/integration/browser-extension#configuring-the-sourcegraph-instance-to-use) to use your Sourcegraph instance. +1. [Configure the browser extension](/integration/browser-extension) to use your Sourcegraph instance. 1. To allow the browser extension to work on your Phabricator instance: - Navigate to any page on Phabricator. - Right-click the Sourcegraph icon in the browser extension toolbar. diff --git a/docs/self-hosted/deploy/docker-compose/operations.mdx b/docs/self-hosted/deploy/docker-compose/operations.mdx index 7e48e0102..164680437 100644 --- a/docs/self-hosted/deploy/docker-compose/operations.mdx +++ b/docs/self-hosted/deploy/docker-compose/operations.mdx @@ -8,8 +8,8 @@ The Sourcegraph Docker Compose yaml file uses [Docker volumes](https://docs.dock Guides for managing cloud storage and backups are available in our cloud-specific installation guides: -- [Storage and backups for Amazon Web Services](/self-hosted/deploy/docker-compose/aws#storage-and-backups) -- [Storage and backups for Azure](/self-hosted/deploy/docker-compose/aws#storage-and-backups) +- [Storage and backups for Amazon Web Services](/self-hosted/deploy/docker-compose/aws) +- [Storage and backups for Azure](/self-hosted/deploy/docker-compose/azure#storage-and-backups) - [Storage and backups for Google Cloud](/self-hosted/deploy/docker-compose/google-cloud#storage-and-backups) - [Storage and backups for Digital Ocean](/self-hosted/deploy/docker-compose/digitalocean#storage-and-backups) @@ -97,7 +97,7 @@ docker exec codeinsights-db sh -c 'pg_dump -C --clean --if-exists --username pos ### Restore Sourcegraph databases into a new environment -The following instructions apply **only if you are restoring your databases into a new deployment** of Sourcegraph ie: a new virtual machine. If you are restoring a previously running environment, see the instructions for [restoring a previously running deployment](#restoring-sourcegraph-databases-into-an-existing-environment) +The following instructions apply **only if you are restoring your databases into a new deployment** of Sourcegraph ie: a new virtual machine. If you are restoring a previously running environment, see the instructions for [restoring a previously running deployment](#restore-sourcegraph-databases-into-an-existing-environment) 1\. Copy the database dump files into the `deploy-sourcegraph-docker/docker-compose` directory. diff --git a/docs/self-hosted/deploy/docker-compose/upgrade.mdx b/docs/self-hosted/deploy/docker-compose/upgrade.mdx index 86ac84245..10d6a795f 100644 --- a/docs/self-hosted/deploy/docker-compose/upgrade.mdx +++ b/docs/self-hosted/deploy/docker-compose/upgrade.mdx @@ -11,7 +11,7 @@ This document describes the process to update a Docker Compose Sourcegraph insta A [standard upgrade](/self-hosted/updates/#upgrade-types) occurs between a Sourcegraph version and the minor or major version released immediately after it. If you would like to jump forward several versions, you must perform a [multi-version upgrade](#multi-version-upgrades) instead. -If you've [configured Docker Compose with a release branch](/self-hosted/deploy/docker-compose/#step-1-prepare-the-deployment-repository), please merge the upstream release tag for the next minor version into your `release` branch. +If you've [configured Docker Compose with a release branch](/self-hosted/deploy/docker-compose#step-1-fork-the-deployment-repository), please merge the upstream release tag for the next minor version into your `release` branch. In the following example, the release branch is being upgraded to . diff --git a/docs/self-hosted/deploy/kubernetes/azure.mdx b/docs/self-hosted/deploy/kubernetes/azure.mdx index eeaefaa99..87fd38200 100644 --- a/docs/self-hosted/deploy/kubernetes/azure.mdx +++ b/docs/self-hosted/deploy/kubernetes/azure.mdx @@ -47,7 +47,7 @@ Connect to the cluster for future `kubectl` commands: az aks get-credentials --resource-group sourcegraphResourceGroup --name sourcegraphCluster ``` -Follow the [Sourcegraph cluster installation instructions](/self-hosted/deploy/kubernetes/configure#configure-a-storage-class) with `storageClass` set to `managed-premium` in `config.json`: +Follow the [Sourcegraph cluster installation instructions](/self-hosted/deploy/kubernetes/configure#storage-class) with `storageClass` set to `managed-premium` in `config.json`: ```diff - "storageClass": "default" diff --git a/docs/self-hosted/deploy/kubernetes/configure.mdx b/docs/self-hosted/deploy/kubernetes/configure.mdx index 40ddd61be..1566889f6 100644 --- a/docs/self-hosted/deploy/kubernetes/configure.mdx +++ b/docs/self-hosted/deploy/kubernetes/configure.mdx @@ -13,16 +13,16 @@ This guide will demonstrate how to customize a Kubernetes deployment (**non-Helm - + ## Overview -To ensure optimal performance and functionality of your Sourcegraph deployment, please only include components listed in the [kustomization.template.yaml file](/self-hosted/deploy/kubernetes/kustomize/#kustomization-yaml) for your instance overlay. These components include settings that have been specifically designed and tested for Sourcegraph and do not require any additional configuration changes. +To ensure optimal performance and functionality of your Sourcegraph deployment, please only include components listed in the [kustomization.template.yaml file](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) for your instance overlay. These components include settings that have been specifically designed and tested for Sourcegraph and do not require any additional configuration changes. -The order of components listed in the [kustomization.template.yaml file](/self-hosted/deploy/kubernetes/kustomize/#kustomization-yaml) is important and should be maintained. The components are listed in a specific order to ensure proper dependency management and compatibility between components. Reordering components can introduce conflicts or prevent components from interacting as expected. Only modify the component order if explicitly instructed to do so by the documentation. Otherwise, leave the component order as-is to avoid issues. +The order of components listed in the [kustomization.template.yaml file](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) is important and should be maintained. The components are listed in a specific order to ensure proper dependency management and compatibility between components. Reordering components can introduce conflicts or prevent components from interacting as expected. Only modify the component order if explicitly instructed to do so by the documentation. Otherwise, leave the component order as-is to avoid issues. Following these guidelines will help you create a seamless deployment and avoid conflicts. @@ -45,11 +45,11 @@ To enable cluster metrics monitoring, you will need to [deploy cAdvisor](#deploy ### RBAC -Sourcegraph has removed Role-Based Access Control (RBAC) resources from the default base cluster for the Kustomize deployment. This means that [service discovery](#service-discovery) is not enabled by default, and the endpoints for each service replica must be manually added to the frontend ConfigMap. When using the [size components](#instance-size-based-resources) included in the [kustomization file built for Sourcegraph](/self-hosted/deploy/kubernetes/kustomize/#kustomization-yaml), service endpoints are automatically added to the ConfigMap. +Sourcegraph has removed Role-Based Access Control (RBAC) resources from the default base cluster for the Kustomize deployment. This means that [service discovery](#service-discovery) is not enabled by default, and the endpoints for each service replica must be manually added to the frontend ConfigMap. When using the [size components](#instance-size-based-resources) included in the [kustomization file built for Sourcegraph](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files), service endpoints are automatically added to the ConfigMap. ### Non-Privileged -By default, all Sourcegraph services are deployed in a non-root and non-privileged mode, as defined in the [base](/self-hosted/deploy/kubernetes/kustomize/#base) cluster. +By default, all Sourcegraph services are deployed in a non-root and non-privileged mode, as defined in the [base](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/master/base) cluster. ### Privileged @@ -226,7 +226,7 @@ components: Follow these steps to configure the otel-collector to export traces to an external OTEL-compatible backend: 1. Create a subdirectory called 'patches' within the directory of your overlay -2. Copy and paste the [base/otel-collector/otel-collector.ConfigMap.yaml file](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s@master/-/tree/base/otel-collector/otel-collector.ConfigMap.yaml) to the new [patches subdirectory](/self-hosted/deploy/kubernetes/kustomize/#patches-directory) +2. Copy and paste the [base/otel-collector/otel-collector.ConfigMap.yaml file](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s@master/-/tree/base/otel-collector/otel-collector.ConfigMap.yaml) to the new [patches subdirectory](/self-hosted/deploy/kubernetes/kustomize) 3. In the copied file, make the necessary changes to the `exporters` and `service` blocks to connect to your backend based on the documentation linked above 4. Include the following content in your overlay: @@ -550,7 +550,7 @@ components: - ../../components/storage-class/name-update ``` -**Step 2**: Enter the value of your existing storage class name in your [buildConfig.yaml file](/self-hosted/deploy/kubernetes/kustomize#buildconfig-yaml) using the `STORAGECLASS_NAME` config key +**Step 2**: Enter the value of your existing storage class name in your [buildConfig.yaml file](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) using the `STORAGECLASS_NAME` config key Example, add `STORAGECLASS_NAME=sourcegraph` if `sourcegraph` is the name for the existing storage class: @@ -577,7 +577,7 @@ components: - ../../components/storage-class/name-update ``` -**Step 2**: Enter the value of your existing storage class name in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file using the `STORAGECLASS_NAME` config key +**Step 2**: Enter the value of your existing storage class name in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file using the `STORAGECLASS_NAME` config key Example, set `STORAGECLASS_NAME=sourcegraph` if `sourcegraph` is the name for the existing storage class: @@ -601,7 +601,7 @@ components: - ../../components/storage-class/cloud ``` -Update the following variables in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file. Replace them with the correct values according to the instructions provided by your cloud provider: +Update the following variables in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file. Replace them with the correct values according to the instructions provided by your cloud provider: ```yaml # instances/$INSTANCE_NAME/buildConfig.yaml @@ -693,7 +693,7 @@ data: # the data is abbreviated in this example ``` -**Step 3**: Configure the TLS settings of your Ingress by adding the following variables to your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file: +**Step 3**: Configure the TLS settings of your Ingress by adding the following variables to your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file: - **TLS_HOST**: your domain name - **TLS_INGRESS_CLASS_NAME**: ingress class name required by your cluster-issuer @@ -783,7 +783,7 @@ components: To configure the hostname for your Sourcegraph ingress, follow these steps: -**Step 1**: In your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file, include the `HOST_DOMAIN` variable and set it to your desired hostname, for example: +**Step 1**: In your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file, include the `HOST_DOMAIN` variable and set it to your desired hostname, for example: ```yaml # instances/$INSTANCE_NAME/buildConfig.yaml @@ -836,7 +836,7 @@ To configure ingress-nginx annotations for the Sourcegraph frontend ingress: $ mkdir -p instances/$INSTANCE_NAME/patches ``` -**Step 2**: Copy the `frontend-ingress-annotations.yaml` patch file from the components/patches directory to the new [patches subdirectory](/self-hosted/deploy/kubernetes/kustomize/#patches-directory) +**Step 2**: Copy the `frontend-ingress-annotations.yaml` patch file from the components/patches directory to the new [patches subdirectory](/self-hosted/deploy/kubernetes/kustomize) ```bash $ cp components/patches/frontend-ingress-annotations.yaml instances/$INSTANCE_NAME/patches/frontend-ingress-annotations.yaml @@ -955,7 +955,7 @@ components: ### Frontend -To update the environment variables for the **sourcegraph-frontend** service, add the new environment variables to the end of the _FRONTEND ENV VARS_ section at the bottom of your [kustomization file](/self-hosted/deploy/kubernetes/kustomize/#kustomizationyaml). For example: +To update the environment variables for the **sourcegraph-frontend** service, add the new environment variables to the end of the _FRONTEND ENV VARS_ section at the bottom of your [kustomization file](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files). For example: ```yaml # instances/$INSTANCE_NAME/kustomization.yaml @@ -1065,7 +1065,7 @@ Similar changes will be required for other pods and services, depending on the s For optimal performance and resilience, it is recommended to use an external database when deploying Sourcegraph. For more information on database requirements, please refer to the [Postgres guide](/self-hosted/postgres). -To connect Sourcegraph to an existing PostgreSQL instance, add the relevant environment variables ([such as PGHOST, PGPORT, PGUSER, etc.](http://www.postgresql.org/docs/current/static/libpq-envars.html)) to the frontend ConfigMap by adding the new environment variables to the end of the _FRONTEND ENV VARS_ section at the bottom of your [kustomization file](/self-hosted/deploy/kubernetes/kustomize/#kustomizationyaml). For example: +To connect Sourcegraph to an existing PostgreSQL instance, add the relevant environment variables ([such as PGHOST, PGPORT, PGUSER, etc.](http://www.postgresql.org/docs/current/static/libpq-envars.html)) to the frontend ConfigMap by adding the new environment variables to the end of the _FRONTEND ENV VARS_ section at the bottom of your [kustomization file](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files). For example: ```yaml # instances/$INSTANCE_NAME/kustomization.yaml @@ -1156,7 +1156,7 @@ components: **Step 4:** Update code host configuration -Update your [code host configuration file](/admin/code-hosts/#full-code-host-docs) to enable ssh cloning. For example, set [gitURLType](/admin/code-hosts/github#gitURLType) to `ssh` for [GitHub](/admin/code-hosts/github). See the [external service docs](/admin/code-hosts/) for the correct setting for your code host. +Update your [code host configuration file](/admin/code-hosts) to enable ssh cloning. For example, set [gitURLType](/admin/code-hosts/github#configuration) to `ssh` for [GitHub](/admin/code-hosts/github). See the [external service docs](/admin/code-hosts/) for the correct setting for your code host. --- @@ -1194,7 +1194,7 @@ cAdvisor can pick up metrics for services unrelated to the Sourcegraph deploymen $ mkdir instances/$INSTANCE_NAME/patches ``` -2\. Create a copy of the `prometheus.ConfigMap.yaml` file in the new [patches subdirectory](/self-hosted/deploy/kubernetes/kustomize/#patches-directory) +2\. Create a copy of the `prometheus.ConfigMap.yaml` file in the new [patches subdirectory](/self-hosted/deploy/kubernetes/kustomize) ```bash mv base/monitoring/prometheus/rbacs/prometheus.ConfigMap.yaml instances/$INSTANCE_NAME/patches/prometheus.ConfigMap.yaml @@ -1235,7 +1235,7 @@ components: - ../../components/enable/private-registry ``` -**Step 2:** Set the `PRIVATE_REGISTRY` variable in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file. For example: +**Step 2:** Set the `PRIVATE_REGISTRY` variable in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file. For example: ```yaml # instances/$INSTANCE_NAME/buildConfig.yaml @@ -1255,7 +1255,7 @@ components: - ../../components/resources/imagepullsecrets ``` -**Step 2:** Set the `IMAGE_PULL_SECRET_NAME` variable in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file. +**Step 2:** Set the `IMAGE_PULL_SECRET_NAME` variable in your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file. For example: @@ -1285,7 +1285,7 @@ patches: ## Multi-version upgrade -In order to perform a [multi-version upgrade](/self-hosted/updates/#multi-version-upgrades), all pods must be scaled down to 0 except databases, which can be handled by including the `utils/multi-version-upgrade` component: +In order to perform a [multi-version upgrade](/self-hosted/updates#upgrade-types), all pods must be scaled down to 0 except databases, which can be handled by including the `utils/multi-version-upgrade` component: ```yaml # instances/$INSTANCE_NAME/kustomization.yaml diff --git a/docs/self-hosted/deploy/kubernetes/kustomize.mdx b/docs/self-hosted/deploy/kubernetes/kustomize.mdx index cfa8f9457..e26513029 100644 --- a/docs/self-hosted/deploy/kubernetes/kustomize.mdx +++ b/docs/self-hosted/deploy/kubernetes/kustomize.mdx @@ -53,7 +53,7 @@ See the [docs on reference repository](/self-hosted/deploy/repositories) for det ### **Step 2**: Set up a directory for your instance -Create a copy of the [instances/template](/self-hosted/deploy/kubernetes/kustomize/#template) directory and rename it to `instances/my-sourcegraph`: +Create a copy of the [instances/template](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/master/instances/template) directory and rename it to `instances/my-sourcegraph`: ```bash $ cp -R instances/template instances/my-sourcegraph @@ -66,7 +66,7 @@ Create a copy of the [instances/template](/self-hosted/deploy/kubernetes/kustomi ### **Step 3**: Set up the configuration files -**1.** Rename the [kustomization.template.yaml](/self-hosted/deploy/kubernetes/kustomize/#kustomization-yaml) file in `instances/my-sourcegraph` to `kustomization.yaml`. +**1.** Rename the [kustomization.template.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file in `instances/my-sourcegraph` to `kustomization.yaml`. - The `kustomization.yaml` file is used to configure your Sourcegraph instance. @@ -74,7 +74,7 @@ Create a copy of the [instances/template](/self-hosted/deploy/kubernetes/kustomi $ mv instances/my-sourcegraph/kustomization.template.yaml instances/my-sourcegraph/kustomization.yaml ``` -**2.** Rename the [buildConfig.template.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file in `instances/my-sourcegraph` to `buildConfig.yaml`. +**2.** Rename the [buildConfig.template.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file in `instances/my-sourcegraph` to `buildConfig.yaml`. - The `buildConfig.yaml` file is used to configure components included in your `kustomization` file if required. diff --git a/docs/self-hosted/deploy/kubernetes/kustomize/eks.mdx b/docs/self-hosted/deploy/kubernetes/kustomize/eks.mdx index fe5e420e5..fc95b3815 100644 --- a/docs/self-hosted/deploy/kubernetes/kustomize/eks.mdx +++ b/docs/self-hosted/deploy/kubernetes/kustomize/eks.mdx @@ -126,7 +126,7 @@ components: - ../../components/clusters/aws/managed-cert ``` -Step 2: Set the `AWS_MANAGED_CERT_ARN` variable with the `ARN of your AWS-managed TLS certificate` under the [BUILD CONFIGURATIONS](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) section: +Step 2: Set the `AWS_MANAGED_CERT_ARN` variable with the `ARN of your AWS-managed TLS certificate` under the [BUILD CONFIGURATIONS](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) section: ```yaml # instances/$INSTANCE_NAME/buildConfig.yaml diff --git a/docs/self-hosted/deploy/kubernetes/kustomize/gke.mdx b/docs/self-hosted/deploy/kubernetes/kustomize/gke.mdx index eaf201792..a65b40880 100644 --- a/docs/self-hosted/deploy/kubernetes/kustomize/gke.mdx +++ b/docs/self-hosted/deploy/kubernetes/kustomize/gke.mdx @@ -129,7 +129,7 @@ components: - ../../components/clusters/gke/managed-cert ``` -Step 2: Set the `GKE_MANAGED_CERT_NAME` variable with your Google-managed certificate name under the [BUILD CONFIGURATIONS](/self-hosted/deploy/kubernetes/kustomize#buildconfig-yaml) section: +Step 2: Set the `GKE_MANAGED_CERT_NAME` variable with your Google-managed certificate name under the [BUILD CONFIGURATIONS](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) section: ```yaml # instances/$INSTANCE_NAME/buildConfig.yaml diff --git a/docs/self-hosted/deploy/kubernetes/kustomize/index.mdx b/docs/self-hosted/deploy/kubernetes/kustomize/index.mdx index 455435ace..2b53f9455 100644 --- a/docs/self-hosted/deploy/kubernetes/kustomize/index.mdx +++ b/docs/self-hosted/deploy/kubernetes/kustomize/index.mdx @@ -9,7 +9,7 @@ An introduction to Kustomize created for Sourcegraph. - + @@ -99,7 +99,7 @@ In this section, we will take a quick look at the essential part that make up a ### Template -An overlay is a directory that contains various files used to configure a deployment for a specific scenario. These files include the [kustomization.yaml file](#kustomization-yaml), which is used to specify how the resources defined in the base manifests should be customized and configured, as well as other files such as environment variable files, configuration files, and patches. +An overlay is a directory that contains various files used to configure a deployment for a specific scenario. These files include the [kustomization.yaml file](#kustomizationyaml), which is used to specify how the resources defined in the base manifests should be customized and configured, as well as other files such as environment variable files, configuration files, and patches. File structure: @@ -116,23 +116,23 @@ File structure: └── kustomization.template.yaml ``` -All custom overlays built for a specific instance should be stored in the [instances directory](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/master/instances), where you can find the [instances/template folder](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/master/instances/template). This folder contains a [kustomization.template.yaml file](#kustomization-yaml) that is preconfigured to construct an overlay for deploying Sourcegraph, and a [buildConfig.template.yaml](#buildconfig-yaml). +All custom overlays built for a specific instance should be stored in the [instances directory](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/master/instances), where you can find the [instances/template folder](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/master/instances/template). This folder contains a [kustomization.template.yaml file](#kustomizationyaml) that is preconfigured to construct an overlay for deploying Sourcegraph, and a [buildConfig.template.yaml](#buildconfigyaml). ### kustomization.yaml -The [kustomization.yaml file](#kustomization-yaml) is a fundamental element of a Kustomize overlay. It is situated in the root directory of the overlay and serves as a means of customizing and configuring the resources defined in the base manifests, as outlined in our [configuration documentation](/self-hosted/deploy/kubernetes/configure). +The [kustomization.yaml file](#kustomizationyaml) is a fundamental element of a Kustomize overlay. It is situated in the root directory of the overlay and serves as a means of customizing and configuring the resources defined in the base manifests, as outlined in our [configuration documentation](/self-hosted/deploy/kubernetes/configure). -To correctly configure your Sourcegraph deployment, it is crucial to create an overlay using the `kustomization.template.yaml` file provided. This [kustomization.yaml file](#kustomization-yaml) is specifically designed for Sourcegraph deployments, making the configuration process more manageable. The file includes various options and sections, allowing for the creation of a Sourcegraph instance that is tailored to the specific environment. +To correctly configure your Sourcegraph deployment, it is crucial to create an overlay using the `kustomization.template.yaml` file provided. This [kustomization.yaml file](#kustomizationyaml) is specifically designed for Sourcegraph deployments, making the configuration process more manageable. The file includes various options and sections, allowing for the creation of a Sourcegraph instance that is tailored to the specific environment. #### components-list -The order of components in the [kustomization.template.yaml file](#kustomization-yaml) is important and should be maintained. The components are listed in a specific order to ensure proper dependency management and compatibility between components. Reordering components can introduce conflicts or prevent components from interacting as expected. Only modify the component order if explicitly instructed to do so by the documentation. Otherwise, leave the component order as-is to avoid issues. +The order of components in the [kustomization.template.yaml file](#kustomizationyaml) is important and should be maintained. The components are listed in a specific order to ensure proper dependency management and compatibility between components. Reordering components can introduce conflicts or prevent components from interacting as expected. Only modify the component order if explicitly instructed to do so by the documentation. Otherwise, leave the component order as-is to avoid issues. ### buildConfig.yaml Some Kustomize components may require additional configuration. These inputs typically specify environment/use-case-specific settings. For example, the name of your private registry to update images. Only update the values inside the `buildConfig.yaml` file if a component's documentation explicitly instructs you to do so. Not all components need extra configuration, and some have suitable defaults. -Modifying `buildConfig.yaml` unnecessarily can cause errors or unintended behavior. Always check the [configuration docs](/self-hosted/deploy/kubernetes/configure) or comments in [kustomization.yaml](#kustomization-yaml) before changing this file. +Modifying `buildConfig.yaml` unnecessarily can cause errors or unintended behavior. Always check the [configuration docs](/self-hosted/deploy/kubernetes/configure) or comments in [kustomization.yaml](#kustomizationyaml) before changing this file. ### patches directory @@ -174,7 +174,7 @@ Follow the steps listed below to set up the configuration files for your instanc #### kustomization.yaml -Rename the [kustomization.template.yaml](#kustomization-yaml) file in `instances/$INSTANCE_NAME` to `kustomization.yaml`: +Rename the [kustomization.template.yaml](#kustomizationyaml) file in `instances/$INSTANCE_NAME` to `kustomization.yaml`: ```bash $ mv instances/template/kustomization.template.yaml instances/$INSTANCE_NAME/kustomization.yaml @@ -182,17 +182,17 @@ Rename the [kustomization.template.yaml](#kustomization-yaml) file in `instances #### buildConfig.yaml -Rename the [buildConfig.template.yaml](#buildconfig-yaml) file in `instances/$INSTANCE_NAME` to `buildConfig.yaml`: +Rename the [buildConfig.template.yaml](#buildconfigyaml) file in `instances/$INSTANCE_NAME` to `buildConfig.yaml`: ```bash $ mv instances/template/buildConfig.template.yaml instances/$INSTANCE_NAME/buildConfig.yaml ``` -**Step 3**: You can begin customizing your Sourcegraph deployment by updating the [kustomization.yaml file](#kustomization-yaml) inside your overlay, following our [configuration guides](/self-hosted/deploy/kubernetes/configure) for guidance. +**Step 3**: You can begin customizing your Sourcegraph deployment by updating the [kustomization.yaml file](#kustomizationyaml) inside your overlay, following our [configuration guides](/self-hosted/deploy/kubernetes/configure) for guidance. ## Components -An overlay in Kustomize is a set of configuration files that are used to customize the base resources. To understand an overlay, it's important to examine its components, which are listed under the components field inside the [kustomization.yaml file](#kustomization-yaml) of the overlay. +An overlay in Kustomize is a set of configuration files that are used to customize the base resources. To understand an overlay, it's important to examine its components, which are listed under the components field inside the [kustomization.yaml file](#kustomizationyaml) of the overlay. Most of our components are designed to be reusable for different environments and use cases. They can be used to add common labels and annotations, apply common configurations, or even generate resources. By using these components, you can minimize the amount of duplicated code in your overlays and make them more maintainable. diff --git a/docs/self-hosted/deploy/kubernetes/kustomize/migrate.mdx b/docs/self-hosted/deploy/kubernetes/kustomize/migrate.mdx index 8991c6088..ad690d875 100644 --- a/docs/self-hosted/deploy/kubernetes/kustomize/migrate.mdx +++ b/docs/self-hosted/deploy/kubernetes/kustomize/migrate.mdx @@ -61,7 +61,7 @@ Set up a release branch from the latest version branch in your local fork of the ## Step 3: Set up a directory for your instance -Create a copy of the [instances/template](/self-hosted/deploy/kubernetes/kustomize/#template) directory and rename it to `instances/my-sourcegraph`: +Create a copy of the [instances/template](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/master/instances/template) directory and rename it to `instances/my-sourcegraph`: ```bash $ cp -R instances/template instances/my-sourcegraph @@ -75,7 +75,7 @@ Create a copy of the [instances/template](/self-hosted/deploy/kubernetes/kustomi The `kustomization.yaml` file is used to configure your Sourcegraph instance. -**1.** Rename the [kustomization.template.yaml](/self-hosted/deploy/kubernetes/kustomize/#kustomization-yaml) file in `instances/my-sourcegraph` to `kustomization.yaml`. +**1.** Rename the [kustomization.template.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file in `instances/my-sourcegraph` to `kustomization.yaml`. - The `kustomization.yaml` file is used to configure your Sourcegraph instance. @@ -85,7 +85,7 @@ The `kustomization.yaml` file is used to configure your Sourcegraph instance. #### buildConfig.yaml -**2.** Rename the [buildConfig.template.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file in `instances/my-sourcegraph` to `buildConfig.yaml`. +**2.** Rename the [buildConfig.template.yaml](/self-hosted/deploy/kubernetes/kustomize#step-3-set-up-the-configuration-files) file in `instances/my-sourcegraph` to `buildConfig.yaml`. - The `buildConfig.yaml` file is used to configure components included in your `kustomization` file when required. @@ -218,7 +218,7 @@ If your instance was deployed using the non-privileged overlay, you can follow t **2.** Review the changes to ensure that the manifests generated by your new overlay are similar to the ones currently being used by your active cluster. -[Compare the manifests](/self-hosted/deploy/kubernetes/kustomize/#between-an-overlay-and-a-running-cluster) generated by your new overlay with the ones in your running cluster using the command below: +[Compare the manifests](/self-hosted/deploy/kubernetes/operations#between-an-overlay-and-a-running-cluster) generated by your new overlay with the ones in your running cluster using the command below: ```bash $ kubectl diff -l deploy=sourcegraph -f cluster.yaml diff --git a/docs/self-hosted/deploy/kubernetes/operations.mdx b/docs/self-hosted/deploy/kubernetes/operations.mdx index cd1842eab..7952fb6ab 100644 --- a/docs/self-hosted/deploy/kubernetes/operations.mdx +++ b/docs/self-hosted/deploy/kubernetes/operations.mdx @@ -11,13 +11,13 @@ Operations guides specific to managing [Sourcegraph on Kubernetes](/self-hosted/ - + ## Featured guides -Trying to deploy Sourcegraph on Kubernetes? Refer to our [installation guide](/self-hosted/deploy/kubernetes/#installation). +Trying to deploy Sourcegraph on Kubernetes? Refer to our [installation guide](/self-hosted/deploy/kubernetes#quickstart). ## Configure diff --git a/docs/self-hosted/deploy/kubernetes/troubleshoot.mdx b/docs/self-hosted/deploy/kubernetes/troubleshoot.mdx index 5b9a5a198..c648b93e5 100644 --- a/docs/self-hosted/deploy/kubernetes/troubleshoot.mdx +++ b/docs/self-hosted/deploy/kubernetes/troubleshoot.mdx @@ -34,7 +34,7 @@ Run `kubectl version` to verify the **Client Version** matches the **Server Vers Run `kubectl get ingresses -A` to check if there is more than one ingress for `sourcegraph-frontend`. You can delete the duplicate with `kubectl delete ingress sourcegraph-frontend --namespace $YOUR_NAMESPACE` -> NOTE: See our ["configuration guide"](/self-hosted/deploy/kubernetes/configure#security-configure-network-access) for more information on network access. +> NOTE: See our ["configuration guide"](/self-hosted/deploy/kubernetes/configure#network-access) for more information on network access. #### Error: error when creating "base/cadvisor/cadvisor.ClusterRoleBinding.yaml": subjects[0].namespace: Required value @@ -155,7 +155,7 @@ SEARCHER_URL=http:searcher:3184 The issue described is related to the Code Intel hover feature, where it may get stuck in a loading state or return a 502 error with the message `Squirrel.LocalCodeIntel http status 502`. This is caused by the same issue described in [Symbols sidebar -and hovers are not working](#symbols-sidebar-and-hovers-are-not-working"). See that +and hovers are not working](#symbols-sidebar-and-hovers-are-not-working). See that section for solution. ## Help request diff --git a/docs/self-hosted/deploy/machine-images/aws-ami.mdx b/docs/self-hosted/deploy/machine-images/aws-ami.mdx index ad94fdf70..157e0a690 100644 --- a/docs/self-hosted/deploy/machine-images/aws-ami.mdx +++ b/docs/self-hosted/deploy/machine-images/aws-ami.mdx @@ -187,7 +187,7 @@ Now that your instance is confirmed to be working, and you have HTTPS working th Please take time to review the following before proceeding with the upgrades: - [Technical changelog](https://sourcegraph.com/changelog/releases) -- [Update policy](/self-hosted/updates#update-policy) +- [Update policy](/self-hosted/updates#release-schedule-and-versioning) - [Update notes](https://sourcegraph.com/changelog/self-hosted/kubernetes) Back up your volumes before each upgrade! diff --git a/docs/self-hosted/deploy/machine-images/aws-oneclick.mdx b/docs/self-hosted/deploy/machine-images/aws-oneclick.mdx index 80075727d..46e2bc3be 100644 --- a/docs/self-hosted/deploy/machine-images/aws-oneclick.mdx +++ b/docs/self-hosted/deploy/machine-images/aws-oneclick.mdx @@ -10,7 +10,7 @@ Prefer manually installing on AWS yourself? See our [AMI](/self-hosted/deploy/ma ## Prerequisites -- An AWS account (most regions are supported, see our [Launcher](#deploy-sourcegraph) below for a complete list) +- An AWS account (most regions are supported, see our [Launcher](#deploy-sourcegraph-) below for a complete list) - General familiarity with AWS - An [EC2 keypair](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html) for SSH access - (optional) A Sourcegraph license to unlock features ([view plans](https://sourcegraph.com/pricing) or [learn how licenses work](/admin/licensing/)) diff --git a/docs/self-hosted/deploy/machine-images/gce.mdx b/docs/self-hosted/deploy/machine-images/gce.mdx index 8ffc83447..64dee9798 100644 --- a/docs/self-hosted/deploy/machine-images/gce.mdx +++ b/docs/self-hosted/deploy/machine-images/gce.mdx @@ -165,7 +165,7 @@ As a result, setting up a static IP for your Sourcegraph instance is strongly re Please take time to review the following before proceeding with the upgrades: - [Technical changelog](https://sourcegraph.com/changelog/releases) -- [Update policy](/self-hosted/updates#update-policy) +- [Update policy](/self-hosted/updates#release-schedule-and-versioning) - [Update notes](https://sourcegraph.com/changelog/self-hosted/kubernetes) - [Multi-version upgrade procedure](https://sourcegraph.com/changelog/self-hosted/kubernetes) diff --git a/docs/self-hosted/deploy/repositories.mdx b/docs/self-hosted/deploy/repositories.mdx index d27bef914..b43cb9816 100644 --- a/docs/self-hosted/deploy/repositories.mdx +++ b/docs/self-hosted/deploy/repositories.mdx @@ -49,7 +49,7 @@ git clone https://github.com/SG_DEPLOY_GITHUB_USERNAME/$SG_PRIVATE_DEPLOY_REPO_N ### Step 4: Create a release branch -Create a `release` branch to track all of your customizations to Sourcegraph. This branch will be used to [upgrade Sourcegraph](/self-hosted/updates) and [install your Sourcegraph instance](/self-hosted/deploy/#installation). +Create a `release` branch to track all of your customizations to Sourcegraph. This branch will be used to [upgrade Sourcegraph](/self-hosted/updates) and [install your Sourcegraph instance](/self-hosted/deploy). ```bash cd $SG_PRIVATE_DEPLOY_REPO_NAME @@ -75,4 +75,4 @@ git checkout $YOUR_RELEASE_BRANCH git merge {CURRENT_VERSION} ``` -A [standard upgrade](/self-hosted/updates#standard-upgrades) occurs between two minor versions of Sourcegraph. If you are looking to jump forward several versions, you must perform a [multi-version upgrade](/self-hosted/updates#multi-version-upgrades) instead. +A [standard upgrade](/self-hosted/updates#upgrade-types) occurs between two minor versions of Sourcegraph. If you are looking to jump forward several versions, you must perform a [multi-version upgrade](/self-hosted/updates#upgrade-types) instead. diff --git a/docs/self-hosted/deploy/single-node/script.mdx b/docs/self-hosted/deploy/single-node/script.mdx index 5a79a16be..bdc3d9950 100644 --- a/docs/self-hosted/deploy/single-node/script.mdx +++ b/docs/self-hosted/deploy/single-node/script.mdx @@ -83,7 +83,7 @@ We recommend deploying your own reverse proxy to terminate TLS connections with ## Upgrade - [Technical changelog](https://sourcegraph.com/changelog/releases) -- [Update policy](/self-hosted/updates#update-policy) +- [Update policy](/self-hosted/updates#release-schedule-and-versioning) - [Update notes](https://sourcegraph.com/changelog/self-hosted/kubernetes) - [Multi-version upgrade procedure](https://sourcegraph.com/changelog/self-hosted/kubernetes) diff --git a/docs/self-hosted/deployment-best-practices.mdx b/docs/self-hosted/deployment-best-practices.mdx index d978adfb0..4a52e76c3 100644 --- a/docs/self-hosted/deployment-best-practices.mdx +++ b/docs/self-hosted/deployment-best-practices.mdx @@ -32,8 +32,8 @@ _Unless scale, resiliency, or some other legitimate need exists that necessitate ### Docker Compose -- Be sure your deployment meets our [Docker Compose requirements](/self-hosted/deploy/docker-compose/#requirements). -- Review the [configuration section](/self-hosted/deploy/docker-compose/#configuration) of our [Docker Compose deployment docs](/self-hosted/deploy/docker-compose/). +- Be sure your deployment meets our [Docker Compose requirements](/self-hosted/deploy/docker-compose#prerequisites). +- Review the [configuration section](/self-hosted/deploy/docker-compose/configuration) of our [Docker Compose deployment docs](/self-hosted/deploy/docker-compose/). ### Sourcegraph Server (single Docker container) diff --git a/docs/self-hosted/email.mdx b/docs/self-hosted/email.mdx index f8b28259f..b58744281 100644 --- a/docs/self-hosted/email.mdx +++ b/docs/self-hosted/email.mdx @@ -5,7 +5,7 @@ Sourcegraph uses an SMTP server of your choosing to send emails for: - [Code Monitoring](/code-monitoring/) notifications - Inviting other users to a Sourcegraph instance, or to an organization/team on a Sourcegraph instance - Important updates to a user accounts (for example, creation of API keys) -- For [`builtin` authentication](/admin/auth/#builtin-password-authentication), password resets and email verification +- For [`builtin` authentication](/admin/auth/builtin), password resets and email verification Sourcegraph Cloud customers can take advantage of managed SMTP servers - @@ -19,14 +19,14 @@ This helps prevent Sourcegraph from sending product emails to invalid or inactiv Users that create accounts through an external [authentication provider](/admin/auth/), such as GitHub or SAML, will automatically have verified email addresses from the external provider. -When SMTP is configured, users that sign up through [`builtin` authentication](/admin/auth/#builtin-password-authentication) will have the emails they sign up with marked as unverified. +When SMTP is configured, users that sign up through [`builtin` authentication](/admin/auth/builtin) will have the emails they sign up with marked as unverified. To verify their email address, the user can do one of the following: - Click the "set password" link they receive in their email - In the "Emails" tab of their account, click "Send verification email" - Ask a site admin to verify their email manually through the "Emails" tab of their account, or through the `setUserEmailVerified` GraphQL mutation -Users with emails [created by the site admin](/admin/auth/#creating-builtin-authentication-users) through the `/site-admin/users/new` UI will have the same behaviour as the above. Users created directly through GraphQL or the `src` CLI assume that the email provided is verified. +Users with emails [created by the site admin](/admin/auth/builtin#creating-builtin-authentication-users) through the `/site-admin/users/new` UI will have the same behaviour as the above. Users created directly through GraphQL or the `src` CLI assume that the email provided is verified. For SSO (Single Sign-On) enabled instances, it is important to remove the diff --git a/docs/self-hosted/external-services/index.mdx b/docs/self-hosted/external-services/index.mdx index 180141684..0120e5b6a 100644 --- a/docs/self-hosted/external-services/index.mdx +++ b/docs/self-hosted/external-services/index.mdx @@ -21,7 +21,7 @@ See the following guides to use an external or managed version of each service t - See [Using your own PostgreSQL server](/self-hosted/external-services/postgres) to replace the bundled PostgreSQL instances. - See [Using your own Redis server](/self-hosted/external-services/redis) to replace the bundled Redis instances. - See [Using a managed object storage service (S3 or GCS)](/self-hosted/external-services/object-storage) to replace the bundled blobstore instance. -- See [Using an external Jaeger instance](/self-hosted/observability/tracing#Use-an-external-Jaeger-instance) to replace the bundled Jaeger instance. +- See [Using an external Jaeger instance](/self-hosted/observability/tracing#jaeger) to replace the bundled Jaeger instance. > NOTE: Using Sourcegraph with an external service is a [paid feature](https://about.sourcegraph.com/pricing). [Contact us](https://about.sourcegraph.com/contact/sales) to get a trial license. diff --git a/docs/self-hosted/faq.mdx b/docs/self-hosted/faq.mdx index cf08c73b9..23f465286 100644 --- a/docs/self-hosted/faq.mdx +++ b/docs/self-hosted/faq.mdx @@ -45,7 +45,7 @@ Please refer to [Understanding alerts](/self-hosted/observability/alerting#under ### How do I know when more resources are needed for a specified service? -All resource dashboards contain a section called `Provisioning indicators` that provide information about the current resource usage of containers. These can be used to determine if a scale-up is needed ([example panel](/self-hosted/observability/dashboards#frontend-provisioning-container-cpu-usage-long-term)). +All resource dashboards contain a section called `Provisioning indicators` that provide information about the current resource usage of containers. These can be used to determine if a scale-up is needed ([example panel](/self-hosted/observability/dashboards#frontend-provisioning_container_cpu_usage_long_term)). More information on each available panel in the dashboards is available in the [Dashboards reference](/self-hosted/observability/dashboards). @@ -55,7 +55,7 @@ See [Alert solutions](/self-hosted/observability/alerts) to learn about each ale ### What’s the threshold for each resource? -All resources dashboards contain a section called `Container monitoring` that indicate thresholds at which alerts will fire for each resource ([example alert](/self-hosted/observability/alerts#frontend-container-cpu-usage)). +All resources dashboards contain a section called `Container monitoring` that indicate thresholds at which alerts will fire for each resource ([example alert](/self-hosted/observability/alerts#frontend-container_cpu_usage)). More information on each available panel in the dashboards is available in the [Dashboards reference](/self-hosted/observability/dashboards). @@ -75,7 +75,7 @@ Please refer to our guide on [setting up alerting](/self-hosted/observability/al Creating a custom alert is not recommended and currently not supported by Sourcegraph. However, please provide feedback on the monitoring dashboards and alerts if you find anything could be improved via our issue tracker. -More advanced users can also refer to [our FAQ item about custom consumption of Sourcegraph metrics](#can-i-consume-sourcegraph-s-metrics-in-my-own-monitoring-system-datadog-new-relic-etc). +More advanced users can also refer to [our FAQ item about custom consumption of Sourcegraph metrics](#can-i-consume-sourcegraphs-metrics-in-my-own-monitoring-system-datadog-new-relic-etc). ### Can I consume Sourcegraph's metrics in my own monitoring system (Datadog, New Relic, etc.)? diff --git a/docs/self-hosted/how-to/dirty-database.mdx b/docs/self-hosted/how-to/dirty-database.mdx index c71f02939..400ca6abe 100644 --- a/docs/self-hosted/how-to/dirty-database.mdx +++ b/docs/self-hosted/how-to/dirty-database.mdx @@ -25,7 +25,7 @@ The target schema is marked as dirty and no other migration operation is seen ru - This document assumes that you are installing Sourcegraph or were attempting an upgrade when an error occurred. - **NOTE: If you encountered this error during an upgrade, ensure you followed the [proper step upgrade process documented here.](/self-hosted/updates) If you skipped a minor version during an upgrade, you will need to revert back to the last minor version your instance was on before following the steps in this document.** -The following procedure requires that you are able to execute commands from inside the database container. Learn more about shelling into [kubernetes](/self-hosted/deploy/kubernetes/operations#access-the-database) and [docker-compose](/self-hosted/deploy/docker-compose/#access-the-database) instances at these links. +The following procedure requires that you are able to execute commands from inside the database container. Learn more about shelling into [kubernetes](/self-hosted/deploy/kubernetes/operations#access-the-database) and [docker-compose](/self-hosted/deploy/docker-compose/operations#access-the-database) instances at these links. ## Steps to resolve @@ -107,7 +107,7 @@ If you're running into errors such as being unable to create a unique index due ### 3. Add a migration log entry -**Ensure the migration applied, then signal that the migration has been run**. Run the `migrator` instance against your database to create an explicit migration log. For the following, consult the [Kubernetes](/self-hosted/updates/migrator/migrator-operations#kubernetes), [Docker-compose](/self-hosted/updates/migrator/migrator-operations#docker--docker-compose), or [local development](/self-hosted/updates/migrator/migrator-operations#local-development) instructions on how to manually run database operations. The specific migrator command to run is: +**Ensure the migration applied, then signal that the migration has been run**. Run the `migrator` instance against your database to create an explicit migration log. For the following, consult the [Kubernetes](/self-hosted/updates/migrator/migrator-operations#kubernetes-helm), [Docker-compose](/self-hosted/updates/migrator/migrator-operations#docker-compose), or [local development](/self-hosted/updates/migrator/migrator-operations#local-development) instructions on how to manually run database operations. The specific migrator command to run is: - For Kubernetes: replace container args with `["add-log", "-db=", "-version="]` - For Docker-compose: replace container args with `"add-log" "-db=" "-version="` diff --git a/docs/self-hosted/how-to/index.mdx b/docs/self-hosted/how-to/index.mdx index a9b6256e0..b115b5f00 100644 --- a/docs/self-hosted/how-to/index.mdx +++ b/docs/self-hosted/how-to/index.mdx @@ -1,8 +1,8 @@ # How-to guides - [How to manually execute database migrations with `migrator`](/self-hosted/updates/migrator/migrator-operations) - - Commands: [up](/self-hosted/updates/migrator/migrator-operations#up), [upto](/self-hosted/updates/migrator/migrator-operations#upto), [downto](/self-hosted/updates/migrator/migrator-operations#downto), [validate](/self-hosted/updates/migrator/migrator-operations#validate), [add-log](/self-hosted/updates/migrator/migrator-operations#add-log) - - Environments: [Kubernetes](/self-hosted/updates/migrator/migrator-operations#kubernetes), [Docker compose](/self-hosted/updates/migrator/migrator-operations#docker--docker-compose), [Local development](/self-hosted/updates/migrator/migrator-operations#local-development) + - Commands: [up](/self-hosted/updates/migrator/migrator-operations#up), [upto](/self-hosted/updates/migrator/migrator-operations#upgrade), [downto](/self-hosted/updates/migrator/migrator-operations#downgrade), [validate](/self-hosted/updates/migrator/migrator-operations#validate), [add-log](/self-hosted/updates/migrator/migrator-operations#add-log) + - Environments: [Kubernetes](/self-hosted/updates/migrator/migrator-operations#kubernetes-helm), [Docker compose](/self-hosted/updates/migrator/migrator-operations#docker-compose), [Local development](/self-hosted/updates/migrator/migrator-operations#local-development) - [How to troubleshoot a dirty database](/self-hosted/how-to/dirty-database) - [How to rollback the Postgres database](/self-hosted/how-to/rollback-database) - [How to apply privileged migrations](/self-hosted/how-to/privileged-migrations) @@ -20,7 +20,7 @@ - [How to determine cause for Precise-code-intel-worker in CrashLoopBackOff status](/self-hosted/how-to/precise-code-intel-worker-crashloopbackoff) - [How to troubleshoot a failure to update repositories when new repositories are added](/admin/how-to/update-repo-failure) - [How to run postgres queries in your Sourcegraph instance](/self-hosted/how-to/run-psql) -- [How to purge deleted repository data from Sourcegraph](/admin/how-to/remove-repo#manually-purge-deleted-repository-data-from-disk) +- [How to purge deleted repository data from Sourcegraph](/admin/how-to/remove-repo#remove-corrupted-repository-data-from-sourcegraph) - [How to address common monorepo problems](/admin/how-to/monorepo-issues) - [How to Set a password for Redis using a ConfigMap](/self-hosted/how-to/redis-configmap) - [How to import a set of internal repositories to Sourcegraph](/admin/how-to/internal-github-repos) diff --git a/docs/self-hosted/how-to/monitoring-guide.mdx b/docs/self-hosted/how-to/monitoring-guide.mdx index e4bf57f59..0e983129d 100644 --- a/docs/self-hosted/how-to/monitoring-guide.mdx +++ b/docs/self-hosted/how-to/monitoring-guide.mdx @@ -15,4 +15,4 @@ This document assumes that you are a [site admin](/admin/). ## FAQs -See the [monitoring section of our FAQ](/admin/faq#monitoring). +See the [monitoring section of our FAQ](/self-hosted/faq#monitoring). diff --git a/docs/self-hosted/how-to/postgres14-index-corruption.mdx b/docs/self-hosted/how-to/postgres14-index-corruption.mdx index 027867f81..67cada69f 100644 --- a/docs/self-hosted/how-to/postgres14-index-corruption.mdx +++ b/docs/self-hosted/how-to/postgres14-index-corruption.mdx @@ -12,7 +12,7 @@ To identify which version of Sourcegraph you are running in a default Sourcegrap SELECT version(); ``` -> NOTE: You can refer to the following instructions for accessing databases on your deployment type: [Docker Compose](/self-hosted/deploy/docker-compose/#access-the-database), [Kubernetes](/self-hosted/deploy/kubernetes/operations#access-the-database). +> NOTE: You can refer to the following instructions for accessing databases on your deployment type: [Docker Compose](/self-hosted/deploy/docker-compose/operations#access-the-database), [Kubernetes](/self-hosted/deploy/kubernetes/operations#access-the-database). You may also check for index corruption in your database using the `amcheck` by running the following query in your database diff --git a/docs/self-hosted/how-to/rebuild-corrupt-postgres-indexes.mdx b/docs/self-hosted/how-to/rebuild-corrupt-postgres-indexes.mdx index 2742b4c1b..ac6c635fe 100644 --- a/docs/self-hosted/how-to/rebuild-corrupt-postgres-indexes.mdx +++ b/docs/self-hosted/how-to/rebuild-corrupt-postgres-indexes.mdx @@ -21,7 +21,7 @@ psql -U sg -d sg -h localhost -p 3333 In docker compose, you will need to scale down all the other services to prevent new connections from being established. You must run these commands from the machine where sourcegraph is running. -> NOTE: You can refer to the following instructions for accessing databases on your deployment type: [Docker Compose](/self-hosted/deploy/docker-compose/#access-the-database), [Kubernetes](/self-hosted/deploy/kubernetes/operations#access-the-database). +> NOTE: You can refer to the following instructions for accessing databases on your deployment type: [Docker Compose](/self-hosted/deploy/docker-compose/operations#access-the-database), [Kubernetes](/self-hosted/deploy/kubernetes/operations#access-the-database). ```shell export DB=pgsql # change for other databases diff --git a/docs/self-hosted/how-to/unfinished-migration.mdx b/docs/self-hosted/how-to/unfinished-migration.mdx index abd5e86fb..f39a263da 100644 --- a/docs/self-hosted/how-to/unfinished-migration.mdx +++ b/docs/self-hosted/how-to/unfinished-migration.mdx @@ -15,11 +15,11 @@ ERROR: Unfinished migrations. Please revert Sourcegraph to the previous version ## Resolution -If you were performing a [standard upgrade](/self-hosted/updates/#standard-upgrades) between two minor versions, then the suggested action is to perform an infrastructure rollback and continue running the previous instance version until the violating out-of-band migrations have completed. The progress of the migrations can be checked [in the UI](#checking-progress). Older versions of Sourcegraph may have performed schema migrations prior to this check, but a schema rollback should not be necessary as our database schemas are backwards-compatible with one minor version. +If you were performing a [standard upgrade](/self-hosted/updates#upgrade-types) between two minor versions, then the suggested action is to perform an infrastructure rollback and continue running the previous instance version until the violating out-of-band migrations have completed. The progress of the migrations can be checked [in the UI](#checking-progress). Older versions of Sourcegraph may have performed schema migrations prior to this check, but a schema rollback should not be necessary as our database schemas are backwards-compatible with one minor version. Alternatively to rolling back and waiting, the unfinished migrations can be run directly via the `migrator`. See the [command documentation](/self-hosted/updates/migrator/migrator-operations#run-out-of-band-migrations) for additional details. -[Multi-version upgrades](/self-hosted/updates/#multi-version-upgrades) and downgrade operations ensure that the required out-of-band migrations have completed or finished rolling back. If this is not the case, contact support as it indicates a non-obvious error in your environment or a bug Sourcegraph's migration tooling. +[Multi-version upgrades](/self-hosted/updates#upgrade-types) and downgrade operations ensure that the required out-of-band migrations have completed or finished rolling back. If this is not the case, contact support as it indicates a non-obvious error in your environment or a bug Sourcegraph's migration tooling. As an emergency escape hatch, the environment variable `SRC_DISABLE_OOBMIGRATION_VALIDATION` can be set to `true` on the `frontend` and `worker` services to disable the startup check. This is not recommended as it may result in broken features or data loss. diff --git a/docs/self-hosted/http-https-configuration.mdx b/docs/self-hosted/http-https-configuration.mdx index 8c954c2af..b7644c6f1 100644 --- a/docs/self-hosted/http-https-configuration.mdx +++ b/docs/self-hosted/http-https-configuration.mdx @@ -8,7 +8,7 @@ Overview: ## Sourcegraph single Docker image and Sourcegraph Cluster (Kubernetes): NGINX -Sourcegraph's single Docker image and Kubernetes deployments use [NGINX](https://www.nginx.com/resources/glossary/nginx/) as a [reverse proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) for the Sourcegraph front-end server, meaning NGINX proxies external HTTP (and [HTTPS](#nginx-ssl-https-configuration)) requests to the Sourcegraph front-end. +Sourcegraph's single Docker image and Kubernetes deployments use [NGINX](https://www.nginx.com/resources/glossary/nginx/) as a [reverse proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) for the Sourcegraph front-end server, meaning NGINX proxies external HTTP (and [HTTPS](#nginx-sslhttps-configuration)) requests to the Sourcegraph front-end. ![NGINX and Sourcegraph architecture](https://storage.googleapis.com/sourcegraph-assets/Docs/sourcegraph-nginx.svg) @@ -18,12 +18,12 @@ Sourcegraph's single Docker image and Kubernetes deployments use [NGINX](https:/ The first time Sourcegraph is run, it will create an [`nginx.conf`](https://github.com/sourcegraph/sourcegraph-public-snapshot/blob/main/cmd/server/shared/assets/nginx.conf) file at: -- `~/.sourcegraph/config/nginx.conf` on the Docker/Sourcegraph host (presuming you're using the [quickstart `docker run` command](/#quick-install)) +- `~/.sourcegraph/config/nginx.conf` on the Docker/Sourcegraph host (presuming you're using the [quickstart `docker run` command](/self-hosted/deploy)) - `/etc/sourcegraph/nginx.conf` inside the container SSL support requires two things: -1. [Manual editing](#nginx-ssl-https-configuration) of the NGINX configuration file if using the [quickstart docker run command](/#quick-install) as it presumes local or internal usage. +1. [Manual editing](#nginx-sslhttps-configuration) of the NGINX configuration file if using the [quickstart docker run command](/self-hosted/deploy) as it presumes local or internal usage. 1. (Now that NGINX is listening on port 7443), we need to configure the Sourcegraph container to forward 443 to 7443 by adding `--publish 443:7443` to the `docker run` command: diff --git a/docs/self-hosted/observability/alerting.mdx b/docs/self-hosted/observability/alerting.mdx index d37f8e477..a12489d9f 100644 --- a/docs/self-hosted/observability/alerting.mdx +++ b/docs/self-hosted/observability/alerting.mdx @@ -29,7 +29,7 @@ Learn more about metrics, dashboards, and alert labels in our [metrics guide](/s ## Setting up alerting -Visit your site configuration (e.g. `https://sourcegraph.example.com/site-admin/configuration`) to configure alerts using the [`observability.alerts`](/admin/config/site-config#observability-alerts) field. As always, you can use `Ctrl+Space` at any time to get hints about allowed fields as well as relevant documentation inside the configuration editor. +Visit your site configuration (e.g. `https://sourcegraph.example.com/site-admin/configuration`) to configure alerts using the [`observability.alerts`](/admin/config/site-config) field. As always, you can use `Ctrl+Space` at any time to get hints about allowed fields as well as relevant documentation inside the configuration editor. Once configured, Sourcegraph alerts will automatically be routed to the appropriate notification channels by severity level. @@ -181,7 +181,7 @@ For the complete set of fields, please refer to the [Alertmanager webhook docume #### Email -Note that to receive email notifications, the [`email.address`](/admin/config/site-config#email-address) and [`email.smtp`](/admin/config/site-config#email-smtp) fields must be configured in site configuration. +Note that to receive email notifications, the [`email.address`](/admin/config/site-config) and [`email.smtp`](/admin/config/site-config) fields must be configured in site configuration. ```json "observability.alerts": [ @@ -220,7 +220,7 @@ The test alert may take up to a minute to fire. The triggered alert will automat ### Silencing alerts -If there is an alert you are aware of and you wish to silence notifications (from the notification channels you have set up) for it, add an entry to the [`observability.silenceAlerts`](/admin/config/site-config#observability-silenceAlerts)field. For example: +If there is an alert you are aware of and you wish to silence notifications (from the notification channels you have set up) for it, add an entry to the [`observability.silenceAlerts`](/admin/config/site-config)field. For example: ```json { diff --git a/docs/self-hosted/observability/logs.mdx b/docs/self-hosted/observability/logs.mdx index 810075df5..2c1268544 100644 --- a/docs/self-hosted/observability/logs.mdx +++ b/docs/self-hosted/observability/logs.mdx @@ -14,7 +14,7 @@ A Sourcegraph service's log level is configured via the environment variable `SR - `eror`: Error. - `crit`: Critical. -Learn more about how to apply these environment variables in [docker-compose](/self-hosted/deploy/docker-compose/#set-environment-variables) deployments. +Learn more about how to apply these environment variables in [docker-compose](/self-hosted/deploy/docker-compose/configuration#set-environment-variables) deployments. ## Log format diff --git a/docs/self-hosted/observability/metrics.mdx b/docs/self-hosted/observability/metrics.mdx index 84889df0e..d74c696ba 100644 --- a/docs/self-hosted/observability/metrics.mdx +++ b/docs/self-hosted/observability/metrics.mdx @@ -203,4 +203,4 @@ Prometheus will be available http://localhost:9090. ## Using a custom monitoring system -Please refer to our FAQ item, ["Can I consume Sourcegraph's metrics in my own monitoring system (Datadog, New Relic, etc.)"](/admin/faq#can-i-consume-sourcegraph-s-metrics-in-my-own-monitoring-system-datadog-new-relic-etc). +Please refer to our FAQ item, ["Can I consume Sourcegraph's metrics in my own monitoring system (Datadog, New Relic, etc.)"](/self-hosted/faq#can-i-consume-sourcegraphs-metrics-in-my-own-monitoring-system-datadog-new-relic-etc). diff --git a/docs/self-hosted/observability/troubleshooting.mdx b/docs/self-hosted/observability/troubleshooting.mdx index 98ae3255f..b5ce57395 100644 --- a/docs/self-hosted/observability/troubleshooting.mdx +++ b/docs/self-hosted/observability/troubleshooting.mdx @@ -178,7 +178,7 @@ If your users are experiencing search timeouts or search performance issues, ple 1. Select the **+** icon on the left-hand side, then choose **Import**. 1. Paste [this JSON](https://gist.githubusercontent.com/slimsag/3fcc134f5ce09728188b94b463131527/raw/f8b545f4ce14b0c30a93f05cd1ee469594957a2c/sourcegraph-debug-search-timeouts.json) into the input and click **Load**. 1. Once the dashboard appears, include screenshots of **the entire** dashboard in the issue report. -1. Include the logs of `zoekt-webserver` container in the `indexed-search` pods. If you are using single Docker container enable [debug logs](/self-hosted/observability/#Logs) first. +1. Include the logs of `zoekt-webserver` container in the `indexed-search` pods. If you are using single Docker container enable [debug logs](/self-hosted/observability/logs) first. #### Scenario: zoekt-webserver is in a `CrashloopBackOff` and `err cannot allocate memory` @@ -269,7 +269,7 @@ Network panel](https://developers.google.com/web/tools/chrome-devtools/network). ### Check resource usage -[Access Prometheus](/self-hosted/observability/metrics#accessing-prometheus) and examine the following metrics: +[Access Prometheus](/self-hosted/observability/metrics#accessing-prometheus-directly) and examine the following metrics: **Memory:** `process_resident_memory_bytes` is a gauge that tracks memory usage per backend process. @@ -314,11 +314,11 @@ title > Edit > copying the expression in the Metrics field. If you are looking for the trace associated with a specific request, - [Find the trace ID in the HTTP response in the browser developer tools "Network" tab](#check-browser-network-panel). -- [Access Jaeger](/self-hosted/observability/tracing#accessing-jaeger) and look up the trace ID. +- [Access Jaeger](/self-hosted/observability/tracing#jaeger) and look up the trace ID. If you do not have a specific request or cannot find the trace ID, -- [Access Jaeger](/self-hosted/observability/tracing#accessing-jaeger). +- [Access Jaeger](/self-hosted/observability/tracing#jaeger). - Search for a matching span by setting the appropriate fields in the sidebar. 2 ways: start with a span ID, or manually locate your span by searching the Jaeger GUI diff --git a/docs/self-hosted/pprof.mdx b/docs/self-hosted/pprof.mdx index 116329ff5..5f5b6f2f2 100644 --- a/docs/self-hosted/pprof.mdx +++ b/docs/self-hosted/pprof.mdx @@ -10,7 +10,7 @@ Follow the instructions below to generate profiling data. We will use the Source ### Sourcegraph with Docker Compose -See [expose debug port in Docker Compose](/self-hosted/deploy/docker-compose/#operations). +See [expose debug port in Docker Compose](/self-hosted/deploy/docker-compose/configuration#expose-debug-port). ### Sourcegraph with Kubernetes diff --git a/docs/self-hosted/updates/migrator/migrator-operations.mdx b/docs/self-hosted/updates/migrator/migrator-operations.mdx index ccf26e4d4..b90a760fc 100644 --- a/docs/self-hosted/updates/migrator/migrator-operations.mdx +++ b/docs/self-hosted/updates/migrator/migrator-operations.mdx @@ -204,7 +204,7 @@ The `up` command (the default behavior of the `migrator` service) applies all mi > WARNING: The target migration leaves of this command are defined at `migrator` **compile time** and does not accept a version argument. This is the only command where the Sourcegraph instance version and `migrator` version are expected to match. -Users should generally prefer the command [`upto`](#upto), which accepts more explicit bounds and does not depend on the migrator compilation version. +Users should generally prefer the command [`upgrade`](#upgrade), which accepts more explicit bounds and does not depend on the migrator compilation version. ```sh up \ diff --git a/docs/self-hosted/updates/migrator/upgrading-early-versions.mdx b/docs/self-hosted/updates/migrator/upgrading-early-versions.mdx index 4079c15c0..b12994743 100644 --- a/docs/self-hosted/updates/migrator/upgrading-early-versions.mdx +++ b/docs/self-hosted/updates/migrator/upgrading-early-versions.mdx @@ -24,7 +24,7 @@ In `v3.37.0` the `migrator` service was introduced. Docker-compose and Kubernete In version `3.27` `pgsql` and `codeintel-db` databases were upgraded from Postgres 11 to Postgres 12. **If upgrading from 3.26 or before to 3.27 or later**, the `pgsql` and `codeintel-db` databases must have their Postgres version upgraded. If this step is not performed, then the following upgrade procedure will fail fast (and leave all existing data untouched). - If using an external database, follow the [upgrading external PostgreSQL instances](/self-hosted/postgres#upgrading-external-postgresql-instances) guide. -- Otherwise, perform the following steps from the [upgrading internal Postgres instances](/self-hosted/postgres#upgrading-internal-postgresql-instances) guide. +- Otherwise, perform the following steps from the [upgrading internal Postgres instances](/self-hosted/postgres#upgrading-built-in-postgresql) guide. The following procedures describe how to upgrade the Postgres version: diff --git a/docs/self-hosted/workers.mdx b/docs/self-hosted/workers.mdx index c87a6e5a6..716400346 100644 --- a/docs/self-hosted/workers.mdx +++ b/docs/self-hosted/workers.mdx @@ -8,7 +8,7 @@ The following jobs are defined by the `worker` service. #### `out-of-band-migrations` -This job runs [out of band migrations](/admin/migration#mout-of-band-migrations), which perform large data migrations in the background over time instead of synchronously during Sourcegraph instance updates. +This job runs [out of band migrations](/admin/migration), which perform large data migrations in the background over time instead of synchronously during Sourcegraph instance updates. #### `codeintel-upload-backfiller` diff --git a/docs/technical-changelog.mdx b/docs/technical-changelog.mdx index 9169574f3..976448d0d 100644 --- a/docs/technical-changelog.mdx +++ b/docs/technical-changelog.mdx @@ -12456,7 +12456,7 @@ The following PRs were merged onto the previous release branch but could not be - A new status message now reports how many repositories have already been indexed for search. [#45246](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/45246) - Search contexts can now be starred (favorited) in the search context management page. Starred search contexts will appear before other contexts in the context dropdown menu next to the search box. [#45230](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/45230) - Search contexts now let you set a context as your default. The default will be selected every time you open Sourcegraph and will appear near the top in the context dropdown menu next to the search box. [#45387](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/45387) -- [search.largeF[iles](/admin/config/site-config#search-largeFiles) accepts an optional prefix `!` to negate a pattern. The o)rder of the patterns within search.largeFiles is honored such that the last pattern matching overrides preceding patterns. For patterns that begin with a literal `!` prefix with a backslash, for example, `\!fileNameStartsWithExcl!.txt`. Previously indexed files that become excluded due to this change will remain in the index until the next reindex [#45318](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/45318) +- [search.largeF[iles](/admin/config/site-config) accepts an optional prefix `!` to negate a pattern. The order of the patterns within search.largeFiles is honored such that the last pattern matching overrides preceding patterns. For patterns that begin with a literal `!` prefix with a backslash, for example, `\!fileNameStartsWithExcl!.txt`. Previously indexed files that become excluded due to this change will remain in the index until the next reindex [#45318](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/45318) - [Webh[ooks](/admin/webhooks/incoming) have been overhauled completely and can now be found under **Site admin >) Repositories > Incoming webhooks**. Webhooks that were added via code host configuration are [deprec[ated](/admin/webhooks/incoming#deprecation-notice) and will be removed in 5.1.0. - Added support fo)r receiving webhook `push` events from GitHub which will trigger Sourcegraph to fetch the latest commit rather than relying on polling. - Added support for private container registries in Sourcegraph executors. [Using private registries](/self-hosted/executors/private-registries) @@ -12603,7 +12603,7 @@ The following PRs were merged onto the previous release branch but could not be ### Added - A new look for Sourcegraph, previously in beta as "Simple UI", is now permanently enabled. [#41021](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/41021) -- A new [multi-version upgrade](/self-hosted/updates#multi-version-upgrades) process now allows Sourcegraph instances to upgrade more than a single minor version. Instances at version 3.20 or later can now jump directly to 4.0. [#40628](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/40628) +- A new [multi-version upgrade](/self-hosted/updates#upgrade-types) process now allows Sourcegraph instances to upgrade more than a single minor version. Instances at version 3.20 or later can now jump directly to 4.0. [#40628](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/40628) - Matching ranges in file paths are now highlighted for path results and content results. Matching paths in repository names are now highlighted for repository results. [#41296](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/41296) [#41385](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/41385) [#41470](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/41470) - Aggregations by repository, file, author, and capture group are now provided for search results. [#39643](https://github.com/sourcegraph/sourcegraph-public-snapshot/issues/39643) - Blob views and search results are now lazily syntax highlighted for better performance. [#39563](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/39563) [#40263](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/40263)