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

[azure-cli-ml] az extension add --name azure-cli-ml --version does not find most older extension versions #3064

Open
marcindulak opened this issue Feb 26, 2021 · 5 comments
Labels
ADO Issue is documented on MSFT ADO for internal tracking extension/ml Machine Learning ML-MLOps AreaPath Service Attention This issue is responsible by Azure service team.

Comments

@marcindulak
Copy link

  • If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Extension name (the extension in question)

azure-cli-ml

Description of issue (in as much detail as possible)

Describe the bug

It seems like az extension add --name azure-cli-ml --version does not find most older extension versions.

To Reproduce

az version 
{
  "azure-cli": "2.19.1",
  "azure-cli-core": "2.19.1",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {}
}
az extension add --name azure-cli-ml --version 1.21.0 --debug
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'azure-cli-ml', '--version', '1.21.0', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f42923e2840>, <function OutputProducer.on_global_arguments at 0x7f4291f35620>, <function CLIQuery.on_global_arguments at 0x7f4291cca8c8>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: extension                 0.003         1         7
cli.azure.cli.core: Total (1)                 0.003         1         7
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : extension add
cli.azure.cli.core: Command table: extension add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f42910d9598>]
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f4291109620>, <function register_global_query_examples_argument.<locals>.register_query_examples at 0x7f4291068d08>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f4291068d90>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f4291068ea0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f4291f356a8>, <function CLIQuery.handle_query_parameter at 0x7f4291cca950>, <function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x7f4291068c80>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f4291068e18>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 763607
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension.operations: Extension with version 1.21.0 not found
cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/_resolve.py", line 82, in resolve_from_index
    chosen = [c for c in candidates_sorted if c['metadata']['version'] == target_version][0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 307, in add_extension
    source, ext_sha256 = resolve_from_index(extension_name, index_url=index_url, target_version=version)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/_resolve.py", line 84, in resolve_from_index
    raise NoExtensionCandidatesError('Extension with version {} not found'.format(target_version))
azure.cli.core.extension._resolve.NoExtensionCandidatesError: Extension with version 1.21.0 not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 727, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_job
    six.reraise(*sys.exc_info())
  File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 698, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 331, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 816, in default_command_handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/extension/custom.py", line 18, in add_extension_cmd
    version=version, upgrade=upgrade)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 315, in add_extension
    raise CLIError(err)
knack.util.CLIError: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.

cli.azure.cli.core.azclierror: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.
cli.azure.cli.core.azclierror: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f42910d97b8>]

Installing the latest extension using the --version value works

az extension add --name azure-cli-ml --version 1.23.0
az version
{
  "azure-cli": "2.19.1",
  "azure-cli-core": "2.19.1",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "azure-cli-ml": "1.23.0"
  }
}

Expected behavior

The old versions are installable using the --version parameter.

Environment summary

cat /etc/*release | grep PRETTY
PRETTY_NAME="Ubuntu 18.04.5 LTS"
python --version
Python 3.7.10
/opt/az/bin/python3 --version
Python 3.6.10

Additional context

Most old extension versions are missing as candidates in the debug output

az extension add --name azure-cli-ml --version 1.21.0
...
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 763607
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
...

The installation of the other available version az extension add --name azure-cli-ml --version 1.5.0 fails due to a different issue Azure/azure-cli#16856

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 26, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 26, 2021
@yonzhan yonzhan added Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 26, 2021
@ghost
Copy link

ghost commented Feb 26, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.

Issue Details
  • If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Extension name (the extension in question)

azure-cli-ml

Description of issue (in as much detail as possible)

Describe the bug

It seems like az extension add --name azure-cli-ml --version does not find most older extension versions.

To Reproduce

az version 
{
  "azure-cli": "2.19.1",
  "azure-cli-core": "2.19.1",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {}
}
az extension add --name azure-cli-ml --version 1.21.0 --debug
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'azure-cli-ml', '--version', '1.21.0', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f42923e2840>, <function OutputProducer.on_global_arguments at 0x7f4291f35620>, <function CLIQuery.on_global_arguments at 0x7f4291cca8c8>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: extension                 0.003         1         7
cli.azure.cli.core: Total (1)                 0.003         1         7
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : extension add
cli.azure.cli.core: Command table: extension add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f42910d9598>]
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f4291109620>, <function register_global_query_examples_argument.<locals>.register_query_examples at 0x7f4291068d08>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f4291068d90>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f4291068ea0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f4291f356a8>, <function CLIQuery.handle_query_parameter at 0x7f4291cca950>, <function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x7f4291068c80>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f4291068e18>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 763607
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension.operations: Extension with version 1.21.0 not found
cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/_resolve.py", line 82, in resolve_from_index
    chosen = [c for c in candidates_sorted if c['metadata']['version'] == target_version][0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 307, in add_extension
    source, ext_sha256 = resolve_from_index(extension_name, index_url=index_url, target_version=version)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/_resolve.py", line 84, in resolve_from_index
    raise NoExtensionCandidatesError('Extension with version {} not found'.format(target_version))
azure.cli.core.extension._resolve.NoExtensionCandidatesError: Extension with version 1.21.0 not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 727, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_job
    six.reraise(*sys.exc_info())
  File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 698, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 331, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 816, in default_command_handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/extension/custom.py", line 18, in add_extension_cmd
    version=version, upgrade=upgrade)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 315, in add_extension
    raise CLIError(err)
knack.util.CLIError: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.

cli.azure.cli.core.azclierror: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.
cli.azure.cli.core.azclierror: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f42910d97b8>]

Installing the latest extension using the --version value works

az extension add --name azure-cli-ml --version 1.23.0
az version
{
  "azure-cli": "2.19.1",
  "azure-cli-core": "2.19.1",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "azure-cli-ml": "1.23.0"
  }
}

Expected behavior

The old versions are installable using the --version parameter.

Environment summary

cat /etc/*release | grep PRETTY
PRETTY_NAME="Ubuntu 18.04.5 LTS"
python --version
Python 3.7.10
/opt/az/bin/python3 --version
Python 3.6.10

Additional context

Most old extension versions are missing as candidates in the debug output

az extension add --name azure-cli-ml --version 1.21.0
...
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 763607
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
...

The installation of the other available version az extension add --name azure-cli-ml --version 1.5.0 fails due to a different issue Azure/azure-cli#16856

Author: marcindulak
Assignees: -
Labels:

Machine Learning, Service Attention

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 26, 2021

azure-cli-ml

@ghost
Copy link

ghost commented Feb 26, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @lostmygithubaccount.

Issue Details
  • If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Extension name (the extension in question)

azure-cli-ml

Description of issue (in as much detail as possible)

Describe the bug

It seems like az extension add --name azure-cli-ml --version does not find most older extension versions.

To Reproduce

az version 
{
  "azure-cli": "2.19.1",
  "azure-cli-core": "2.19.1",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {}
}
az extension add --name azure-cli-ml --version 1.21.0 --debug
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'azure-cli-ml', '--version', '1.21.0', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f42923e2840>, <function OutputProducer.on_global_arguments at 0x7f4291f35620>, <function CLIQuery.on_global_arguments at 0x7f4291cca8c8>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: extension                 0.003         1         7
cli.azure.cli.core: Total (1)                 0.003         1         7
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : extension add
cli.azure.cli.core: Command table: extension add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f42910d9598>]
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f4291109620>, <function register_global_query_examples_argument.<locals>.register_query_examples at 0x7f4291068d08>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f4291068d90>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f4291068ea0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f4291f356a8>, <function CLIQuery.handle_query_parameter at 0x7f4291cca950>, <function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x7f4291068c80>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f4291068e18>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 763607
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension.operations: Extension with version 1.21.0 not found
cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/_resolve.py", line 82, in resolve_from_index
    chosen = [c for c in candidates_sorted if c['metadata']['version'] == target_version][0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 307, in add_extension
    source, ext_sha256 = resolve_from_index(extension_name, index_url=index_url, target_version=version)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/_resolve.py", line 84, in resolve_from_index
    raise NoExtensionCandidatesError('Extension with version {} not found'.format(target_version))
azure.cli.core.extension._resolve.NoExtensionCandidatesError: Extension with version 1.21.0 not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 727, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_job
    six.reraise(*sys.exc_info())
  File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 698, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 331, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 816, in default_command_handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/extension/custom.py", line 18, in add_extension_cmd
    version=version, upgrade=upgrade)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 315, in add_extension
    raise CLIError(err)
knack.util.CLIError: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.

cli.azure.cli.core.azclierror: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.
cli.azure.cli.core.azclierror: No matching extensions for 'azure-cli-ml (1.21.0)'. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f42910d97b8>]

Installing the latest extension using the --version value works

az extension add --name azure-cli-ml --version 1.23.0
az version
{
  "azure-cli": "2.19.1",
  "azure-cli-core": "2.19.1",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "azure-cli-ml": "1.23.0"
  }
}

Expected behavior

The old versions are installable using the --version parameter.

Environment summary

cat /etc/*release | grep PRETTY
PRETTY_NAME="Ubuntu 18.04.5 LTS"
python --version
Python 3.7.10
/opt/az/bin/python3 --version
Python 3.6.10

Additional context

Most old extension versions are missing as candidates in the debug output

az extension add --name azure-cli-ml --version 1.21.0
...
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 763607
cli.azure.cli.core.extension._resolve: Candidates ['azure_cli_ml-1.23.0-py3-none-any.whl', 'azure_cli_ml-1.5.0-py2.py3-none-any.whl']
...

The installation of the other available version az extension add --name azure-cli-ml --version 1.5.0 fails due to a different issue Azure/azure-cli#16856

Author: marcindulak
Assignees: -
Labels:

ML-MLOps, Machine Learning, Service Attention, extension/ml

Milestone: -

@fengzhou-msft
Copy link
Member

@marcindulak why do you need version 1.21.0? azure-cli-ml versions are manully updated and they only keep the latest version and an old version that is compatible with older versions of azure-cli. @j-so for awareness.

@marcindulak
Copy link
Author

The old extension versions are still available at https://azurecliext.blob.core.windows.net/release

Version pinning, of azure-cli as well, is used for ci as an attempt to minimize potential breaking changes.

For pinning, an explicit installation from an url with az extension add --source is available #2992 (comment), but since the az extension add --version option exists it may support all versions as well.

@v-strudm-msft v-strudm-msft added the ADO Issue is documented on MSFT ADO for internal tracking label May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADO Issue is documented on MSFT ADO for internal tracking extension/ml Machine Learning ML-MLOps AreaPath Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants