fix(fs): Use autocommit
value from signature instead of computing it
#334
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Unlike fsspec's base class, which infers the value of
autocommit
from the kwargs and, if necessary, from the current transaction state, we keepautocommit
as an explicit named keyword argument in our signature ofLakeFSFileSystem.open()
.Previously, this value was unused, and the keyword arguments would never contain autocommit due to name collision, so we implicitly autocommitted files if and only if we were not in a transaction. This change makes the file committing strategy configurable, and defaults to
True
.Please review. In its current state, it is probably wrong, since this means we would also autocommit files in a transaction if the
autocommit
keyword is not explicitly set toFalse
.The opposite choice, which is to remove
autocommit
from the named keyword arguments and keeping the value computation, is probably better for our transaction logic, but would make the autocommit config option more opaque.