turbo
39345847 - fix: Send User-Agent header with cache analytics events (#14994)

Commit
6 hours ago
fix: Send User-Agent header with cache analytics events (#14994) ### Description Fixes #14993. `POST /v8/artifacts/events` was the only Remote Cache request sent without a `User-Agent` header. It is also the only caller of `APIClient::create_request_builder`, which never set the header, even though its preflight asks for `User-Agent`. Bot protection such as Cloudflare Bot Fight Mode rejects requests from datacenter networks that have no User-Agent, so CI runs never reported cache events. `create_request_builder` now sets `User-Agent` the same way the artifact methods do. ### Testing Instructions `test_record_analytics_sends_user_agent` in `crates/turborepo-api-client/src/analytics.rs` sends events to a mock server that matches only requests with the expected User-Agent. The test fails without the fix and passes with it.
Author
Parents
Loading