-
Notifications
You must be signed in to change notification settings - Fork 9
Fixes: Add progress tracking for app uploads #28
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
base: main
Are you sure you want to change the base?
Fixes: Add progress tracking for app uploads #28
Conversation
b9f1fba
to
7afcbfb
Compare
- Introduced `showUploadProgress` parameter in relevant classes to enable upload progress tracking. - Updated `README.md` to document the new feature. - Enhanced `UploaderUtil` to support progress tracking during file uploads. - Implemented `ProgressRequestBody` to handle progress updates and display in the console.
@ritwickrajmakhal this seems to clutter the terminal a lot, more if we are uploading both app and test suite as you mentioned in #25 (comment). Could you check if it will be possible to have single-line progress updater so the terminal is tidy, something like this:
In the above, we will only have 2 log lines that will update and not clutter the terminal. |
…ted classes for improved upload progress tracking
…arameter from console callback for streamlined upload progress tracking
Hi @ritwickrajmakhal the changes look good, I will test it, can you resolve the minor conflict in |
Done 👍🏻. |
fixes: #25
Implementation Review Summary
Looking at the current codebase (version 1.0.7) and all the implemented features, here's the comprehensive review:
✅ All Requirements Successfully Implemented
showUploadProgress = true
LambdaTestTask
andLambdaUploaderTask
- Proper Boolean property with setter methods:
setShowUploadProgress(Boolean)
- Integrated into task execution logic with null-safe checks
- Backward compatible (defaults to false when not specified)
uploadAndGetId(String, String, String)
method preserved- Enhanced
uploadAndGetId(String, String, String, boolean, String)
overloaded version with progress and prefix support- Both
AppUploader
andTestSuiteUploader
constructors support progress parameter- Seamless integration without breaking existing functionality
ProgressSink extends ForwardingSink
using OkHttp's native APIs- Proper
Buffer
andbyteCount
parameter handling inwrite()
method- Correct
super.write(source, byteCount)
delegation to maintain data integrity- Native OkHttp integration without external dependencies
- Enhanced display with file prefixes for concurrent uploads
- Formatted bytes display with human-readable units (B, KB, MB, GB)
-
System.out.flush()
for immediate console output- ANSI color support for better visibility
🚀 Enhanced Features Beyond Requirements
Real-Time Progress Tracking:
System.out.flush()
bypasses Gradle output bufferingAdvanced Console Integration:
Developer Experience:
📋 Technical Architecture
Core Implementation Files:
ProgressRequestBody.java
: OkHttp Sink/BufferedSink wrapper with progress callbacksUploaderUtil.java
: Enhanced upload methods with progress supportLambdaTestTask.java
: Main task withshowUploadProgress
capabilityLambdaUploaderTask.java
: Upload-only task with progress supportAppUploader.java
&TestSuiteUploader.java
: Enhanced constructors with progress integrationAPI Design:
🎯 Current Status: Production Ready
Version: 1.0.7
Testing Status: ✅ Verified with real APK uploads
Console Output: ✅ Real-time progress display working
Compatibility: ✅ Backward compatible with existing configurations
Performance: ✅ Minimal overhead, maintains upload speed
Example Console Output:
Final Assessment: 🎉 100% REQUIREMENTS MET
All original requirements have been fully implemented using OkHttp's native Sink and BufferedSink APIs, with significant enhancements for real-time console progress tracking and concurrent upload support. The implementation is production-ready and provides an excellent developer experience.
Demo:
final.mp4