-
Notifications
You must be signed in to change notification settings - Fork 906
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
Revert _local_exists
to mirror fsspec
behavior
#4186
Conversation
Signed-off-by: Deepyaman Datta <deepyaman.datta@utexas.edu>
Thanks for catching this, do we know why it was implemented in that way? That surely looks a bit weird to me and the change looks correct. |
I can't really figure out, beyond the commit I linked above; maybe you can figure out from the QB-internal Jira, if KED-715 still exists? |
That's as far as I can dig into. |
Found a bit more at here
I think this is the main reason, but as far as I remember this doesn't seem to work nicely when a versioned dataset blocked by an existing unversion dataset. |
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.
Since the old code pre-dates the use of fsspec
and all tests pass, I'm happy with merging this in 👍
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.
I didn't find anything alarming in the old issues/PR as well, let's trust our tests and if it breaks we know what regression tests are needed.
Description
The current implementation of
_local_exists
is different from how theexists
method exposed byfsspec
implementations works, in that it checks parent directories. This prevents the code path from reachingNotADirectoryError
(e.g. if you try saving a versioned dataset on top of an unversioned one), resulting in a different/inconsistent error message from one of thefsspec
-based dataset implementations.Development notes
This essentially reverts a very old change in b0581f1, which predates
fsspec
use.Existing dataset implementations (usually?) define their own
exists_function
usingfsspec
, so this doesn't normally get hit.I ran into this while trying to implement basic versioning of
ibis.FileDataset
, because thetest_versioning_existing_dataset
was failing with a different error message than one would expect (due to the above note onNotADirectoryError
).Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file