Skip to content

improve storage protocol detection#8513

Merged
Light2Dark merged 4 commits intomainfrom
sham/improve-storage-protocol-detection
Mar 3, 2026
Merged

improve storage protocol detection#8513
Light2Dark merged 4 commits intomainfrom
sham/improve-storage-protocol-detection

Conversation

@Light2Dark
Copy link
Collaborator

📝 Summary

Checks the endpoint URL to see if a more specific protocol can be found

image

🔍 Description of Changes

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@Light2Dark Light2Dark requested a review from manzt as a code owner February 28, 2026 05:15
@vercel
Copy link

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Mar 3, 2026 3:44pm

Request Review

Copy link
Collaborator

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Just a minor nit re: protocol matching.

"""Detect the storage provider from an endpoint URL."""
url = url.strip().lower()
for pattern, protocol in _URL_PATTERNS:
if pattern in url:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This substring matching seems fragile. A URL like s3.cloudflare.com would match "s3" if the order changed, right? Maybe we consider matching against the hostname only, or using more specific patterns? Or document the expected behavior in tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added to tests and a comment that the order matters. I agree, but I don't have much data to infer what the urls would look like 🤔, so opted for the simpler approach.

@Light2Dark Light2Dark force-pushed the sham/improve-storage-protocol-detection branch from aad64b0 to 5dca8a8 Compare March 3, 2026 15:43
@Light2Dark Light2Dark merged commit ad9a0d6 into main Mar 3, 2026
43 of 47 checks passed
@Light2Dark Light2Dark deleted the sham/improve-storage-protocol-detection branch March 3, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants