This looks like a bug: S3 folder structure ```<s3...
# ask-metaflow
b
This looks like a bug: S3 folder structure
Copy code
<s3://bucket/log/test.txt>
<s3://bucket/log_other/other.txt>
Copy code
with S3(s3root="<s3://bucket/log/>") as s3:
  paths = s3.list_recursive()
paths
will include
other/other.txt
. Not only an invalid path but also under the wrong prefix.
s3.list_paths()
will correctly only return
test.txt
Am I misunderstanding the API here?
s
looks like a bug. @brainy-truck-72938 can you look into this?
👀 1
b
Just to add more info: This only happens if the second key "shares" a part of the prefix with the first so:
Copy code
<s3://bucket/log/test.txt>
<s3://bucket/log_other/other.txt> # will be included in list_recrusive with s3root=<s3://bucket/log/>
<s3://bucket/something/other.txt> # will not be included in list_recursive with s3root=<s3://bucket/log/>
👀 1
Are you able to re-produce the issue @freezing-telephone-6958? Can I offer help in any way?
f
Hi, I will get back to you by EOD
👋 1
b
Any luck @freezing-telephone-6958? Let me know if it would be better for me to make a github issue or something
b
Hi @brave-fall-84099 extremely sorry, I was pre-empted by other things, let me try to take a look today. But yes, feel free to open a github issue as well.
b
No worries at all, if you are not annoyed I am happy to check-in here once in a while 🙂
👍 1