Skip to content

Conversation

@anvrao1
Copy link
Member

@anvrao1 anvrao1 commented Jun 11, 2025


This PR enables SSH connectivity for the Developer SKU by replacing the direct SKU and tunneling check with a unified helper function.

Introduce _is_nativeclient_enabled to allow Developer SKU by default and preserve existing checks for Standard/Premium.
Replace the original SKU-plus-tunneling conditional with a call to the new helper.
Retain the error-raising logic, now backed by the helper function.

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 June 11, 2025 19:08
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jun 11, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@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>

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 11, 2025

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

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 updates the extension version, adds a release note, and refactors SSH bastion logic to support Developer SKU native client connectivity.

  • Bump extension version to 1.4.1 and add HISTORY entry
  • Introduce _is_nativeclient_enabled helper and replace SKU/tunneling check
  • Update error path to use new helper

Reviewed Changes

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

File Description
src/bastion/setup.py Updated VERSION to 1.4.1
src/bastion/azext_bastion/custom.py Added _is_nativeclient_enabled, refactored SKU/tunneling check
src/bastion/HISTORY.rst Added 1.4.1 release notes
Comments suppressed due to low confidence (3)

src/bastion/azext_bastion/custom.py:184

  • The error message is now misleading because Developer SKU is allowed. Update it to reflect that Developer, Standard, or Premium SKUs are supported when native client (tunneling) is enabled.
raise ClientRequestError('Bastion Host SKU must be Standard or Premium and Native Client must be enabled.')

src/bastion/azext_bastion/custom.py:391

  • Add a docstring for _is_nativeclient_enabled to explain when it returns true (e.g., Developer SKU always, Standard/Premium with tunneling).
def _is_nativeclient_enabled(bastion):

src/bastion/azext_bastion/custom.py:183

  • Consider adding unit tests for _is_nativeclient_enabled and for the SSH flow with Developer SKU to ensure correct connectivity behavior.
if not _is_nativeclient_enabled(bastion):

@github-actions
Copy link

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

@necusjz
Copy link
Member

necusjz commented Jun 12, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@anvrao1
Copy link
Member Author

anvrao1 commented Jun 12, 2025

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 8856 in repo Azure/azure-cli-extensions

@aavalang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 8856 in repo Azure/azure-cli-extensions

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 12, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yonzhan yonzhan requested a review from kairu-ms June 12, 2025 23:07
@necusjz necusjz merged commit a69445a into Azure:main Jun 13, 2025
24 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ bastion-1.4.1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=127151782&view=results

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.

5 participants