fix(auth): honor an explicit zero GCP metadata timeout (#2481)
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested `gcpIDTokenProvider` computes its metadata request timeout with `config?.timeout || 10_000`, so an explicit `timeout: 0` is silently replaced with 10,000 ms. The Azure IMDS provider in the same file uses `config?.timeout ?? 10_000` for the identically documented option, so the two providers currently behave differently for the same configuration. This change switches the GCP provider to the nullish coalescing the file already uses for Azure, and adds explicit-zero regression tests for both providers in `tests/auth/subject-token-providers.test.ts` (mocked fetch, no live network; the Azure test is a parity control pinning the already-correct behavior). Verified locally (Node 24.18.0): the GCP regression fails on `main` (the single `setTimeout` call receives `10000` instead of `0`) and passes with this change; the provider test file passes 14/14; lint, build, and the full test suite pass apart from the two pre-existing macOS-only failures addressed in #2480. ## Additional context & links One-line production change; the only other `config?.timeout` default in the file already used `??`.
M
Morgan Carr committed
7a9dec833c0b0e8767c994e71babf91836b1bb5d
Parent: 6992683
Committed by GitHub <noreply@github.com>
on 8/26/2026, 5:44:27 PM