Skip to content

Commit 372513f

Browse files
authored
Merge branch 'main' into bahrmichael/templates-doc-update
2 parents 4acbe44 + fea7e78 commit 372513f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2318
-5367
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Before the dependencies are installed make sure your local machine has the follo
2525
* node: `v20.8.1`
2626
* pnpm: `8.13.1`
2727

28-
**Note**: If you have `asdf` available you can install the above versions for only this repository by running the following command from your terminal in the root folder:
28+
**Note**: If you have `mise` available you can install the above versions for only this repository by running the following command from your terminal in the root folder:
2929

3030
```sh
31-
asdf install
31+
mise install
3232
```
3333

3434
Now that the base requirements of the project have been satisfied, we can install the required dependencies to run the development server!

docs/admin/analytics.mdx

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
11
# Analytics
22

33
<TierCallout>
4-
Supported on [Enterprise](/pricing/enterprise) plans.
4+
Supported on [Enterprise](/pricing/enterprise) plans.
55
<user>
6-
Available via the Web app.
6+
Available via the Web app.
77
</user>
88
</TierCallout>
99

10-
The analytics section helps Sourcegraph administrators understand user engagement across the various Sourcegraph features, identify power users, and convey value to internal leaders. Introduced in version 3.42, the section includes analytics breakdowns for our most common features such as Batch Changes, Search Notebooks and search, while also providing basic user-level analytics.
10+
The analytics section helps Sourcegraph administrators understand user engagement across the various Sourcegraph features, identify power users, and convey value to internal leaders.
1111

