From f8c79cd8d0d09fc65072b89ba05f27863739e096 Mon Sep 17 00:00:00 2001 From: Mouly Bhardwaj Date: Mon, 13 Jan 2025 12:04:53 +0530 Subject: [PATCH 1/2] [load] update min required cli core version --- src/load/HISTORY.rst | 5 +++++ src/load/azext_load/azext_metadata.json | 2 +- src/load/setup.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/load/HISTORY.rst b/src/load/HISTORY.rst index 31667352d7e..775e7690719 100644 --- a/src/load/HISTORY.rst +++ b/src/load/HISTORY.rst @@ -2,6 +2,11 @@ Release History =============== +1.4.1 +++++++ +* Update minimum required version of azure-cli-core to 2.66.0. This is needed to use `from azure.cli.core.util import run_az_cmd`. + + 1.4.0 ++++++ * Add support for multi-region load test configuration. Multi-region load test configuration can be set using `--regionwise-engines` argument in 'az load test create' and 'az load test update' commands. Multi-region load test configuration set in YAML config file under key `regionalLoadTestConfig` will also be honoured. diff --git a/src/load/azext_load/azext_metadata.json b/src/load/azext_load/azext_metadata.json index fc7c9f095c7..044fb106bfe 100644 --- a/src/load/azext_load/azext_metadata.json +++ b/src/load/azext_load/azext_metadata.json @@ -1,3 +1,3 @@ { - "azext.minCliCoreVersion": "2.41.0" + "azext.minCliCoreVersion": "2.66.0" } \ No newline at end of file diff --git a/src/load/setup.py b/src/load/setup.py index e82efacbab7..2416da4c471 100644 --- a/src/load/setup.py +++ b/src/load/setup.py @@ -10,7 +10,7 @@ # HISTORY.rst entry. -VERSION = '1.4.0' +VERSION = '1.4.1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From 8107ed84115cd22a59f2274e3f01a9d0d8f2364b Mon Sep 17 00:00:00 2001 From: Mouly Bhardwaj Date: Mon, 13 Jan 2025 12:51:29 +0530 Subject: [PATCH 2/2] limit the scope of offending import --- src/load/HISTORY.rst | 2 +- src/load/azext_load/azext_metadata.json | 2 +- src/load/azext_load/data_plane/utils/utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/load/HISTORY.rst b/src/load/HISTORY.rst index 775e7690719..a6195baebc7 100644 --- a/src/load/HISTORY.rst +++ b/src/load/HISTORY.rst @@ -4,7 +4,7 @@ Release History =============== 1.4.1 ++++++ -* Update minimum required version of azure-cli-core to 2.66.0. This is needed to use `from azure.cli.core.util import run_az_cmd`. +* Move the `from azure.cli.core.util import run_az_cmd` to function scope to unblock users of existing features and most of the new features. Only the high scale download files feature requires this import, and it will be fixed in the next release. 1.4.0 diff --git a/src/load/azext_load/azext_metadata.json b/src/load/azext_load/azext_metadata.json index 044fb106bfe..fc7c9f095c7 100644 --- a/src/load/azext_load/azext_metadata.json +++ b/src/load/azext_load/azext_metadata.json @@ -1,3 +1,3 @@ { - "azext.minCliCoreVersion": "2.66.0" + "azext.minCliCoreVersion": "2.41.0" } \ No newline at end of file diff --git a/src/load/azext_load/data_plane/utils/utils.py b/src/load/azext_load/data_plane/utils/utils.py index fd6b36a47f4..423e76fbbe8 100644 --- a/src/load/azext_load/data_plane/utils/utils.py +++ b/src/load/azext_load/data_plane/utils/utils.py @@ -18,7 +18,6 @@ CLIInternalError, ) from azure.mgmt.core.tools import is_valid_resource_id, parse_resource_id -from azure.cli.core.util import run_az_cmd from knack.log import get_logger from .models import IdentityType, AllowedFileTypes, AllowedTestTypes @@ -181,6 +180,7 @@ def download_file(url, file_path): def download_from_storage_container(sas_url, path): + from azure.cli.core.util import run_az_cmd logger.debug("Downloading files from storage container") cmd = ["az", "storage", "copy", "--source", sas_url, "--destination", path, "--recursive"] logger.debug("Executing command: %s", cmd)