quiltdata / quilt

Quilt is a data mesh for connecting people with actionable data
https://quiltdata.com
Apache License 2.0
1.33k stars 90 forks source link

Allow root folders named '/' #4206

Closed drernie closed 6 days ago

drernie commented 3 weeks ago

Not recommended, but totally possible to create them.

% aws s3 cp README.md s3://example-bucket//
upload: ./README.md to s3://example-bucket//README.md
ernest@c-208-82-100-121 nf-quilt % python Python 3.12.4 (main, Jun 25 2024, 14:04:15) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import quilt3 as q3 p = q3.Package() p.set_dir(".","s3://example-bucket//") Traceback (most recent call last): File "", line 1, in File "/Users/ernest/GitHub/quilt/api/python/quilt3/packages.py", line 885, in set_dir src = PhysicalKey.from_url(fix_url(path)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ernest/GitHub/quilt/api/python/quilt3/util.py", line 165, in from_url return cls(bucket, path, version_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ernest/GitHub/quilt/api/python/quilt3/util.py", line 143, in init assert not path.startswith('/'), "S3 paths must not start with '/'" ^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: S3 paths must not start with '/'