-
Notifications
You must be signed in to change notification settings - Fork 3.8k
GH-47348: [Python] Include retry_strategy in S3FileSystem.__reduce__ #47350
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
base: main
Are you sure you want to change the base?
Conversation
|
…uce__ method S3FileSystem's retry_strategy should survive serialization and deserialization. Signed-off-by: Kit Lee <[email protected]>
bd294f1
to
983021c
Compare
@github-actions crossbow submit -g python |
Revision: 983021c Submitted crossbow builds: ursacomputing/crossbow @ actions-19f6d98dfd |
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.
|
||
fs = S3FileSystem( | ||
retry_strategy=AwsDefaultS3RetryStrategy(max_attempts=5)) | ||
assert isinstance(fs, S3FileSystem) | ||
assert pickle_module.loads(pickle_module.dumps(fs)) == fs |
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.
Ok, but should also assert that it's different from a filesystem configured with another strategy.
Rationale for this change
This change fixes the serialization/deserialization of
S3FileSystem
. Previously theretry_strategy
parameter is missed in the serialization. This affects other distributed library like Ray to incorrectly reconstruct aS3FileSystem
with no retry_strategy parameter in other processes.What changes are included in this PR?
This PR adds
retry_strategy
inS3FileSystem.__reduce__
and a property method to allow access toretry_strategy
(a python object). SinceS3FileSystem
is a cdef class butAWSDefaultRetryStrategy
etc are not,object
type is used for simplicity.Are these changes tested?
Updated the unit tests to test for
retry_strategy
.Notably the
retry_strategy
property can be used to verify the correct reconstruction.Are there any user-facing changes?
No.