Skip to content

Conversation

@fengzhou-msft
Copy link
Member

@fengzhou-msft fengzhou-msft commented Sep 14, 2020

Description

Make the instruction of using az upgrade only displayed when there is update for azure-cli package to prevent issues like #15133.

This PR also deprecates the _update_latest_from_pypi method which uses fuzzy match in package name and package description to search for azure-cli in pypi. Lots of packages that contain azure-cli in name or in description are returned. So this method is slow. This PR replaces it with _update_latest_from_github which searches for the latest versions on Github master branch. Legacy module packages installed before such as azure-cli-vm will no longer be listed in az --version.

Comparison of azdev perf benchmark "az --version" --runs 10:
Before:

[
  {
    "Avg": 3.8947,
    "Command": "az --version",
    "Max": 4.4901,
    "Media": 4.3117,
    "Min": 2.0803,
    "Runs": 10,
    "Std": 0.9021
  }
]

After:

[
  {
    "Avg": 3.4807,
    "Command": "az --version",
    "Max": 3.9086,
    "Media": 3.8219,
    "Min": 2.0002,
    "Runs": 10,
    "Std": 0.7321
  }
]

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 feature.


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

@fengzhou-msft fengzhou-msft changed the title {Upgrade} Only show az upgrade when updates for azure-cli is available {Version} Only show az upgrade when updates for azure-cli is available Sep 14, 2020
@fengzhou-msft fengzhou-msft changed the title {Version} Only show az upgrade when updates for azure-cli is available {Version} Only show az upgrade instruction when update for azure-cli is available Sep 14, 2020
@Azure Azure deleted a comment from yonzhan Sep 14, 2020
@fengzhou-msft fengzhou-msft merged commit 68ae330 into Azure:dev Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants