Username does not get propagated to Gitaly from CI jobs when project is public

We observed that the Gitaly unauthenticated concurrency limiter was causing pipeline job failures for the gitlab-org/gitlab project. We saw that the username metadata field was not being propagated all the way to Gitaly from Workhorse via the $CI_JOB_TOKEN.

What's interesting is that during testing on GDK, when a CI job is run on a private project, the username does get propagated all the way to Gitaly. But, when the same project is set to public visibility, the username no longer appears to get propagated to Gitaly.

Edited by 🤖 GitLab Bot 🤖