Repository navigation
Studio: browse temporary Linux mounts under /media and /mnt - #10048
Conversation
The model folder picker only auto-discovered udisks volumes at /run/media/<user>/<volume>. Ubuntu still automounts at /media and many users mount extra disks at /mnt without fstab. Include those roots in the browse allowlist and chips (unslothai#9818).
1dfaf0f to
34c717e
Compare
Keep mount-root discovery for the folder picker. /media and /mnt are not on the scan-folder denylist, so the extra predicates were unused.
Document-folder policy only consults this helper when the matched sensitive root is /run. /media and /mnt browse roots stay in Python.
|
Review record for #10048, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#296. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
Summary
Fixes #9818
The model folder picker only allowlisted udisks volumes at
/run/media/<user>/<volume>. On Ubuntu, temporary USB and external drives usually appear under/media/<user>/<volume>,/media/<volume>, or/mnt/<name>, so browsing them returned 403 until the user set up an fstab entry.This change:
/media(user-scoped and legacy layouts) and named mounts under/mnt/run/media(managed accounts still browse only their workspace)/mediaentries symlink into/run/media.ssh,.aws, ...)/mntprobes so a stale network mount cannot stall the pickerTests
pytest studio/backend/tests/test_linux_external_media_paths.py studio/backend/tests/test_windows_external_drive_paths.py studio/backend/tests/test_browse_denylist.py studio/backend/hub/tests/test_model_services.pyBefore / after
Folder browser opened from Hub > Downloaded > Add folder > Browse locations, on a Linux host whose only extra mount is
/mnt/disks. Before,/mnt/diskshas no quick-pick chip and browsing it returns 403; after, the chip appears and browsing it returns 200.