Skip to content

Workhorse returns 500 when Gitaly returns NotFound on a InfoRefsUploadPack call originating from a GET git-upload-pack call

Summary

Workhorse incorrectly returns a 500 status code when a GET git-upload-pack call ends in a repository not found error (GRPC code NotFound) from Gitaly.

Steps to reproduce

GitLab version: 17.1.4

Example Project

What is the current bug behavior?

When the gitaly service SmartHTTPService using the GRPC method InfoRefsUploadPack does not find the repository for a GET git-upload-pack call, workhorse returns a 500.

What is the expected correct behavior?

Workhorse should return status 404.

Relevant logs and/or screenshots

Log sample from a correlation id:

Screenshot_2024-08-14_at_4.48.04_PM

Output of checks

Dedicated environment

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

see: https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/incident-management/-/issues/349#note_2045191101

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Found in confidential issue: https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/incident-management/-/issues/349#note_2045189533

Possible fixes