Open satra opened 2 years ago
@satra I don't believe the "name"
field is required to reflect the asset path. It's just an arbitrary label assigned by the client when the Zarr is created, and currently the client uses the asset path as that label.
the name is required when POST
ing a zarr, so if i change the name as i did, and try to POST
a zarr with the new name, it will create a new zarr id. whereas, if this name was adjusted to reflect the change of path, then it would simply raise an exception that the zarr id exists.
the name
is thus important during the creation of a new zarr.
i agree that the name
field is arbitrary, but i can't change it when i change the path of the associated zarr, which leads to the creation of new zarr if i'm not careful.
the name is required when
POST
ing a zarr, so if i change the name as i did, and try toPOST
a zarr with the new name, it will create a new zarr id. whereas, if this name was adjusted to reflect the change of path, then it would simply raise an exception that the zarr id exists.the
name
is thus important during the creation of a new zarr.
I am a little confused by this. How did you change the name of the zarr, and why was a subsequent POST
needed? Indeed, I would expect any POST
to create a new zarr--if instead you wanted to change the metadata (or other aspects) of an existing zarr (e.g., one whose name was changed), I would expect that to require a PUT
operation instead. (But this is why I'm asking how you were able to change a zarr's name, and what that second POST
was for.)
i agree that the
name
field is arbitrary, but i can't change it when i change the path of the associated zarr, which leads to the creation of new zarr if i'm not careful.
Probably answering my other questions will answer this one, but how does changing the path of a zarr lead to the creation of a new zarr? And above you said you changed the name, but here you are saying you changed the path. Sorry for all the questions 😸 but I want to understand what went wrong here, and how, and what expectations of yours were violated by this situation.
(But this is why I'm asking how you were able to change a zarr's name, and what that second POST was for.)
i could not change the name (since PUT is unavailable), hence it created a new zarr.
how does changing the path of a zarr lead to the creation of a new zarr?
locally a file changes path/name. there is now no longer an association between the new path and any zarr object in db, since zarr objects are keyed by dandiset + name. thus the CLI can't find an existing zarr and creates a new zarr object.
this thread is about the life-cycle of zarrs, so let's dig into it:
the solution to this issue would have been to simply add a PUT request such that doing a dandi move can also update the name, but the severity at this point is less because all the zarr blob names were modified in place to be ome.zarr.
this is a fairly critical bug since i renamed every single ngff file in the archive. especially since we currently have a one to one mapping between zarr id and asset, this should not have happened. alternatively, it should store multiple associations.
here is the updated asset with the
.ome.zarr
extensionhttps://api.dandiarchive.org/api/dandisets/000108/versions/draft/assets/044dfda2-1bef-414a-8e8c-1e5118ffe6e7/
but doing this still returns the old name
response