fix: handle new tenant api key#3929
Merged
Merged
Conversation
Pull Request Test Coverage Report for Build 16590601734Details
💛 - Coveralls |
hf
approved these changes
Jul 29, 2025
3 tasks
avallete
added a commit
that referenced
this pull request
May 11, 2026
## Summary - Removes the 10s `http.Client.Timeout` from `NewServiceGateway` and `NewKongClient` so streaming storage uploads no longer fail with `Client.Timeout exceeded while awaiting headers` under load. - The cap was inherited from the tenant-API health-check client when `NewServiceGateway` was extracted in #3929; it was never chosen for storage uploads. The active client for local seed (`newLocalClient` → `NewKongClient`) carries the same anti-pattern, so both are addressed. - Connection setup is still bounded by the default transport's dial / TLS-handshake timeouts, and per-call deadlines continue to flow through the request `Context`. Fixes [CLI-1441](https://linear.app/supabase/issue/CLI-1441/storage-uploads-can-time-out-after-10-seconds). ## Why `http.Client.Timeout` covers dial + send + waiting for response, so a single small upload taking >10s for the server to ack would surface as a hard failure. `supabase seed buckets --linked` already worked because `newRemoteClient` overrides the gateway client with `http.DefaultClient` (no timeout); the local path through Kong did not. ## Test plan - [x] `go test ./internal/utils/tenant/ ./internal/storage/client/ ./internal/status/` (all pass) - [x] `go vet` clean for both touched packages - [ ] Manual repro: re-run the proxy-delay scenario from the issue and confirm the upload completes instead of timing out at 10s. --- _Generated by [Claude Code](https://claude.ai/code/session_01QFScBK1kF6twDYjraZ2hQm)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix
What is the new behavior?
CLI should prefer new api key over legacy ones.
Additional context
Add any other context or screenshots.