This repository was archived by the owner on Sep 30, 2024. It is now read-only.
[Backport 5.1]: Allow for null revision resolver when using repo embeddings job's empty revision string #54881
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixed
an issue with job scheduling/execution in the backend. The interim fix
of this PR relies on allowing for empty string
revisionvalues writtenwith 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
as our site admin jobs panel does.
Panic occurred: runtime error: slice bounds out of range [:7] with length 0This 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/54879
Test plan
Tested on
main