Draft: Add per-request timeout for CI config file fetching
What does this MR do and why?
To reduce the blast radius during infrastructure incidents, the proposal is to introduce static per-request timeouts for individual external calls during CI config fetching. This won't prevent pipeline failures during incidents, but it would make them fail fast instead of holding Sidekiq workers for up to 30 seconds, reduce resource consumption, give users quicker feedback to retry, and make failures easier to correlate with infrastructure metrics.
Add separate per-request timeouts for Gitaly and HTTP calls when fetching CI configuration files (local, project, component, and remote includes). This helps isolate slow or stuck requests from affecting the overall pipeline creation timeout.
- Add GITALY_TIMEOUT_SECONDS (default 10s) for Gitaly-based includes
- Add HTTP_TIMEOUT_SECONDS (default 15s) for remote includes
- Introduce ci_config_gitaly_timeout and ci_config_http_timeout feature flags (beta, disabled by default)
- Log timeouts with project context for debugging
- Include descriptive error messages for users
References
Related to #588313
Screenshots or screen recordings
TODO
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.