-
Notifications
You must be signed in to change notification settings - Fork 253
Progress and result summary logging to happen in library #3315
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?
Conversation
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
This PR refactors progress and result summary logging by moving formatting logic from the CLI command layer (cmd/) into the azcopy library layer. This allows the library to handle logging internally, reducing code duplication and improving separation of concerns.
Key Changes
- Moved progress and result formatting functions from
cmd/to a newazcopy/output.gofile - Renamed interfaces for clarity:
CopyJobHandler→CopyHandler,SyncJobHandler→SyncHandler,CopyJobProgress→CopyProgress,SyncJobProgress→SyncProgress - Added logging calls within the library's progress trackers so that progress is logged automatically without requiring the CLI layer to do it
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| azcopy/output.go | New file containing all formatting functions for progress and result output (GetCopyProgress, GetCopyResult, GetSyncProgress, GetSyncResult, and utility functions) |
| azcopy/copy.go | Updated interface names, added internal logging call for copy results, and added job cleanup |
| azcopy/sync.go | Updated interface names, added internal logging call for sync results, and added job cleanup |
| azcopy/transferProgressTracker.go | Updated interface reference and added internal logging of progress |
| azcopy/syncProgressTracker.go | Updated interface reference and added internal logging of progress |
| azcopy/jobsResume.go | Added internal logging of progress, updated function signature formatting |
| cmd/copy.go | Removed duplicate formatting functions, updated to use library functions from azcopy package, removed unused imports |
| cmd/sync.go | Removed duplicate formatting functions, updated to use library functions from azcopy package, removed unused imports |
| cmd/jobsResume.go | Updated to use library functions from azcopy package, removed unused imports |
| jobsAdmin/init.go | Removed ToFixed and round utility functions (moved to azcopy/output.go) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.