Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
Hardens az aks get-credentials kubeconfig persistence in acs/custom.py by preventing symlink-based write redirection and reducing risk of partial/corrupted kubeconfig writes.
Changes:
- Rejects kubeconfig paths that are symbolic links with a clear
CLIError. - Switches kubeconfig write to a temp-file +
os.replace()atomic replace pattern in the target directory.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Queued live test to validate the change, test passed!
|
9298539 to
71e171d
Compare
az aks get-credentials: Harden kubeconfig write with symlink check and atomic replaceaz aks get-credentials: Harden kubeconfig write with symlink check and atomic replace
|
I just updated the tile from |
Related command
az aks get-credentialsDescription
merge_kubernetes_configurations()writes the merged kubeconfig directly viaopen(path, 'w+')without checking for symlinks or ensuring atomicity. This means:This change adds a symlink check that rejects symlink paths with a clear error, and replaces the direct write with an atomic temp-file-then-
os.replace()pattern in the same directory.Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.