Skip to content

fix: ensure storage_url has trailing slash to prevent warning - #1367

Merged
o-santi merged 1 commit into
supabase:mainfrom
rylena:fix-storage-url-trailing-slash-1360
Feb 3, 2026
Merged

o-santi merged 1 commit into
supabase:mainfrom
rylena:fix-storage-url-trailing-slash-1360

Conversation

@rylena

@rylena rylena commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

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:

Storage endpoint URL should have a trailing slash.

Solution

Changed both sync and async clients to use joinpath("storage", "v1", "") instead of joinpath("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

  • Modified src/supabase/src/supabase/_sync/client.py line 83
  • Modified src/supabase/src/supabase/_async/client.py line 84

cc @olirice @silentworks for review

Summary by CodeRabbit

  • Bug Fixes
    • Fixed storage URL formatting to ensure consistent trailing slash handling across endpoints.

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/).
@coderabbitai

coderabbitai Bot commented Feb 3, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This 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 joinpath() call, ensuring the storage URL format matches what the storage3 library expects.

Changes

Cohort / File(s) Summary
Storage URL Configuration
src/supabase/src/supabase/_async/client.py, src/supabase/src/supabase/_sync/client.py
Added trailing slash to storage_url by appending empty path segment to joinpath() call, resolving storage3 library initialization warning.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding a trailing slash to the storage_url to prevent a warning from the storage3 library.
Linked Issues check ✅ Passed The pull request fully addresses issue #1360 by modifying both sync and async client files to append an empty path segment, ensuring storage_url ends with a trailing slash as required.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the storage_url trailing slash issue; no unrelated modifications or out-of-scope changes are present.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • ✨ 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@o-santi
o-santi merged commit 4267ff1 into supabase:main Feb 3, 2026
41 checks passed
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 21635830426

Warning: 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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.142%

Totals Coverage Status
Change from base Build 21405510096: 0.0%
Covered Lines: 8952
Relevant Lines: 9822

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storage endpoint URL warning due to missing trailing slash

3 participants