-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix asset update/deletion when associated with zarr #1338
Conversation
It seems this is still failing for some reason. Investigating... |
@jwodder I can no longer reproduce this error locally, using your MVCE. I was originally able to, but it seems that inexplicably (no local code changes), those now succeed. I've also reset my local DB to no avail. Yet, they still fail in CI. Would #1339 fix this issue? Even the master tests fail, so it would seem the answer is no, but I'm not totally sure on the inner-workings of those tests. Are you still able to reproduce this locally (with the changes from this branch)? |
@AlmightyYakob Testing locally:
Note that the CLI integration tests here currently use the master branch of dandi-archive regardless of what PR is being tested. Once #1339 and dandi/dandi-cli#1141 are merged, the tests will go back to using the current PR. |
I see, that makes sense now. Thanks! |
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.
One question about using .iterator()
, but this LGTM. I do think that it's not ideal to have to delete and recreate the asset paths on zarr ingest, but this seems more like a flaw in the overall design of Zarr/how we kind of consider zarrs Assets
, but not really in some places.
are we talking about paths within zarr, ie thousands of them? do you have an estimate of runtime necessary to delete and add e.g. 200k paths? |
No, we don't store the paths within zarr files. This is referring to all of the assets that point to zarrs. Zarrs have to be handled differently here, since zarr ingestion can update the asset size, yet subverts the normal asset update process. |
eaace9f
to
177f955
Compare
🚀 PR was released in |
Closes #1336
The reported issue was caused by the following:
This PR updates the
ingest_zarr_archive
task to delete all asset paths that are associated with the zarr, and then re-add them after the ingestion is finished. This is essentially the same process as updating an asset path (path deletion and immediate addition), but with zarr ingestion in the middle.