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
DM-26378: Refactor S3/WebDAV datastores #355
Merged
Merged
Conversation
This file contains 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
This simplifies some usage in datastore passing in the root.
copy is always a good default and it's only posix that needs to be cleverer.
The bulk of the logic is in ButlerURI so there is no reason for the datastores dealing with remote resources to be special themselves. Currently backoff in S3 means that we have simple wrappers there. Ideally backoff should move to ButlerURI
We don't want a relative path to be given that jumps out of datastore.
Now uses generic ButlerURI so has no reason to be specific to a particular datastore backend.
Datastore no longer needs to know what "auto" transfer means and it is best to leave it to ButlerURI unless we have the special case of the files all being within datastore.
We special case file because we can ask directly whether we have a directory. Remove special S3/HTTP logic and instead defer to ButlerURI
n8pease
reviewed
Aug 19, 2020
n8pease
reviewed
Aug 20, 2020
if len(serializedDataset) != storedFileInfo.file_size: | ||
raise RuntimeError("Integrity failure in Datastore. " | ||
f"Size of file {location.path} ({len(serializedDataset)}) " | ||
f"does not match recorded size of {storedFileInfo.file_size}") |
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 recently added a function unwrap
to lsst.daf.butler.cli.utils
. Using it with one triple-quoted string might be more useful than many strings? It could be moved to a more general utils file.
raise RuntimeError(unwrap(f"""Integrity failure in Datastore.
Size of file {location.path} ({len(serializedDataset)})
does not match recorded size of {storedFileInfo.file_size}""")
n8pease
reviewed
Aug 20, 2020
just a couple comments, looks good. |
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.
Implements a remote datastore entirely in terms of ButlerURI so there is now no special datastore for S3 or WebDAV (apart from the stub classes).
cc/ @bgounon