Fetching private data with Repo Rules and MODULE Extensions
summary
Manages authenticated HTTP fetches via Bazel repository rules and MODULE extensions, implementing downloads through the Bazel downloader, reusing a repository cache that is content‑addressable to avoid repeated network fetches, and delegating auth to a credential helper that consumes a URL on stdin and returns headers on stdout. Also shows the remote downloader option (drpc or Unix domain socket) for proxying requests and cites the open‑sourced Rules GCS implementation as a working example that saves disk space and time.
AI-written summary · about
chapters (10)
- 0:00Private data fetching matters
- 1:47Hardcoded solutions problems
- 3:15Repository rules for fetching
- 4:42HTTP Archive Rule implementation
- 6:07Bazel Downloader advantages
- 7:12Repository cache efficiency
- 7:55Remote downloader for proxies
- 8:37Credential helper for private repos
- 9:20Dynamic URL rewriting
- 9:42Best practices and tools
related talks
29mFetchcode A smart code downloader
07mHow we build without the public internet
47mSetting Up Your Own Private, Secured Package Repository - Why and How
12mHow Uber Manages Go Dependencies with Bzlmod
33mTools of the Trade
37mEstablishing a Baseline: Repo Metrics, Ma...
38mGo Module Proxy: Life of a Query
29mVirtual Mono-Repo & Bazel
