Azure / Azure/azure-cli

`az upgrade` runs `brew upgrade`, and (surprisingly!) upgrades ansible, MySQL, subversion....

Open
#17,150 7 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad feature-request OKR3.2 Candidate question Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
The CLI invited me to run `az upgrade` on my system because I was 2 versions behind. Fine, I did that. It asked me to confirm that I really wanted to upgrade; I said "y". Unbeknownst to me, it then did a `brew upgrade` on my system, causing ansible to upgrade (by a major version! -- it went from 2.9.3 to 3!), MySQL to update a minor version, and subversion to be updated.

This was... surprising! If Azure had warned me that it was going to do a `brew upgrade` under the hood (instead of just warning me that it was upgrading the Azure CLI), then it would have been less surprising.

**To Reproduce**
1. Have an older version of `az` CLI installed
2. Type `az upgrade`

**Expected behavior**
EXPECTED:

`az upgrade` should warn that it will do a `brew upgrade` and might upgrade "dependent" packages (although the "dependency" can be somewhat tenuous -- on my system it upgraded ansible, MySQL, and subversion)

ACTUAL:
`az` CLI only warns that it is upgrading `az` itself, not dependencies:

## Environment Summary
```
macOS-11.2.2-x86_64-i386-64bit
Python 3.8.8
Installer: HOMEBREW

azure-cli 2.19.1

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.