Allow MemoryFileStore store copying from different a bucket#68
Open
GeorgeMattimoe wants to merge 1 commit intomainfrom
Open
Allow MemoryFileStore store copying from different a bucket#68GeorgeMattimoe wants to merge 1 commit intomainfrom
GeorgeMattimoe wants to merge 1 commit intomainfrom
Conversation
cgl
reviewed
Jul 25, 2023
Contributor
cgl
left a comment
There was a problem hiding this comment.
I think this is going along the right direction. I have a few comments left.
| return [self.get_key(path) for path in self.list_files(namespace=namespace)] | ||
|
|
||
| def copy(self, *, s3_object: S3Object, destination: str) -> S3Object: | ||
| source_bucket = self.buffers[s3_object.bucket_name] |
Contributor
There was a problem hiding this comment.
📚📚📚 Shall we add a docstring to the function?
| bucket_name=source_bucket_name, | ||
| key=source_key_path, | ||
| ) | ||
| destination = "a/b/c.pdf" |
Contributor
There was a problem hiding this comment.
🐼 Since the original key path is called source_key_path, shall we rename this as destination_key_path?
Contributor
There was a problem hiding this comment.
🐼 There is a nice PR description, shall we copy that as detailed explanatory text into the commit message?
Only truly trivial changes should have a one-line commit message, see: standard commit message format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prior to this PR it was not possible to copy a file from one bucket to another in the
MemoryFileStorelike what can be done with theS3FileStore. Because theMemoryFileStoredoesn't support copying a file from a different bucket, theMemoryFileStorecannot be used as an analogous replacement for the S3FileStoreThis change updates the
MemoryFileStorecopy method to allow copying from one bucket to another to match theS3FileStorebehaviour.