Repository navigation
fix: ensure storage_url has trailing slash to prevent warning - #1367
Conversation
Fixes supabase#1360 The storage_url was being constructed without a trailing slash, causing the storage3 library to print a warning message every time the storage client was initialized. Changed both sync and async clients to use joinpath with an empty string parameter, which ensures the URL ends with a trailing slash (e.g., https://example.supabase.co/storage/v1/).
📝 WalkthroughWalkthroughThis change adds a trailing slash to the storage endpoint URL in both the async and sync Supabase clients. The modification appends an empty path segment to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Failure to add the new IP will result in interrupted reviews. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pull Request Test Coverage Report for Build 21635830426Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Fixes #1360
Problem
The storage_url was being constructed without a trailing slash, causing the storage3 library to print a warning message every time the storage client was initialized:
Solution
Changed both sync and async clients to use
joinpath("storage", "v1", "")instead ofjoinpath("storage", "v1"). Adding an empty string parameter to joinpath ensures the URL ends with a trailing slash (e.g.,https://example.supabase.co/storage/v1/).Changes
src/supabase/src/supabase/_sync/client.pyline 83src/supabase/src/supabase/_async/client.pyline 84cc @olirice @silentworks for review
Summary by CodeRabbit