codeintel: Call ResolveRev to distinguish gitserver errors
Created by: efritz
The gitserver client used for codeintel does not currently distinguish a failing git command from a bad object response, which is common in codeintel as we keep references to commits which may become unreachable.
This simply adds a ResolveRev
call after each failing command that supplies a specific revision. This should return the correct error now as the output is parsed from this function correctly.
Filing https://github.com/sourcegraph/sourcegraph/issues/16933 to keep track of the debt that is this package.
Merge request reports
Activity
Created by: efritz
@slimsag Updated so that we only perform an extra requests on the error path. We had discussed on slack about checking stderr, but there were too many combinations that I was comfortable hard coding, and I think this is a good middle ground.
This should not add non-trivial traffic to gitserver.
Created by: codecov[bot]
Codecov Report
Merging #16934 (5132822) into main (a46774b) will decrease coverage by
0.00%
. The diff coverage is0.00%
.@@ Coverage Diff @@ ## main #16934 +/- ## ========================================== - Coverage 52.27% 52.26% -0.01% ========================================== Files 1699 1699 Lines 84122 84130 +8 Branches 7603 7603 ========================================== - Hits 43973 43969 -4 - Misses 36270 36280 +10 - Partials 3879 3881 +2
Flag Coverage Δ *Carryforward flag go 51.34% <0.00%> (-0.02%)
integration 29.77% <ø> (ø)
Carriedforward from 9259b83 storybook 28.68% <ø> (ø)
Carriedforward from 9259b83 typescript 54.43% <ø> (ø)
Carriedforward from 9259b83 unit 35.10% <ø> (ø)
Carriedforward from 9259b83 *This pull request uses carry forward flags. Click here to find out more.
Impacted Files Coverage Δ enterprise/internal/codeintel/gitserver/client.go 29.92% <0.00%> (-1.38%)
...rise/internal/codeintel/gitserver/observability.go 0.00% <0.00%> (ø)
.../internal/codeintel/resolvers/graphql/locations.go 79.38% <0.00%> (-4.13%)