Skip to content

Adding Buffer Size and Custom Endpoint Flags to Az SFTP#9620

Open
DevanshG1 wants to merge 1 commit intoAzure:mainfrom
DevanshG1:main
Open

Adding Buffer Size and Custom Endpoint Flags to Az SFTP#9620
DevanshG1 wants to merge 1 commit intoAzure:mainfrom
DevanshG1:main

Conversation

@DevanshG1
Copy link

@DevanshG1 DevanshG1 commented Feb 18, 2026


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings February 18, 2026 10:11
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 18, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

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 pull request adds two new command-line flags to the az sftp connect command: --buffer-size for configuring SFTP transfer buffer size and --endpoint-suffix for specifying custom storage account endpoint suffixes. The changes enable users to optimize transfer performance and support custom Azure environments (e.g., Azure Government, China, or private clouds).

Changes:

  • Added --buffer-size parameter to control SFTP transfer buffer size (default: 256 KB)
  • Added --endpoint-suffix parameter to override cloud-specific endpoint detection
  • Refactored _get_storage_endpoint_suffix to _resolve_endpoint_suffix with custom suffix support and validation

Reviewed changes

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

Show a summary per file
File Description
src/sftp/setup.py Version bump from 1.0.0b1 to 1.0.0b2
src/sftp/HISTORY.rst Release notes documenting the new parameters
src/sftp/azext_sftp/constants.py Added DEFAULT_BUFFER_SIZE_BYTES constant (256 KB)
src/sftp/azext_sftp/_params.py Added buffer_size and endpoint_suffix parameter definitions
src/sftp/azext_sftp/_help.py Updated documentation and examples for new parameters
src/sftp/azext_sftp/sftp_info.py Added buffer_size support to SFTPSession and build_args method
src/sftp/azext_sftp/custom.py Renamed and enhanced endpoint resolution with validation; added buffer_size parameter
src/sftp/azext_sftp/tests/latest/test_sftp_info.py Added unit tests for buffer_size default and custom values
src/sftp/azext_sftp/tests/latest/test_custom.py Added tests for endpoint_suffix validation and cloud-specific resolution; updated mock references

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.

3 participants

Comments