Skip to content

Conversation

@FumingZhang
Copy link
Member

@FumingZhang FumingZhang commented Oct 9, 2025


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

Related command

Fix az aks bastion subshell defaulting to cmd on Windows when invoked from PowerShell by implementing grandparent process detection to identify the actual user shell.

Fix issue #9060

image

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.

@FumingZhang FumingZhang requested review from Copilot and removed request for andyliuliming October 9, 2025 06:15
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Oct 9, 2025

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

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 9, 2025

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

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

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>

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 fixes the az aks bastion command's subshell detection on Windows by implementing grandparent process detection to identify the actual user shell when Azure CLI is invoked through PowerShell.

  • Implements Windows-specific logic to detect when cmd.exe is wrapping az.cmd for PowerShell
  • Adds proper PowerShell command syntax for setting environment variables in subshells
  • Updates version to 18.0.0b44 and adds changelog entry

Reviewed Changes

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

File Description
setup.py Version bump to 18.0.0b44
bastion.py Enhanced shell detection logic with grandparent process checking and PowerShell command handling
HISTORY.rst Added changelog entry describing the fix

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

Hi @FumingZhang

Release Suggestions

Module: aks-preview

  • Update VERSION to 19.0.0b7 in src/aks-preview/setup.py

Notes

@FumingZhang FumingZhang force-pushed the fuming/aks-bastion-1009 branch from 5cecf10 to ac754b1 Compare October 29, 2025 04:15
@yanzhudd yanzhudd merged commit 3413262 into Azure:main Oct 30, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants