-
Notifications
You must be signed in to change notification settings - Fork 251
Migrated resume code #3289
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
Migrated resume code #3289
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 the jobs resume functionality in AzCopy to support library usage, moving resume-related code from the CLI layer into the azcopy package. The refactoring enables programmatic job resumption while maintaining CLI compatibility.
Key Changes
- Migrated resume job logic from
cmd/jobsResume.gotoazcopy/jobsResume.go, exposingResumeJob()as a public API - Introduced
JobLifecycleManagerto handle job lifecycle events with adaptive progress reporting - Moved credential utility functions to
azcopy/credentialUtil.gofor shared use between CLI and library modes
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| ste/mgr-JobPartMgr.go | Removed obsolete include/exclude transfer list check |
| ste/mgr-JobMgr.go | Removed include/exclude transfer methods and fields from job manager |
| jobsAdmin/init.go | Simplified ResumeJobOrder by removing SAS stripping and include/exclude logic |
| common/rpc-models.go | Removed obsolete SourceSAS, DestinationSAS, IncludeTransfer, and ExcludeTransfer fields from ResumeJobRequest |
| cmd/sync.go | Updated constant reference from base10Mega to azcopy.Base10Mega |
| cmd/root.go | Refactored Initialize function to handle library mode vs CLI mode initialization |
| cmd/jobsShow.go | Updated API calls to pass JobID as first parameter instead of in options |
| cmd/jobsResume.go | Completely refactored to use new azcopy.ResumeJob API with handler pattern |
| cmd/jobsRemove.go | Updated API call signature to pass JobID as first parameter |
| cmd/credentialUtil.go | Delegated credential logic to azcopy package functions |
| cmd/copyEnumeratorInit.go | Fixed trailing whitespace and variable reference |
| cmd/copy.go | Updated constant reference from base10Mega to azcopy.Base10Mega |
| cmd/constants.go | Removed constants migrated to azcopy package |
| cmd/cancel.go | Updated API call signature for GetJobSummary |
| azcopy/zt_credentialUtil_test.go | Moved and updated credential tests to azcopy package |
| azcopy/jobsShow.go | Updated API to take JobID as first parameter with cleaner option structs |
| azcopy/jobsResume.go | New file implementing ResumeJob API with handler pattern for progress tracking |
| azcopy/jobsRemove.go | Updated API signature to take JobID as first parameter |
| azcopy/jobLifecycleManager.go | New file implementing job lifecycle management with adaptive progress reporting |
| azcopy/credentialUtil.go | New file consolidating credential utility functions for library usage |
| azcopy/client.go | Added LogLevel support and moved constants from cmd package |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e-storage-azcopy into gapra/resumeMigration
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 20 out of 21 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Refactor of jobs resume code for AzCopy as a library.
Feature / Bug Fix: (Brief description of the feature or issue being addressed)
Related Links:
Issues
Team thread
Documents
[Email Subject]
Type of Change
How Has This Been Tested?
Existing integration tests as this is a refactor.
Thank you for your contribution to AzCopy!