Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Operator::list broken #5127

Closed
1 task
ghost opened this issue Sep 19, 2024 · 4 comments
Closed
1 task

bug: Operator::list broken #5127

ghost opened this issue Sep 19, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@ghost
Copy link

ghost commented Sep 19, 2024

Describe the bug

list the local fs dir the result is wrong,

for example, there is a folder a, in folder there is a file b.txt, so the b's path is a/b.txt
when i list the folder 'a/' , it should return only 'b.txt'

but the result is ['a', 'b.txt']

Steps to Reproduce

setup operator as local fs, than call operator.list

Expected Behavior

same as 0.49

Additional Context

No response

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.
@ghost ghost added the bug Something isn't working label Sep 19, 2024
@Xuanwo
Copy link
Member

Xuanwo commented Sep 19, 2024

Hi, as mentioned in https://github.com/apache/opendal/releases/tag/v0.50.0, it's an expected breaking change of list behavior to align with storage services and make it possible to implement version support.

@Xuanwo Xuanwo added documentation Improvements or additions to documentation and removed bug Something isn't working labels Sep 19, 2024
@Xuanwo
Copy link
Member

Xuanwo commented Sep 19, 2024

By the way, our expectation is to return ["a/", "a/b.txt"]. Getting a result like ["a", "b.txt"] indicates a bug. Does opendal return data in this way?

@ghost
Copy link
Author

ghost commented Sep 20, 2024

By the way, our expectation is to return ["a/", "a/b.txt"]. Getting a result like ["a", "b.txt"] indicates a bug. Does opendal return data in this way?

nope, it's my mistake, just demo

i think, if the api have breaking changes, such as this scene, the api return type changes should be ok

for example, return a tuple (Entry, Vec), The downstream can promptly detect the changes.

@Xuanwo
Copy link
Member

Xuanwo commented Sep 20, 2024

Thank you for the suggestions. We will enhance the documentation to clarify this change.

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant