config: Rewrite public GitLab URLs to the internal endpoint

GitLab has been placed behind a CDN. The artifacts config files (artifacts.yaml / artifact_config.yaml) are hand-edited by users who only know the public https://gitlab.wikimedia.org URL, but blunderbuss reaches GitLab through its internal endpoint (https://gitlab.discovery.wmnet:8443): this avoids the CDN robot policy and keeps the blunderbuss -> GitLab NetworkPolicy from having to allow every CDN node.

Rather than push that detail onto every user, normalize the URLs when the config is parsed. parse_configs() is the single choke point through which all artifact config files flow during cache warmup, so rewriting there covers both artifact source base_uri fields and per-artifact id URLs, wherever they appear in the tree. The rewrite is idempotent, so files that already use the internal endpoint are unaffected.

Bug: T435292 Assisted-by: Claude Opus 4.8

Closes T435292

Merge request reports

Loading