Repository navigation
Confirm NDI Cloud recorded every uploaded file; resend what it did not - #374
Merged
Merged
Conversation
…t (sync with NDI-matlab 63e56ae14) Port of VH-Lab/NDI-matlab#1297. A batch (zip) upload counted its files as uploaded once the zips reached S3 and the extraction job finished, but the server records each file in a later step that can fail unheard (a dataset lost 327 files this way, ndi-cloud-node#175). - ndi.cloud.upload.confirmFilesRecorded: wait while records keep arriving (stall_timeout, default 900 s, without progress), upload each file still unrecorded again one at a time, wait for those (resend_timeout, 300 s), report any still missing. wait_fcn/resend_fcn seams for tests. - uploadFilesForDatasetDocuments: verify_uploads (default True) and verify_stall_timeout. After 'batch' (files of batches zipForUpload already failed are not checked) and 'serial' (replacing the 120 s wait that failed without resending); files never recorded count as failed and their documents go into failed_document_ids. - Tests: test_cloud_upload_confirm_recorded (mirrors MATLAB's ConfirmFilesRecordedTest); test_cloud_upload_file_batches' fake server now answers record lookups and can drop files; batch resend, never recorded, failed-batch and opt-out cases. - Bridge: confirmFilesRecorded (new) and uploadFilesForDatasetDocuments synced to 63e56ae14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011v7R5rmThd1CWtGUX32qh7
…(sync with NDI-matlab 0be6cfed3) NDI-matlab CI found a zip of 10,165 small files (84 MB, under the 250 MB size cap) that NDI Cloud never recorded; resending them one at a time then did not finish in 40 minutes. - New preference Cloud.Upload.Max_File_Batch_Count (2000); zipForUpload ends a batch at count_limit files as well as at size_limit bytes. - confirmFilesRecorded: more than single_file_limit (20) unrecorded files are resent as zip batches via zipForUpload; after resending it waits while records keep arriving. resend_batch_fcn seam. - Tests: count cap and its preference, zip-batch resend, failed batch resend still waited for, resent files waited for, the default batch resend; preferences editor rows include the new item. - Bridge: zipForUpload, confirmFilesRecorded and preferences synced to 0be6cfed3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011v7R5rmThd1CWtGUX32qh7
This file contains hidden or 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
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.
Summary
Port of VH-Lab/NDI-matlab#1297.
A batch (zip) upload counted its files as uploaded once the zips reached S3 and the extraction job finished. The server records each file in a later step, and that step can fail without the client hearing of it. A dataset lost 327 files this way (Waltham-Data-Science/ndi-cloud-node#175). Since that fix the server leaves such files marked not uploaded; with this PR the client now checks.
New:
ndi.cloud.upload.confirmFilesRecorded.stall_timeoutseconds in which none was (default 900 s).resend_timeout, 300 s).wait_fcnandresend_fcnare seams for tests.uploadFilesForDatasetDocuments.verify_uploads(defaultTrue) andverify_stall_timeout.'batch'. Files in batches thatzipForUploadalready failed are skipped, since those are already reported.'serial', replacing the 120 s wait that failed without resending.failed_document_ids, so the sync index leaves them out.Bridge. New
confirmFilesRecordedentry;uploadFilesForDatasetDocumentsis synced to NDI-matlab63e56ae14(on the same-named branch).Testing
blackandruffare clean.tests/test_cloud_upload_confirm_recorded.pymirrors MATLAB'sConfirmFilesRecordedTest, with a scripted fake recording server:tests/test_cloud_upload_file_batches.py: the fake server now answers record lookups and can drop files. New cases:verify_uploads=Falseskips the check.Generated by Claude Code