-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Cannot prevent az cli from overriding specified version of az cli extension using 'az config set extension.dynamic_install=false' #30615
Comments
Thank you for opening this issue, we will look into it. |
@juliaweingart please also provide the debug log for running cmd Didn't catch a clue of error from the log of running If possible, please also provide the result of running |
sure I can @AllyW. There are three problems here I believe:
|
This solution from this github issue fixed problems 1 and 2 described in my last comment! However, please help with problem 3 in case this issue arises again! How can I force az ml to use a specific version of az ml without upgrading?? @AllyW |
@juliaweingart after installed marshmallow 3.23.2 as you posted, the target cmd Please provide the debug log for problematic cmd BTW, you can also check whether The debug log for |
Describe the bug
I need to force set the "az ml" extension version to be (2.30.1). I am running these commands:
az extension add --name ml --version 2.30.1
az --version
az ml online-endpoint show --subscription 697c65eb-bf7c-4a92-a66f-6e9e5418ddd0 --resource-group infinity-models --workspace-name infinity-models --name infinite-reasoning-stable
On line 2 when the az version is printed, I see, as expected, that the az ml extension is version 2.30.1.
However, when I run line 3, I am seeing this:
WARNING: Extension 'ml' 2.30.1 is already installed.
WARNING: It will be overridden with version 2.32.4.
It seems the default behavior is to update installed extensions to their latest versions regardless of which version is already installed. In my case, the latest version is broken, so our script is failing. I see online that I can set these flags to stop this default behavior and actually use the pre-installed extension version rather than updating:
az config set extension.dynamic_install=false
az config set extension.dynamic_install_allow_preview=false
These flags aren't working as expected. I still see "az ml" trying to override version 2.30.1 with version 2.32.4.
How do I fix this?
Related command
az config set extension.dynamic_install=false
az config set extension.dynamic_install_allow_preview=false
az extension add --name ml --version 2.30.1
az ml online-endpoint show
--subscription 697c65eb-bf7c-4a92-a66f-6e9e5418ddd0 --resource-group infinity-models --workspace-name infinity-models
--name infinite-reasoning-stable
Errors
No error, but bug that the "az config" commands don't do what they should be doing in making the "az ml" command us the version of "az ml" I explicitly installed.
Issue script & Debug output
az config set extension.dynamic_install=false --debug
DEBUG: cli.knack.cli: Command arguments: ['config', 'set', 'extension.dynamic_install=false', '--debug']
DEBUG: cli.knack.cli: init debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f4a095db7e0>, <function OutputProducer.on_global_arguments at 0x7f4a0937e660>, <function CLIQuery.on_global_arguments at 0x7f4a093c3ba0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Command index version or cloud profile is invalid or doesn't match the current command.
DEBUG: cli.azure.cli.core: Command index has been invalidated.
DEBUG: cli.azure.cli.core: No module found from index for '['config', 'set', 'extension.dynamic_install=false', '--debug']'
DEBUG: cli.azure.cli.core: Loading all modules and extensions
DEBUG: cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'compute_recommender', 'computefleet', 'config', 'configure', 'consumption', 'container', 'containerapp', 'cosmosdb', 'databoxedge', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands
DEBUG: cli.azure.cli.core: acr 0.608 36 149
DEBUG: cli.azure.cli.core: acs 0.284 14 77
DEBUG: cli.azure.cli.core: advisor 0.010 3 6
DEBUG: cli.azure.cli.core: ams 0.012 22 100
DEBUG: cli.azure.cli.core: apim 0.021 14 69
DEBUG: cli.azure.cli.core: appconfig 0.015 9 47
DEBUG: cli.azure.cli.core: appservice 0.145 79 270
DEBUG: cli.azure.cli.core: aro 0.141 1 10
DEBUG: cli.azure.cli.core: backup 0.018 16 60
DEBUG: cli.azure.cli.core: batch 0.408 34 102
DEBUG: cli.azure.cli.core: batchai 0.011 10 30
DEBUG: cli.azure.cli.core: billing 0.056 19 53
DEBUG: cli.azure.cli.core: botservice 0.015 12 42
DEBUG: cli.azure.cli.core: cdn 0.580 8 50
DEBUG: cli.azure.cli.core: cloud 0.010 1 7
DEBUG: cli.azure.cli.core: cognitiveservices 0.006 10 33
DEBUG: cli.azure.cli.core: compute_recommender 0.011 1 1
DEBUG: cli.azure.cli.core: computefleet 0.039 1 1
DEBUG: cli.azure.cli.core: config 0.006 2 7
DEBUG: cli.azure.cli.core: configure 0.005 2 5
DEBUG: cli.azure.cli.core: consumption 0.062 8 9
DEBUG: cli.azure.cli.core: container 0.095 2 17
DEBUG: cli.azure.cli.core: containerapp 0.839 37 123
DEBUG: cli.azure.cli.core: cosmosdb 0.055 58 199
DEBUG: cli.azure.cli.core: databoxedge 0.035 5 28
DEBUG: cli.azure.cli.core: dls 0.006 6 36
DEBUG: cli.azure.cli.core: dms 0.006 3 22
DEBUG: cli.azure.cli.core: eventgrid 0.027 25 96
DEBUG: cli.azure.cli.core: eventhubs 0.078 13 20
DEBUG: cli.azure.cli.core: extension 0.005 1 7
DEBUG: cli.azure.cli.core: feedback 0.005 1 2
DEBUG: cli.azure.cli.core: find 0.005 1 1
DEBUG: cli.azure.cli.core: hdinsight 0.042 9 42
DEBUG: cli.azure.cli.core: identity 0.007 2 11
DEBUG: cli.azure.cli.core: interactive 0.005 1 1
DEBUG: cli.azure.cli.core: iot 0.867 19 82
DEBUG: cli.azure.cli.core: keyvault 0.032 20 113
DEBUG: cli.azure.cli.core: lab 0.203 9 29
DEBUG: cli.azure.cli.core: managedservices 0.064 3 8
DEBUG: cli.azure.cli.core: maps 0.007 5 13
DEBUG: cli.azure.cli.core: marketplaceordering 0.016 1 2
DEBUG: cli.azure.cli.core: monitor 3.312 18 61
DEBUG: cli.azure.cli.core: mysql 0.576 16 56
DEBUG: cli.azure.cli.core: netappfiles 0.199 8 17
DEBUG: cli.azure.cli.core: network 0.875 103 338
DEBUG: cli.azure.cli.core: policyinsights 0.041 9 17
DEBUG: cli.azure.cli.core: privatedns 0.066 14 60
DEBUG: cli.azure.cli.core: profile 0.006 2 8
DEBUG: cli.azure.cli.core: rdbms 0.484 50 208
DEBUG: cli.azure.cli.core: redis 0.011 7 38
DEBUG: cli.azure.cli.core: relay 0.197 7 8
DEBUG: cli.azure.cli.core: resource 0.063 52 232
DEBUG: cli.azure.cli.core: role 0.007 17 61
DEBUG: cli.azure.cli.core: search 0.027 7 19
DEBUG: cli.azure.cli.core: security 0.041 47 98
DEBUG: cli.azure.cli.core: servicebus 0.080 13 16
DEBUG: cli.azure.cli.core: serviceconnector 0.131 20 315
DEBUG: cli.azure.cli.core: servicefabric 0.177 27 80
DEBUG: cli.azure.cli.core: signalr 0.012 10 42
DEBUG: cli.azure.cli.core: sql 0.055 56 215
DEBUG: cli.azure.cli.core: sqlvm 0.322 4 20
DEBUG: cli.azure.cli.core: storage 0.101 59 273
DEBUG: cli.azure.cli.core: synapse 0.078 54 246
DEBUG: cli.azure.cli.core: util 0.007 3 7
DEBUG: cli.azure.cli.core: vm 0.347 58 233
DEBUG: cli.azure.cli.core: Total (65) 12.081 1184 4648
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory
DEBUG: cli.azure.cli.core: azure-devops 0.453 60 192 /opt/az/azcliextensions/azure-devops
DEBUG: cli.azure.cli.core: Total (1) 0.453 60 192
DEBUG: cli.azure.cli.core: Loaded 1230 groups, 4840 commands.
DEBUG: cli.azure.cli.core: Updated command index in 0.003 seconds.
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f4a0861ec00>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/runner/.azure/commands/2025-01-06.23-04-04.config_set.2771.log'.
INFO: az_command_data_logger: command args: config set {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f4a08226d40>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f4a08226de0>, <function register_cache_arguments..add_cache_arguments at 0x7f4a08226f20>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7f4a08226fc0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f4a06bca520>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f4a0937e700>, <function CLIQuery.handle_query_parameter at 0x7f4a093c3c40>, <function register_ids_argument..parse_ids_arguments at 0x7f4a08226e80>, <function DevCommandsLoader.post_parse_args at 0x7f4a027fe160>]
WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
DEBUG: cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7f4a08657c40>, <function _x509_from_base64_to_hex_transform at 0x7f4a08657ce0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnFilterResult []
DEBUG: cli.knack.cli: Event: Cli.SuccessfulExecute []
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f4a0861ee80>]
INFO: az_command_data_logger: exit code: 0
INFO: cli.main: Command ran in 15.206 seconds (init: 2.352, invoke: 12.854)
DEBUG: cli.azure.cli.core._profile: Failed to load installationId from AzureRmSurvey.json. [Errno 2] No such file or directory: '/home/runner/.azure/AzureRmContextSettings.json'
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 3532 in cache file under /home/runner/.azure/telemetry/20250106230405260
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/runner/.azure /home/runner/.azure/telemetry/20250106230405260"
INFO: telemetry.process: Return from creating process 2781
INFO: telemetry.main: Finish creating telemetry upload process.
DEBUG: cli.knack.cli: Command arguments: ['config', 'set', 'extension.dynamic_install_allow_preview=false', '--debug']
DEBUG: cli.knack.cli: init debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f4433edb7e0>, <function OutputProducer.on_global_arguments at 0x7f4433c4e660>, <function CLIQuery.on_global_arguments at 0x7f4433c93ba0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'config': ['azure.cli.command_modules.config']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands
DEBUG: cli.azure.cli.core: config 0.002 2 7
DEBUG: cli.azure.cli.core: Total (1) 0.002 2 7
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory
DEBUG: cli.azure.cli.core: Total (0) 0.000 0 0
DEBUG: cli.azure.cli.core: Loaded 2 groups, 7 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command : config set extension.dynamic_install_allow_preview=false
DEBUG: cli.azure.cli.core: Command table: config set
DEBUG: cli.azure.cli.core: remaining : extension.dynamic_install_allow_preview=false
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f4432ee6c00>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/runner/.azure/commands/2025-01-06.23-04-05.config_set.2785.log'.
INFO: az_command_data_logger: command args: config set {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f4432f1fec0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f4432f4e2a0>, <function register_cache_arguments..add_cache_arguments at 0x7f4432f4e3e0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7f4432f4e480>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f4433c4e700>, <function CLIQuery.handle_query_parameter at 0x7f4433c93c40>, <function register_ids_argument..parse_ids_arguments at 0x7f4432f4e340>]
WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
DEBUG: cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7f4432f1fc40>, <function _x509_from_base64_to_hex_transform at 0x7f4432f1fce0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnFilterResult []
DEBUG: cli.knack.cli: Event: Cli.SuccessfulExecute []
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f4432ee6e80>]
INFO: az_command_data_logger: exit code: 0
INFO: cli.main: Command ran in 0.128 seconds (init: 0.117, invoke: 0.011)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 3545 in cache file under /home/runner/.azure/telemetry/20250106230405818
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/runner/.azure /home/runner/.azure/telemetry/20250106230405818"
INFO: telemetry.process: Return from creating process 2790
INFO: telemetry.main: Finish creating telemetry upload process.
Expected behavior
I wanted az ml command to use the version I installed, not update the version to the latest before executing.
Environment Summary
az --version
azure-cli 2.67.0
core 2.67.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.1
ml 2.30.1
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3'
Extensions directory '/opt/az/azcliextensions'
Python (Linux) 3.12.7 (main, Nov 13 2024, 04:02:11) [GCC 11.4.0]
Additional context
No response
The text was updated successfully, but these errors were encountered: