Create better abstraction around proxy settings
Problem
In https://gitlab.com/gitlab-org/gitlab/-/issues/420334 we found that code suggestions were not working for a customer that was running GitLab behind a web proxy. Code suggestions, like other features such as accelerated downloads, require Workhorse to make an outgoing HTTP request to the AI gateway. If Workhorse is not configured to use the web proxy, these requests will fail with a TCP connection timeout error.
The core issue here is that customers must currently configure every GitLab component that may be making HTTP requests individually:
- gitlab-rails
- Workhorse
- Gitaly
- others?
This means that in gitlab.rb
(Omnibus), the admin must individually configure the http_proxy
and https_proxy
environment variables for each of these systems.
I see the existence of Workhorse and Gitaly as implementation details to how GitLab operates. Admins should not be concerned with how we decide to deliver HTTP work loads internally, be that through Workhorse or Rails. All they need to be concerned with is that GitLab as a product bundle is configured to use an HTTP(S) proxy.
Proposal
Provide a single settings element that globally configures HTTP(S) proxies and that applies to all subsystems that may be involved in HTTP traffic.