dandi upload: STATUS/MESSAGE for Zarr assets is uninformative
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Comienza con check_replace_asset() en dandi/upload.py y ZarrAsset.iter_upload() en dandi/files/zarr.py, comparando el comportamiento de omisión existente para activos que no son Zarr con los datos de diff de Zarr. Se considera terminado cuando los activos Zarr sin cambios informan skipped/file exists, mientras que los activos modificados exponen el mensaje y el tamaño correspondientes de carga, modificación o eliminación, incluido el comportamiento de parche de --zarr-mode.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
claude produced out of experience in
Summary
dandi upload reports uninformative and slightly misleading STATUS /
MESSAGE values for Zarr assets. Raised by @kabilar during review of
#1816 (see comment).
Observed behavior
1. Unchanged Zarr is reported as done / exists - reuploading
A dandiset whose local Zarr is bit-identical to the remote Zarr renders
as:
PATH SIZE ... STATUS MESSAGE
...atives/dandi-cli-1816-test/HG9_Z1_Y49.nii.zarr 5.9 GB ... done exists - reuploading
...where the same-hash short-circuit for a regular blob would render
skipped / file exists.
2. Modified Zarr uses the same non-descriptive message
After a local edit, the same asset renders done / exists - reuploading
with no indication of what changed — no distinction between additions,
deletions, and modifications, and no idea of the affected size (which
matters because the SIZE column reflects the whole-Zarr size, not the
delta).
Root cause
check_replace_asset() in dandi/upload.py:547-548 unconditionally
short-circuits Zarr assets:
if isinstance(local_asset, ZarrAsset):
return (True, {"message": "exists - reuploading"})
It never compares local vs remote, and never differentiates additions
from modifications from deletions. In contrast, the non-Zarr path at
dandi/upload.py:579-583 does perform an etag/mtime comparison and
returns skip_file("file exists") (i.e. STATUS=skipped) when the
local and remote copies match.
Proposed changes
Change 1 -- Detect unchanged Zarr and skip
For a ZarrAsset where the local tree matches the remote Zarr (e.g. by
comparing per-entry digests, or by comparing the aggregated Zarr
checksum), return skip_file("file exists") so that STATUS=skipped / MESSAGE=file exists, matching the non-Zarr case.
Note that the diff needed to decide "unchanged" is currently only
computed inside ZarrAsset.iter_upload() (dandi/files/zarr.py) after
Zarr registration. Two implementation choices:
(a) Do a cheap upfront comparison in check_replace_asset (e.g. via
per-entry digest listing) at the cost of an extra API round-trip
per asset.
(b) Let iter_upload yield an early skipped status once it has
computed the diff, and have the caller replace the initial
exists - reuploading marker. This avoids the upfront cost
but leaks knowledge about Zarr internals into the reporter.
Change 2 -- Describe what is changing
When a Zarr is changing, replace exists - reuploading with the
kind and size of the modification. @kabilar's proposed vocabulary:
file exists - uploading additional objects (N GB)file exists - deleting objects (N GB)file exists - modifying objects (N GB)
The relevant sizes are already tracked inside
ZarrAsset.iter_upload() via to_upload.total_size and the
per-entry sizes of to_delete
(dandi/files/zarr.py:655,728); they just aren't surfaced as
MESSAGE. This overlaps with implementation choice (b) above.
Interaction with --zarr-mode patch (from #1816)
Once #1816 lands, patch mode does not delete remote-only entries, so
"deleting objects" should not appear for --zarr-mode patch. The
choice of message per mode:
| Mode | Local == remote | Local adds only | Local modifies | Local also drops entries |
|---|---|---|---|---|
full (dflt) |
skipped |
- uploading … (N GB) |
- modifying … (…) |
- deleting … (…) |
patch |
skipped |
- uploading … (N GB) |
- modifying … (…) |
not applicable |
Scope
Orthogonal to #1816 -- misreport exists on master today. Filing
separately so #1816 can land on its current scope and this can be
picked up as a UX follow-up.
- Lenguaje dominante
- Python
- Estrellas
- 29
- Forks
- 37
- Merge medio
- 14 h 58 min
- PR fusionados (30 d)
- 15
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dandi/dandi-cli
-
pynwb metadata: get neurodata typesQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
dandi/dandi-cli#1920 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Log directory growing to untenable sizesQuizá libre de nuevo @CodyCBakerPhD la tomó hace 93 días y no hay ningún pull request abierto. Abierto
dandi/dandi-cli#1889 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de dandi/dandi-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[BUG] Multi-day events show "Ended" while still in progressPosiblemente ocupada @tarunagnihotri534 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
data-umbrella/du-event-board#231 · 2 comentarios ·
-
avl_automation: the generated control surface block isn't valid XML (typo in avl_out_parse.py)Posiblemente ocupada @brksol la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
PX4/PX4-gazebo-models#164 ·