Skip to content

Commit ec9dc8e

Browse files
authored
Update Code Insights docs with new sub-repo perms setting (#1128)
Update Code Insights documentation for the changes introduced in [PR 5187](sourcegraph/sourcegraph#5187), which will be in the May 28th (6.4) release.
1 parent 16b48da commit ec9dc8e

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

docs/code_insights/explanations/current_limitations_of_code_insights.mdx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,24 @@ Code Insights does not yet support running over specific revisions.
7979

8080
## VCS limitations
8181

82-
Code Insights only supports git based repositories and does not support perforce repositories that have sub-repo permissions enabled.
82+
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).
8383

84-
<Callout type="note"> Perforce depots converted to git are also currently not supported for Code Insights.</Callout>
84+
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.
85+
86+
Code Insights exposes only aggregated analytics and counts of patterns, though, not the raw code, so the security concerns could be less for Code Insights.
87+
88+
If desired, a Sourcegraph admin can enable Code Insights access to repositories that use sub-repo permissions in site config:
89+
90+
```json
91+
"experimentalFeatures": {
92+
"subRepoPermissions": {
93+
"enabled": true,
94+
"allowCodeInsights": true
95+
}
96+
}
97+
```
98+
99+
`allowCodeInsights` is `false` by default, preserving historical behavior.
85100

86101
## Feature parity limitations
87102

docs/code_insights/references/requirements.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ You can only use Code Insights on a [Docker Compose](/admin/deploy/docker-compos
1515

1616
## Code hosts
1717

18-
Sourcegraph Code Insights is compatible with any [Sourcegraph-compatible code host](/admin/repo/), except:
18+
Sourcegraph Code Insights is compatible with any [Sourcegraph-compatible code host](/admin/repo/).
1919

20-
* Perforce repositories making use of sub-repo permissions are not supported
20+
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.

0 commit comments

Comments
 (0)