Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle ReportChanges will increase total bundle size by 52 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: marimo-esmAssets Changed:
Files in
|
Contributor
There was a problem hiding this comment.
Pull request overview
Addresses an edge case in fsspec directory listings where some backends can return the queried directory itself as a child entry (often due to stale listing caches), which can cause recursive “folder contains itself” trees in the storage inspector UI.
Changes:
- Backend: detect self-entry echoes in
FsspecFilesystem.list_entries, invalidate relevant fsspecdircachekeys, retry once, and finally filter exact self-entries. - Tests: add coverage for the retry-on-self-entry and exact-self-entry filtering behavior.
- Frontend: update generated
GoogleDriveFileSystem(...)snippet to setuse_listings_cache=False.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/_data/_external_storage/test_storage_models.py | Adds tests for retrying and filtering when a self-entry is returned by ls(). |
| marimo/_data/_external_storage/storage.py | Implements self-entry detection, cache invalidation + retry, and final filtering for fsspec listings. |
| frontend/src/components/editor/connections/storage/as-code.ts | Updates generated Google Drive connection code to disable listing cache. |
| frontend/src/components/editor/connections/storage/tests/snapshots/as-code.test.ts.snap | Updates snapshots to reflect the new generated Google Drive code. |
mscolnick
approved these changes
Mar 25, 2026
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.21.2-dev55 |
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.
📝 Summary
Some fsspec backends can return the queried directory itself as a child entry when listings are from a stale parent cache.
Backend
We check if there is an exact match & only 1 returned result when doing
ls. If yes, invalidate cache, and trylsagain.The logic is intentionally simple to catch the simplest case, I've not seen more complex cases of this.
Frontend
Updated the generated GoogleDriveFileSystem(...) snippet to include
use_listings_cache=False, which wouldn't cause this issue in the first place.📋 Checklist