Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export const RepoEmbeddingJobNode: FC<RepoEmbeddingJobNodeProps> = ({
<Link to={`${repo.url}@${revision.oid}`}>
{repo.name}@{revision.abbreviatedOID}
</Link>
) : repo ? (
<>{repo.name}</>
) : (
<div>Unknown repository</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,16 @@ func (r *repoEmbeddingJobResolver) Revision(ctx context.Context) (*graphqlbacken
if err != nil {
return nil, err
}
if repoResolver == nil {

// An empty revision value can accompany a valid repository if gitserver cannot resolve the default branch or latest revision during job scheduling.
// The job will always fail in this case and must be displayed in site admin despite the gitserver error.
// Site admin will only provide the job's failure_message in this case.
invalidRevision := r.job.Revision == ""

if repoResolver == nil || invalidRevision {
return nil, nil
}

return graphqlbackend.NewGitCommitResolver(r.db, r.gitserverClient, repoResolver, r.job.Revision, nil), nil
}

Expand Down