12-
## Data Visualizations
12+
[Sourcegraph's managed Analytics](https://analytics.sourcegraph.com) for Cody and Code Search usage data is available for:
1313

14-
The goal of these pages is to help administrators answer any question they might have about how features are being used within their Sourcegraph instance. So far, we have introduced pages for Search, Batch Changes, Code Intel, Search, and Search Notebooks, as well as a general users page.
14+
- [Sourcegraph Cloud](/cloud) customers
15+
- Self-hosted customers that have fully enabled usage telemetry and are running a supported version of Sourcegraph (5.9+)
16+
- [Sourcegraph workspaces](https://workspaces.sourcegraph.com)
1517

16-
Each page can visualize the past one week, the past one month, or the path three months of data. For graphs that show user data, the graph can toggle between total users or unique users.
18+
<Callout type="info">Read and learn more about Analytics [here](/analytics).</Callout>
1719

18-
These graphs pull directly from the event log table within the Sourcegraph instance they are running. There should not be an increase to the storage on disk of these tables due to these new features. Further, no data beyond published ping data is sent back to Sourcegraph.
20+
## Data Visualizations
1921

20-
## Value Calculators
22+
These pages aim to help administrators answer any questions they might have about how features are being used within their Sourcegraph instance. You can view feature-based stats for Search, Batch Changes, Code Insights, and Cody. There are also tabs to study analytics for Search, Completions, and Chats, as well as a general Users page.
2123

22-
Each page also includes a total time saved value which can be used to measure the value Sourcegraph is bringing to your organization. This metric is derived from the configurable calculators below the total time saved value. Each calculator multiplies event log data (ex: number of precise code intel events such as a go-to-definition) by a configurable number of minutes saved per event to arrive at a time saved by the feature.
24+
Each page can visualize the past week, month, or three months of data.
2325

24-
We designed this to be configurable by you because we want to...
25-
- help admins understand the value that is being seen by their organization today.
26-
- be customizable so admins can explore what changes will best increase developer time saved.
26+
These graphs pull directly from the event log table within their Sourcegraph instance. Due to these new features, the storage on disk of these tables should not increase. Further, no data beyond published ping data is sent back to Sourcegraph.
2727

28-
These calculators exist on the Search, Code Intel, Batch Changes, and Notebooks analytics pages. Each calculator looks different as they include metrics specifically designed for that part of the application. Please note that the calculator configuration does not save and will return to the default if you navigate away from the page.
28+
## Value Calculators
2929

30-
If you have questions about how this works or about how to convey this value to leaders within your organization, please do not hesitate to reach out to your customer engineer.
30+
Each page also includes a total time saved value, which can be used to measure the value Sourcegraph is bringing to your organization. This metric is derived from the configurable calculators below the total time saved value. Each calculator multiplies event log data (e.g., the number of precise code intel events, such as a go-to-definition) by a configurable number of minutes saved per event to arrive at a time saved by the feature.
3131

32-
## FAQ
32+
This is designed to be configurable because we want to:
3333

34-
**Who has access to see these improved analytics? Where can I find it?**
34+
- Help admins understand the value that is being seen by their organization today
35+
- Be customizable so admins can explore what changes will best increase developer time saved
3536

36-
To see these new visualizations, you must be a site admin. You can find these under Site Admin section, under the Analytics section of the left-nav bar.
37+
These calculators are on the individual Search, Completions, and Chats analytics pages. If you have questions about how this works or about how to convey this value to your org's stakeholders, please do not hesitate to contact your customer engineer.
3738

38-
**Do these improved analytics require sending data to Sourcegraph?**
39+
## FAQs
3940

40-
No! The processing happens entirely within a your instance so no data is sent in or out of your instance. Further, these improved analytics leverage data already being captured within the event log table of your instance so there is no additional storage or processing required for this change. Basically, customers should notice no perceivable difference to their infrastructure.
41+
### Who has access to see these improved analytics? Where can I find it?
4142

42-
**How often is the data updated?**
43+
You must be a site admin for your Sourcegraph instance to see the Analytics. You can find these in the **Site Admin** section, under the **Instance Overview** section of the left nav bar.
4344

44-
The data is updated approximately every 24 hours.
45+
### Do these improved analytics require sending data to Sourcegraph?
4546

46-
**How does this work with the existing usage stats page?**
47+
No! The processing happens entirely within your instance, so no data is sent in or out of your instance. Further, these improved analytics leverage data already being captured within your instance's event log table, so there is no additional storage or processing required for this change. Customers should notice no perceivable difference in their infrastructure.
4748

48-
This new analytics experience has been redesigned from the ground up to provide the most value to administrators. In the future, we plan to deprecate the legacy usage stats page and statistics section once this functionality moved from experimental to generally available.
49+
### How often is the data updated?
4950

50-
Note: The new analytics experience is experimental. For billing information, use [usage stats](/admin/usage_statistics).
51+
The data is updated approximately every 24 hours.

docs/admin/architecture.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
At its core, Sourcegraph maintains a persistent cache of all repositories that are connected to it. It is persistent because this data is critical for Sourcegraph to function. Still, it is ultimately a cache because the code host is the source of truth, and our cache is eventually consistent.
1212

1313
- `gitserver` is the sharded service that stores repositories and makes them accessible to other Sourcegraph services
14-
- `repo-updater` is the singleton service responsible for ensuring all repositories in gitserver are as up-to-date as possible while respecting code host rate limits. It is also responsible for syncing repository metadata from the code host that is stored in the repo table of our Postgres database
14+
- `worker` is responsible for ensuring all repositories in gitserver are as up-to-date as possible while respecting code host rate limits. It is also responsible for syncing repository metadata from the code host that is stored in the repo table of our Postgres database
1515

1616
## Permission syncing
1717

18-
Repository permissions are mirrored from code hosts to Sourcegraph by default. This builds the foundation of Sourcegraph authorization for repositories to ensure users see consistent content on code hosts. Currently, the background permissions syncer resides in the repo-updater.
18+
Repository permissions are mirrored from code hosts to Sourcegraph by default. This builds the foundation of Sourcegraph authorization for repositories to ensure users see consistent content on code hosts. Currently, the background permissions syncer resides in the `worker`.
1919

2020
<Callout type="note">Learn more in the [Permission Syncing docs](/admin/permissions/syncing)</Callout>
2121

@@ -94,7 +94,7 @@ You can learn more in the [Code Insights](/code_insights) docs.
9494
- Exhaustive search (with `count:all/count:999999` operator)
9595
- Historical search (= unindexed search, currently)
9696
- Commit search to find historical commits to search over
97-
- Repository Syncing: The code insights backend has direct dependencies on `gitserver` and `repo-updater`
97+
- Repository Syncing: The code insights backend has a direct dependency on `gitserver`
9898
- Permission syncing: The code insights backend depends on synced repository permissions for access control
9999
- Settings cascade:
100100
- Insights and dashboard configuration are stored in user, organization, and global settings. This will change in the future and is planned to be moved to the database

docs/admin/code_hosts/aws_codecommit.mdx

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,15 @@ AWS CodeCommit connections support the following configuration options, which ar
3434

3535
{/* SCHEMA_SYNC_START: admin/code_hosts/aws_codecommit.schema.json */}
3636
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
37-
{/* Last updated: Manual setup - will be automated via sourcegraph/sourcegraph releases */}
37+
{/* Last updated: 2025-07-10T00:07:31Z via sourcegraph/sourcegraph@v6.5.2654 */}
3838
```json
3939
{
40+
// REQUIRED:
4041
// The AWS access key ID to use when listing and updating repositories from AWS CodeCommit. Must have the AWSCodeCommitReadOnly IAM policy.
4142
"accessKeyID": null,
4243

4344
// A list of repositories to never mirror from AWS CodeCommit.
44-
//
4545
// Supports excluding by name ({"name": "git-codecommit.us-west-1.amazonaws.com/repo-name"}) or by ARN ({"id": "arn:aws:codecommit:us-west-1:999999999999:name"}).
46-
"exclude": null,
4746
// Other example values:
4847
// - [
4948
// {
@@ -61,35 +60,55 @@ AWS CodeCommit connections support the following configuration options, which ar
6160
// "name": "go-client"
6261
// }
6362
// ]
63+
"exclude": null,
6464

65+
// REQUIRED:
6566
// The Git credentials used for authentication when cloning an AWS CodeCommit repository over HTTPS.
66-
//
6767
// See the AWS CodeCommit documentation on Git credentials for CodeCommit: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#git-credentials-code-commit.
6868
// For detailed instructions on how to create the credentials in IAM, see this page: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
69-
"gitCredentials": null,
69+
"gitCredentials": {
70+
"password": null,
71+
"username": null
72+
},
73+
74+
// SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.
75+
"gitSSHCipher": null,
76+
77+
// SSH keys to use when cloning Git repo.
78+
"gitSSHCredential": null,
79+
80+
// The ID of the SSH key created for your IAM users. It is required when using SSH to clone repositories.
81+
"gitSSHKeyID": null,
82+
83+
// The type of Git URLs to use for cloning and fetching Git repositories.
84+
// Valid options: "http", "ssh"
85+
"gitURLType": "http",
7086

7187
// Deprecated and ignored field which will be removed entirely in the next release. AWS CodeCommit repositories can no longer be enabled or disabled explicitly. Configure which repositories should not be mirrored via "exclude" instead.
7288
"initialRepositoryEnablement": false,
7389

90+
// The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum.
91+
"maxDeletions": 0,
92+
93+
// REQUIRED:
7494
// The AWS region in which to access AWS CodeCommit. See the list of supported regions at https://docs.aws.amazon.com/codecommit/latest/userguide/regions.html#regions-git.
95+
// Valid options: "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"
7596
"region": "us-east-1",
7697

7798
// The pattern used to generate a the corresponding Sourcegraph repository name for an AWS CodeCommit repository. In the pattern, the variable "{name}" is replaced with the repository's name.
78-
//
7999
// For example, if your Sourcegraph instance is at https://src.example.com, then a repositoryPathPattern of "awsrepos/{name}" would mean that a AWS CodeCommit repository named "myrepo" is available on Sourcegraph at https://src.example.com/awsrepos/myrepo.
80-
//
81100
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
82-
"repositoryPathPattern": "{name}",
83101
// Other example values:
84102
// - "git-codecommit.us-west-1.amazonaws.com/{name}"
85103
// - "git-codecommit.eu-central-1.amazonaws.com/{name}"
104+
"repositoryPathPattern": "{name}",
86105

106+
// REQUIRED:
87107
// The AWS secret access key (that corresponds to the AWS access key ID set in `accessKeyID`).
88108
"secretAccessKey": null
89109
}
90110
```
91111
{/* SCHEMA_SYNC_END: admin/code_hosts/aws_codecommit.schema.json */}
92-
93112
## Setup steps for SSH connections to AWS CodeCommit repositories
94113

95114
To add CodeCommit repositories in Docker Container:

docs/admin/code_hosts/azuredevops.mdx

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,15 @@ Azure DevOps connections support the following configuration options, which are
6767

6868
{/* SCHEMA_SYNC_START: admin/code_hosts/azuredevops.schema.json */}
6969
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
70-
{/* Last updated: Manual setup - will be automated via sourcegraph/sourcegraph releases */}
70+
{/* Last updated: 2025-07-10T00:07:30Z via sourcegraph/sourcegraph@v6.5.2654 */}
7171
```json
72+
// Authentication alternatives: token OR windowsPassword
73+
7274
{
7375
// A flag to enforce Azure DevOps repository access permissions
7476
"enforcePermissions": false,
7577

7678
// A list of repositories to never mirror from Azure DevOps Services.
77-
"exclude": null,
7879
// Other example values:
7980
// - [
8081
// {
@@ -92,43 +93,77 @@ Azure DevOps connections support the following configuration options, which are
9293
// "pattern": "^topsecretproject/.*"
9394
// }
9495
// ]
96+
"exclude": null,
97+
98+
// SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.
99+
"gitSSHCipher": null,
100+
101+
// SSH keys to use when cloning Git repo.
102+
"gitSSHCredential": null,
95103

96104
// The type of Git URLs to use for cloning and fetching Git repositories.
97-
//
98105
// If "http", Sourcegraph will access repositories using Git URLs of the form http(s)://dev.azure.com/myrepo.git.
99-
//
100-
// If "ssh", Sourcegraph will access repositories using Git URLs of the form git@ssh.dev.azure.com:v3/myrepo. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
106+
// If "ssh", Sourcegraph will access repositories using Git URLs of the form [email protected]:v3/myrepo. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth.
107+
// Valid options: "http", "ssh"
101108
"gitURLType": "http",
102109

110+
// The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum.
111+
"maxDeletions": 0,
112+
103113
// An array of organization names identifying Azure DevOps organizations whose repositories should be mirrored on Sourcegraph.
104-
"orgs": null,
105114
// Other example values:
106-
// - ["name"]
115+
// - [
116+
// "name"
117+
// ]
107118
// - [
108119
// "kubernetes",
109120
// "golang",
110121
// "facebook"
111122
// ]
123+
"orgs": null,
112124

113125
// An array of projects "org/project" strings specifying which Azure DevOps projects' repositories should be mirrored on Sourcegraph.
126+
// Other example values:
127+
// - [
128+
// "org/project"
129+
// ]
114130
"projects": null,
131+
132+
// Rate limit applied when making background API requests.
133+
"rateLimit": {
134+
"enabled": false,
135+
"requestsPerHour": 0
136+
},
137+
138+
// The pattern used to generate the corresponding Sourcegraph repository name for a Azure DevOps repository.
139+
// - "{host}" is replaced with the Azure DevOps URL's host (such as dev.azure.com)
140+
// - "{orgName}" is replaced with the repository's parent projects owning organization (or collection on DevOps server)
141+
// - "{projectName}" is replaced with the repository's parent project
142+
// - "{repositoryName}" is replaced with the repository's name.
143+
// For example, if your Azure DevOps is https://dev.azure.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{orgName}/{projectName}/{repositoryName}" would mean that a Azure DevOps repository at https://dev.azure.com/MYORG/MYPROJECT/MYREPO is available on Sourcegraph at https://src.example.com/dev.azure.com/MYORG/MYPROJECT/MYREPO.
144+
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
115145
// Other example values:
116-
// - ["org/project"]
146+
// - "{projectName}/{repositoryName}"
147+
"repositoryPathPattern": "{host}/{orgName}/{projectName}/{repositoryName}",
117148

118149
// The Personal Access Token associated with the Azure DevOps username used for authentication.
119150
"token": null,
120151

152+
// REQUIRED:
121153
// URL for Azure DevOps Services, set to https://dev.azure.com.
122-
"url": null,
123154
// Other example values:
124155
// - "https://dev.azure.com"
156+
"url": null,
125157

126-
// A username for authentication with the Azure DevOps code host.
127-
"username": null
158+
// REQUIRED:
159+
// A username for authentication with the Azure DevOps code host. Typically an email address when connect to Azure DevOps Services (cloud) and a domain\username when connecting to Azure DevOp Server (onPrem)
160+
"username": null,
161+
162+
// Windows account password (Azure Devops Server OnPrem Only): This is needed to clone the repo, the Token will be used for REST API calls
163+
"windowsPassword": null
128164
}
129165
```
130166
{/* SCHEMA_SYNC_END: admin/code_hosts/azuredevops.schema.json */}
131-
132167
## Webhooks
133168

134169
Please consult [this page](/admin/config/webhooks/incoming) in order to configure webhooks.

0 commit comments

Comments
 (0)