Skip to content

Conversation

@gapra-msft
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a 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 new azcopy/output.go file
  • Renamed interfaces for clarity: CopyJobHandlerCopyHandler, SyncJobHandlerSyncHandler, CopyJobProgressCopyProgress, SyncJobProgressSyncProgress
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants