Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az --version shows there are available updates when there is actually not #24221

Open
jiasli opened this issue Oct 17, 2022 · 3 comments
Open
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team feature-request Installation Upgrade az upgrade
Milestone

Comments

@jiasli
Copy link
Member

jiasli commented Oct 17, 2022

Related command
az --version
az upgrade

Describe the bug
Azure CLI has dropped support for some environments:

However, in those environments, az --version still shows there are available updates:

[root@ae6b254e11cf /]# az -v
azure-cli                         2.38.0 *

core                              2.38.0 *
telemetry                          1.0.6 *

Dependencies:
msal                            1.18.0b1
azure-mgmt-resource             21.1.0b1

Python location '/usr/bin/python3.6'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

Legal docs and information: aka.ms/AzureCliLegal


You have 3 updates available. Consider updating your CLI installation with 'az upgrade'

This because Azure CLI checks the latest version from source code on GitHub repo, instead of corresponding package repo:

def get_latest_from_github(package_path='azure-cli'):
try:
import requests
git_url = "https://raw.githubusercontent.com/Azure/azure-cli/main/src/{}/setup.py".format(package_path)
response = requests.get(git_url, timeout=10)

To Reproduce
Lauch a CentOS 7 docker container and install Azure CLI:

docker run -it --rm centos:7

rpm --import https://packages.microsoft.com/keys/microsoft.asc

echo -e "[azure-cli]
name=Azure CLI
baseurl=https://packages.microsoft.com/yumrepos/azure-cli
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc" | tee /etc/yum.repos.d/azure-cli.repo

yum install azure-cli

az --version

Expected behavior
az --version shouldn't show available updates in those environments.

@ghost ghost added Auto-Assign Auto assign by bot Upgrade az upgrade labels Oct 17, 2022
@ghost ghost assigned jiasli Oct 17, 2022
@ghost ghost added this to the Backlog milestone Oct 17, 2022
@ghost ghost added the Installation label Oct 17, 2022
@yonzhan yonzhan added feature-request Azure CLI Team The command of the issue is owned by Azure CLI team labels Oct 17, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Oct 17, 2022

az upgrade

@maroony
Copy link

maroony commented Oct 20, 2022

Same problem here with SLES. There is no newer version in repository

https://packages.microsoft.com/yumrepos/azure-cli/

Last version is 2.38.0 (release date: 2022-07). Is this repository still alive? There is no information on that in the docs.

Do we have to use

az upgrade

for the future now? That would mean higher maintenance effort for companies!

@philbal611
Copy link

I've come across this as well with RHEL7. Microsoft seem to have dropped support for 2.39.0+ from RHEL7 & CentOS7, per the install docs: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=dnf&view=azure-cli-latest#overview.

Warning

Starting from Azure CLI 2.39.0 (released on 08/02/2022), no RPM packages will be released for RHEL 7 and CentOS 7. You may continue to use historical versions of Azure CLI on these systems, but there will be no further updates or bug fixes from Microsoft for those versions.

Azure CLI and the Linux Install script will continue to be developed and supported by Microsoft. Packages provided by Red Hat and CentOS repositories are maintained and supported by their respective distributions.

Just contributing for posterity's sake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team feature-request Installation Upgrade az upgrade
Projects
None yet
Development

No branches or pull requests

5 participants