This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Commit 98ba21d
authored
[Backport 5.1]: Allow for null revision resolver when using repo embeddings job's empty revision string (#54881)
This [PR](https://github.com/sourcegraph/sourcegraph/pull/54804) fixed
an issue with job scheduling/execution in the backend. The interim fix
of this PR relies on allowing for empty string `revision` values written
with a repo embedding job when the repo is empty or some other issue
occurs when fetching the repo's default branch (e.g. empty repo).
Empty revision value causes issues with graphql query repoEmbeddingJobs
when [querying for
Revision](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/client/web/src/enterprise/site-admin/cody/backend.ts?L32-35)
as our site admin jobs panel does.
`Panic occurred: runtime error: slice bounds out of range [:7] with
length 0`
This PR updates the embedding job resolver to consider empty revision
string acceptable and not call constructor for git commit resolver. Also
site admin jobs list will now show repo name if repo is non-null and
revision is null.
Backport of https://github.com/sourcegraph/sourcegraph/pull/548791 parent 55ca3f7 commit 98ba21d
File tree
2 files changed
+10
-1
lines changed- client/web/src/enterprise/site-admin/cody
- enterprise/cmd/frontend/internal/embeddings/resolvers
2 files changed
+10
-1
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
218 | 224 | | |
219 | 225 | | |
| 226 | + | |
220 | 227 | | |
221 | 228 | | |
222 | 229 | | |
| |||
0 commit comments