You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Sourcegraph Docs
2
2
3
-
<!-- Working branch for FEB 2025 Release -->
3
+
<!-- Working branch for April 2025 Release -->
4
4
5
5
Welcome to the Sourcegraph documentation! We're excited to have you contribute to our docs. We've recently rearchitectured our docs tech stack — powered by Next.js, TailwindCSS and deployed on Vercel. This guide will walk you through the process of contributing to our documentation using the new tech stack.
Copy file name to clipboardExpand all lines: docs/admin/code_hosts/github.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,8 @@ To create a GitHub App and connect it to Sourcegraph:
66
66
67
67
9. (Optional) If you want to sync repositories from other organization or user namespaces and your GitHub App is set to public visibility, you can create additional installations with **Add installation**.
68
68
69
+
> NOTE: When you create a GitHub App, Sourcegraph automatically sets up an [incoming webhook](/admin/config/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.
70
+
69
71
> 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).
Copy file name to clipboardExpand all lines: docs/admin/config/authorization_and_authentication.mdx
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,13 +112,7 @@ And configure the identity provider to pass the email address as the `nameID`.
112
112
113
113
### Bitbucket Server / Bitbucket Data Center authorization
114
114
115
-
We do not currently support OAuth for Bitbucket Server or Bitbucket Data Center. You will need to combine permissions syncing from Bitbucket Server / Bitbucket Data Center with another authentication mechanism (SAML, built-in auth, HTTP authentication proxies). Bitbucket Server and Bitbucket Data Center only pass usernames to Sourcegraph, so you’ll need to make sure that those usernames are matched by whatever mechanism you choose to use for access.
116
-
117
-
Follow the steps to [sync Bitbucket Server / Bitbucket Data Center permissions](/admin/code_hosts/bitbucket_server#repository-permissions). Then, do one of the following:
118
-
119
-
1. Create the user accounts in Sourcegraph with matching usernames. (Access using `builtin` auth.)
120
-
2.[Configure SAML authentication](/admin/auth/saml/). If you are using Bitbucket Server / Bitbucket Data Center, the `login` attribute is _not_ optional. You need to pass the Bitbucket Server username as the `login` attribute.
121
-
3.[Configure an HTTP authentication proxy](/admin/auth/#http-authentication-proxies), passing the Bitbucket Server username value as the `usernameHeader`.
115
+
We support authentication through OAuth for Bitbucket Server / Bitbucket Data Center. See the [Bitbucket Server auth provider docs](/admin/auth/#bitbucket-server).
| Omitted, or set to `null`| Changesets will be reconciled as fast as the code host allows; essentially the same as setting a single `{"rate": "unlimited"}` window. |
| Omitted, or set to `null`| Changesets will be reconciled as fast as the code host allows; essentially the same as setting a single `{"rate": "unlimited"}` window. |
36
36
| Set to an array (even if empty) | Changesets will be reconciled using the rate limit in the current window using [the leaky bucket behavior described below](#leaky-bucket-rate-limiting). If no window covers the current period, then no changesets will be reconciled until a window with a non-zero [`rate`](#rate) opens. |
37
-
| Any other value | The configuration is invalid, and an error will appear. |
37
+
| Any other value | The configuration is invalid, and an error will appear. |
38
38
39
39
#### Leaky bucket rate limiting
40
40
@@ -171,18 +171,53 @@ For those that require a separate API call, Batch Changes will only be able to d
171
171
172
172
Refer to the table below to see the levels with which each code host is supported:
173
173
174
-
Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note
175
-
--------- | --------- | :-: | :-: | ----
176
-
Azure DevOps | Changeset property | ✓ | ✗ |
177
-
Bitbucket Cloud | Changeset property | ✓ | ✓ |
178
-
Bitbucket Server | API call | ✓ | ✓ |
179
-
GitHub | API call | ✓ | ✓ |
180
-
GitLab | Changeset property | ✓ | ✓ |
181
-
Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum
174
+
Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note
Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum
182
182
183
-
## Commit signing for GitHub
183
+
## Commit signing
184
184
185
-
<Callouttype="note"> The feature is currently in Beta stage and supported on Sourcegraph versions 5.1 or more.</Callout>
185
+
Batch Changes supports commit signing with both GitHub apps and with SSH keys.
186
+
187
+
### Commit signing with SSH keys (GitLab and GitHub)
188
+
189
+
<Callouttype="note">Commit signing with SSH keys is currently Experimental and is supported only with Sourcegraph v6.2 or more.</Callout>
190
+
191
+
Commit signing with SSH keys can only be combined with a personal or fine-grained access token.
192
+
193
+
Sourcegraph can be configured to sign commits using SSH keys with user and site admin credentials.
194
+
195
+
To enable **commit signing for your Batch Changes user**, navigate to **Settings > Batch Changes** and click **Add credentials** for a GitHub or GitLab code host.
196
+
197
+

198
+
199
+
If you already have a credential for the given code host, remove it first.
200
+
201
+
Enter your personal access token, and check the "Sign commits on this code host" box. This will add a step to the setup flow. Click "Next" and wait for Batch Changes to verify the access token.
202
+
203
+

204
+
205
+
Once the credential is added, you can copy the public SSH key Batch Changes will use to sign commits. You can view the public key anytime by clicking **View Credentials**.
206
+
207
+

208
+
209
+
Add this public SSH key to your [GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) or [GitLab](https://docs.gitlab.com/user/ssh/#add-an-ssh-key-to-your-gitlab-account) account.
210
+
Make sure you add it as a signing key.
211
+
212
+

213
+
214
+
To enable **commit signing as a site admin**, navigate to **Site Admin > Section: Batch Changes > Settings** and click **Add credentials** for a GitHub or GitLab code host. The rest of the setup is the same as above.
215
+
216
+

217
+
218
+
### Commit signing with GitHub apps
219
+
220
+
<Callouttype="note">Commit signing with GitHub apps is currently in Beta and is supported with Sourcegraph v5.1 or more.</Callout>
186
221
187
222
Sourcegraph can be configured to [sign commits pushed to GitHub](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) using a GitHub App. Commit signing prevents tampering by unauthorized parties and provides a way to ensure that commits pushed to branches created by Batch Changes actually do come from Sourcegraph. Enabling commit signing for Batch Changes can also help pass checks in build systems or CI/CD pipelines that require that all commits are signed and verified before they can be merged.
188
223
@@ -306,3 +341,32 @@ When a user is deleted, their Batch Changes become inaccessible in the UI but th
306
341
This allows recovering the Batch Changes if the user is restored.
307
342
308
343
However, if the user deletion is permanent, deleting both account and data, then the associated Batch Changes are also permanently deleted from the database. This frees storage space and removes dangling references.
344
+
345
+
## Batch Spec Library
346
+
347
+
<Callouttype="note"> Batch Spec Library is currently in Experimental.</Callout>
348
+
349
+
The Batch Spec Library is a collection of Batch Specs that can be used to create Batch Changes. Sourcegraph provides a few Batch Specs out of the box.
350
+
351
+
Site admins can manage the library through the GraphQL mutations `createBatchSpecLibraryRecord`, `updateBatchSpecLibraryRecord`, and `deleteBatchSpecLibraryRecord`. Use the query `batchSpecLibrary` to list all available Batch Spec examples.
Copy file name to clipboardExpand all lines: docs/admin/deploy/kubernetes/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -938,7 +938,7 @@ When all pods have restarted and show as Running, you can browse to your Sourceg
938
938
- Check the `Site Admin > Updates` page to determine [upgrade readiness](/admin/updates/#upgrade-readiness).
939
939
940
940
**Step 2:**
941
-
> <Callout type="warning">The Kubernetes Helm deployment type does not support MVU from Sourcegraph `v5.9.45` versions and earlier to Sourcegraph `v6.0.0`. Admins seeking to upgrade to Sourcegraph `v6.0.0` should upgrade to `v5.10.3940` or `v5.11.6271` and then use the standard upgrade procedure to get to `v6.0.0`. This is because migrator v6.0.0 will no longer connect to Postgres 12 databases. For more info see our [PostgreSQL upgrade docs](/admin/postgres#requirements).</Callout>
941
+
> <Callout type="warning">The Kubernetes Helm deployment type does not support MVU from Sourcegraph `v5.9.45` versions and earlier to ANY version `v6.0.x` or later. Admins seeking to upgrade to any Sourcegraph version `v6.0.x` or later (including `v6.1.x`, `v6.2.x`, etc.) must first upgrade to `v5.10.3940` or `v5.11.6271` and then use the standard upgrade procedure to get to their target version. This is because migrator in all versions from `v6.0.0` onwards will no longer connect to Postgres 12 databases. For more info see our [PostgreSQL upgrade docs](/admin/postgres#requirements).</Callout>
942
942
943
943
Scale down `deployments` and `statefulSets` that access the database, _this step prevents services from accessing the database while schema migrations are in process._
944
944
The following services must have their replicas scaled to 0:
To upgrade builtin containers in Helm admins must update their instance to v5.11.6271 via the [helm multi-version upgrade procedure](/admin/deploy/kubernetes#multi-version-upgrade-procedure) or standard upgrade procedure. This is because `helm upgrade` doesn't support just the DBs in a chart.
85
+
When using the in-cluster PostgreSQL databases included in the Sourcegraph Helm chart, database upgrades are integrated with the overall application upgrade process and there is no mechanism to upgrade only the PostgreSQL containers independently. Therefore, the PostgreSQL upgrade must be performed as part of a full Sourcegraph version upgrade.
86
86
87
-
<Callouttype="warning"> In Sourcegraph version 6.0.0 Sourcegraph services will no longer be able to connect to a Postgres 12 database. This means at and after Sourcegraph 6.0.0, migrator will not be connect to older versions to execute the `upgrade` command. </Callout>
87
+
For production deployments, we recommend using external PostgreSQL databases, which allows for more flexible database management outside the Helm deployment lifecycle.
88
+
89
+
### Required Upgrade Path
90
+
91
+
<Callouttype="warning">Sourcegraph versions `v6.0.x` and later require PostgreSQL 16 and will not connect to PostgreSQL 12 databases. This means any direct upgrade from versions earlier than `v5.10.3940` to any version `v6.0.x` or later will fail because the migrator in `v6.0.x` and later cannot connect to PostgreSQL 12 to perform the upgrade.</Callout>
92
+
93
+
To safely upgrade PostgreSQL in Helm deployments:
94
+
95
+
1.**First upgrade to an intermediate version**:
96
+
- Upgrade to either Sourcegraph `v5.10.3940` or `v5.11.6271` using the [helm multi-version upgrade procedure](/admin/deploy/kubernetes#multi-version-upgrade-procedure) or [standard upgrade procedure](/admin/deploy/kubernetes#standard-upgrades)
97
+
- These specific versions include the necessary PostgreSQL upgrade scripts to safely migrate from PG12 to PG16
98
+
99
+
2.**Verify the PostgreSQL upgrade** (optional):
100
+
- You can verify the PostgreSQL version has been successfully upgraded by connecting to the database:
- Once PostgreSQL has been upgraded to version 16, you can safely upgrade to your target version (`v6.0.x` or later) using the standard upgrade procedure
108
+
109
+
For any issues during the PostgreSQL upgrade process, please contact [email protected].
0 commit comments