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
fs: temporarily disable prefix-based search for fsspec-implementations #6096
Conversation
# Clouds that implement the general methods that can be tested | ||
# for functional tests that require extensive apis (e.g traversing | ||
# via walk_files()) | ||
full_clouds = [ | ||
pytest.lazy_fixture(cloud) | ||
for cloud in ["s3", "gs", "azure", "ssh", "hdfs"] | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add these directly to test_pull_00_prefix
parametrization, since they are not used anywhere else.
# During the tests, for ensuring that the traverse behavior | ||
# is working we turn on this option. It will ensure the | ||
# list_hashes_traverse() is called. | ||
always_traverse = getattr(self.fs, "_ALWAYS_TRAVERSE", False) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit weird to amend the core code like that only for the tests. I guess this is a hint for an upcoming refactor of this part of code 🙁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmrowla Do you foresee this part being refactored to accommodate the test better? Maybe you have any suggestions?
Ok, let's merge and release, but discuss ^^^ Thank you! 🙏 |
This is a temporary fix for #6089. It disables the partial prefix (
00/0
) search optimization entirely for all fsspec implementations and does it in the regular way (with only listing the full path of00/
). This API is not actually supported to be optimized on the fsspec side so we will wait for all the clouds we support (s3, azure, google cloud) and then turn on the optimization (In theObjectFSWrapper
) this time with just fixing the customfind()
method in the subclass.