-
Couldn't load subscription status.
- Fork 78
fix(FR-1501): fix file upload status tracking and error handling #4412
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
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.66% | 532/11416 |
| 🔴 | Branches | 3.77% | 302/8008 |
| 🔴 | Functions | 2.88% | 102/3544 |
| 🔴 | Lines | 4.61% | 514/11157 |
Test suite run success
121 tests passing in 14 suites.
Report generated by 🧪jest coverage report action from d79efea
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.
Pull Request Overview
Fixes inaccurate and fragile file upload status tracking by restructuring status data and improving progress calculation and notifications.
- Introduces structured UploadStatus objects with vFolderNames and totalSize.
- Adds byte-based progress and concurrent uploads (PQueue concurrency 10).
- Adjusts FolderExplorer to new status shape.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| react/src/components/FolderExplorer.tsx | Updated empty-pending check to match new nested status structure. |
| react/src/components/FileUploadManager.tsx | Refactored data structures, progress computation, notification messaging, and concurrency. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
d5cfaff to
3f7e879
Compare
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.
please apply copilot's reviews and resolve conflicts
bbb4912 to
c4f7e84
Compare
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.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c4f7e84 to
8a3b9bd
Compare
8a3b9bd to
443b82c
Compare
443b82c to
a73aed7
Compare
a73aed7 to
f2deff6
Compare
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.
LGTM
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.
LGTM
f2deff6 to
c08b298
Compare
Merge activity
|
Resolves #4316 ([FR-1501](https://lablup.atlassian.net/browse/FR-1501)) ## Changes Fixes file upload status tracking and progress calculation issues, particularly for concurrent uploads. Refactored the upload state management to properly track upload progress using bytes instead of just file counts. ### Key Changes 1. Enhanced State Management Structure 2. Fixed Progress Calculation - Problem: Progress was only tracked by file count, not actual bytes uploaded - Solution: - Added completedBytes to track actual upload progress - Added totalExpectedSize for accurate percentage calculation - Progress now shows: completedBytes / totalExpectedSize * 100 3. Fixed Cumulative Bytes Issue - Problem: onProgress callback provides cumulative bytesUploaded, not incremental - Solution: Calculate delta bytes for each progress update ``` let previousBytesUploaded = 0; const deltaBytes = bytesUploaded - previousBytesUploaded; previousBytesUploaded = bytesUploaded; ``` 4. Improved Concurrent Upload Handling - Problem: When starting new uploads while others are in progress, total size wasn't properly accumulated - Solution: - totalExpectedSize accumulates across all upload requests - All progress callbacks reference the same total from state - Proper reset when all uploads complete 5. Better Upload Status Notifications - Progress notifications now show both file count and byte-based percentage - More accurate progress tracking during uploads - Proper cleanup of state after completion Testing - Single file upload progress tracking - Multiple files upload (folder) progress tracking - Concurrent uploads (starting new upload while another is in progress) - Upload failure handling - Progress percentage accuracy Technical Details The main issue was that the original implementation only tracked file names without considering actual bytes uploaded. This led to inaccurate progress reporting, especially for files of varying sizes. The new implementation: 1. Tracks both file counts and bytes for comprehensive progress reporting 2. Properly handles cumulative vs incremental byte reporting from the TUS upload library 3. Maintains a single source of truth (totalExpectedSize) for all concurrent uploads 4. Correctly accumulates sizes when new uploads are added **Checklist:** - [ ] Documentation - [ ] Minimum required manager version - [ ] Specific setting for review - [ ] Minimum requirements to check during review - [x] Test case: Upload multiple files and verify status tracking works correctly [FR-1501]: https://lablup.atlassian.net/browse/FR-1501?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
c08b298 to
d79efea
Compare

Resolves #4316 (FR-1501)
Changes
Fixes file upload status tracking and progress calculation issues, particularly for concurrent uploads. Refactored the upload state management to properly track upload progress using bytes instead of just file counts.
Key Changes
Enhanced State Management Structure
Fixed Progress Calculation
Testing
is in progress)
Technical Details
The main issue was that the original implementation only tracked file names without considering actual bytes uploaded. This led to inaccurate progress reporting, especially for files of varying sizes. The new implementation:
Checklist: