You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Fixes the `Network is unreachable (os error 101)` failure observed on par-msl/jarvis E2E (Sandcastle workflow 1130403506487189108) where gitimport's hyper-openssl HTTPS client tried to reach `github.com:443` directly from a Sandcastle worker. Workers can't route external traffic without going through `http://fwdproxy:8080` — git/curl auto-pick up `https_proxy` env, but Rust hyper-openssl does not.
The GitHub LFS Batch client now wraps its `HttpsConnector` in `hyper_proxy2::ProxyConnector` so each batch POST / signed-URL GET tunnels through the proxy via HTTP CONNECT before the TLS handshake to github.com runs over that tunnel.
**Default**: `http://fwdproxy:8080` (Meta's prod forward proxy). Reaching github.com from any Meta host requires this, so making it the default avoids the footgun of "I forgot to pass --github-lfs-https-proxy and now my run fails after 5 minutes of LFS retries". Override via `--github-lfs-https-proxy <URL>` for a different proxy, or pass `--github-lfs-no-https-proxy` to disable entirely (useful for OSS / outside-Meta runs where github.com is directly reachable).
Implementation notes:
- New `build_github_https_client(proxy_url: Option<String>)` returns `Client<ProxyConnector<HttpsConnector<HttpConnector>>, _>`. `GitHubLfs.client` type changes accordingly. The other LFS modes (Upstream, Internal) are untouched — they talk to intra-DC endpoints and don't need a proxy.
- `from_proxy_unsecured(inner, proxy)` is used because fwdproxy is plain `http://`; the inner `HttpsConnector` still handles TLS to the actual target after CONNECT establishes the tunnel.
- `Intercept::None` (used when proxy is `None`) keeps a single client type whether or not a proxy is configured — avoids a sum type on the client field. Dummy `http://unused.invalid` URI is required by the API but never dialed.
- Both new flags require `--github-lfs-url` (clap `requires`), matching the existing `--github-lfs-token-file` constraint.
- CLI surface: `--github-lfs-https-proxy <URL>` (default `http://fwdproxy:8080`) + `--github-lfs-no-https-proxy` (bool, opt-out).
WWW Sandcastle (`SandcastleGithubMirrorSyncCommand`) doesn't need any change — the default kicks in automatically.
Reviewed By: lmvasquezg
Differential Revision: D106645417
fbshipit-source-id: 8055238d474ddf9f16b821c5515c17940928b006
0 commit comments