WriteRef error resolving new revision: reference not found should return a `NotFound` GRPC code instead of `Internal`
Corrective action for https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/incident-management/-/issues/91
At present, when WriteRef
returns a resolving new revision: reference not found
error (https://gitlab.com/gitlab-org/gitaly/-/blob/master/internal/gitaly/service/repository/write_ref.go#L61) it returns the GRPC status code of Internal
.
Proposal
Internal
errors are treated as 5xx-like error state SLIs (server errors) and count towards the service error budget, whereas NotFound
GPRC codes are treated as 4xx-like client side errors, and don't count towards the service error budget.
In this case, the resolving new revision: reference not found
is the result of an upstream bug in Geo (gitlab#427493 (closed)) but should not result in a Gitaly SLO alert. Gitaly is running fine and the only error is upstream.