Skip to content

Conversation

@gapra-msft
Copy link
Member

Description

Cleanup before migrating the sync command.

  • Feature / Bug Fix: (Brief description of the feature or issue being addressed)

  • Related Links:

  • Issues

  • Team thread

  • Documents

  • [Email Subject]

Type of Change

  • Bug fix
  • New feature
  • Documentation update required
  • Code quality improvement
  • Other (describe):

How Has This Been Tested?

Covered by existing tests

Thank you for your contribution to AzCopy!

wonwuakpa-msft
wonwuakpa-msft previously approved these changes Nov 18, 2025
Base automatically changed from gapra/resumeMigration to main November 18, 2025 20:41
@gapra-msft gapra-msft dismissed wonwuakpa-msft’s stale review November 18, 2025 20:41

The base branch was changed.

Copilot AI review requested due to automatic review settings November 18, 2025 20:44
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 performs code refactoring to reorganize validation, utility, and path handling code in preparation for sync command migration. The changes focus on extracting shared functionality into a new azcopy package to reduce code duplication and improve maintainability.

Key changes include:

  • Moving validation functions (FromTo inference, NFS/SMB validation, MD5 validation) from cmd to azcopy package
  • Extracting location level and path utilities to the azcopy package
  • Refactoring traverser initialization to use Client and CredentialType directly instead of CredentialInfo wrapper
  • Consolidating dry-run logic into a dedicated processor file

Reviewed Changes

Copilot reviewed 48 out of 48 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmd/validators.go Removed validation functions that were moved to azcopy package
cmd/pathUtils.go Removed LocationLevel and DetermineLocationLevel functions, moved to azcopy package
cmd/constants.go Removed constants moved to azcopy package
azcopy/validationUtil.go New file containing all validation logic extracted from cmd
azcopy/pathUtils.go New file with path and location level utilities
azcopy/optionsUtil.go New file with BlockSizeInBytes utility function
azcopy/remoteClientUtils.go New file with service client creation utilities
cmd/dryrun_processor.go New file consolidating dry-run processing logic
cmd/syncEnumerator.go Updated to use new client creation approach and moved dry-run deletion setup
cmd/syncProcessor.go Refactored to use new dry-run processor pattern
cmd/zc_processor.go Removed dry-run logic moved to dedicated file
traverser/* Updated to accept Client/CredentialType instead of CredentialInfo
e2etest/* Updated imports from cmd to azcopy package for LocationLevel

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gapra-msft gapra-msft requested a review from Copilot November 19, 2025 00:08
Copilot finished reviewing on behalf of gapra-msft November 19, 2025 00:10
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

Copilot reviewed 50 out of 50 changed files in this pull request and generated no new comments.


💡 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.

4 participants