-
Notifications
You must be signed in to change notification settings - Fork 13
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
Better S3 Support for MagViews #1278
base: master
Are you sure you want to change the base?
Conversation
…o better_s3_mag_views
) | ||
) | ||
or (endpoint_url := path.storage_options.get("endpoint_url", None)) | ||
or (endpoint_url := os.environ.get("S3_ENDPOINT_URL", None)) |
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.
Check whether this is required, would be better to always infer endpoint_url from UPath.
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 think we should rely on the UPath
@normanrz @markbader I think we should discuss this PR. The proposed solution changes/redefines the behavior of Maybe we should discuss what the expected behavior should be and how to create a new dataset layer with some (not all) of its mags pointing to mags of other (remote) datasets? |
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.
In general, I am not opposed to this change. We just need to make sure it works in both wklibs and vx.
) | ||
) | ||
or (endpoint_url := path.storage_options.get("endpoint_url", None)) | ||
or (endpoint_url := os.environ.get("S3_ENDPOINT_URL", None)) |
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 think we should rely on the UPath
@@ -780,6 +787,7 @@ def create(cls, path: Path, array_info: ArrayInfo) -> "Zarr3Array": | |||
], | |||
}, | |||
"create": True, | |||
"open": True, |
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.
Hmm?
if maybe_layer_path and is_remote | ||
else self.dataset.path / self.name | ||
) | ||
return self.dataset.path / self.name |
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.
Have you checked the usages of Layer.path
in wklibs and vx?
self._properties.mags.append( | ||
MagViewProperties( | ||
mag=mag_view.mag, | ||
path=str(mag_view.path), |
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.
Just casting str(..)
probably doesn't work, because wk expects a different syntax for S3 paths, i.e. s3://{endpoint_url/{bucket_name}/{prefix}
instead of s3://{bucket_name}/{prefix}
Description:
layer.path
from the paths of the layer's mags, which leads to problems for layers with both remote and local magslayer.path
to always bedataset_path / layer.name
Todos:
Make sure to delete unnecessary points or to check all before merging: