Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package azure-cli-core for openSUSE:Factory checked in at 2023-04-05 21:27:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/azure-cli-core (Old) and /work/SRC/openSUSE:Factory/.azure-cli-core.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-core" Wed Apr 5 21:27:40 2023 rev:51 rq:1077440 version:2.47.0 Changes: -------- --- /work/SRC/openSUSE:Factory/azure-cli-core/azure-cli-core.changes 2023-03-08 14:53:01.130821847 +0100 +++ /work/SRC/openSUSE:Factory/.azure-cli-core.new.19717/azure-cli-core.changes 2023-04-05 21:35:30.226516655 +0200 @@ -1,0 +2,8 @@ +Tue Apr 4 08:45:43 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- New upstream release + + Version 2.47.0 + + For detailed information about changes see the + HISTORY.rst file provided with this package + +------------------------------------------------------------------- Old: ---- azure-cli-core-2.46.0.tar.gz New: ---- azure-cli-core-2.47.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ azure-cli-core.spec ++++++ --- /var/tmp/diff_new_pack.IXtYiH/_old 2023-04-05 21:35:30.658519121 +0200 +++ /var/tmp/diff_new_pack.IXtYiH/_new 2023-04-05 21:35:30.666519166 +0200 @@ -17,7 +17,7 @@ Name: azure-cli-core -Version: 2.46.0 +Version: 2.47.0 Release: 0 Summary: Microsoft Azure CLI Core Module License: MIT ++++++ azure-cli-core-2.46.0.tar.gz -> azure-cli-core-2.47.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/HISTORY.rst new/azure-cli-core-2.47.0/HISTORY.rst --- old/azure-cli-core-2.46.0/HISTORY.rst 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/HISTORY.rst 2023-03-31 11:26:38.000000000 +0200 @@ -3,6 +3,10 @@ Release History =============== +2.47.0 +++++++ +* `aaz`: Add support for changing subscription of `AAZCommand` in customization code (#25745) + 2.46.0 ++++++ * Add announcement for WAM-based login (#25416) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/PKG-INFO new/azure-cli-core-2.47.0/PKG-INFO --- old/azure-cli-core-2.46.0/PKG-INFO 2023-03-06 10:39:38.014681800 +0100 +++ new/azure-cli-core-2.47.0/PKG-INFO 2023-03-31 11:27:03.349830000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-cli-core -Version: 2.46.0 +Version: 2.47.0 Summary: Microsoft Azure Command-Line Tools Core Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/__init__.py new/azure-cli-core-2.47.0/azure/cli/core/__init__.py --- old/azure-cli-core-2.46.0/azure/cli/core/__init__.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/__init__.py 2023-03-31 11:26:38.000000000 +0200 @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- # pylint: disable=line-too-long -__version__ = "2.46.0" +__version__ = "2.47.0" import os import sys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/aaz/__init__.py new/azure-cli-core-2.47.0/azure/cli/core/aaz/__init__.py --- old/azure-cli-core-2.46.0/azure/cli/core/aaz/__init__.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/aaz/__init__.py 2023-03-31 11:26:38.000000000 +0200 @@ -19,7 +19,7 @@ AAZDateTimeFormat, AAZDurationFormat, AAZFileArgTextFormat, AAZFileArgBase64EncodeFormat, AAZFileArgFormat from ._base import has_value, AAZValuePatch, AAZUndefined from ._command import AAZCommand, AAZWaitCommand, AAZCommandGroup, \ - register_callback, register_command, register_command_group, load_aaz_command_table + register_callback, register_command, register_command_group, load_aaz_command_table, link_helper from ._field_type import AAZIntType, AAZFloatType, AAZStrType, AAZBoolType, AAZDictType, AAZFreeFormDictType, \ AAZListType, AAZObjectType from ._operation import AAZHttpOperation, AAZJsonInstanceUpdateOperation, AAZGenericInstanceUpdateOperation, \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/aaz/_command.py new/azure-cli-core-2.47.0/azure/cli/core/aaz/_command.py --- old/azure-cli-core-2.46.0/azure/cli/core/aaz/_command.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/aaz/_command.py 2023-03-31 11:26:38.000000000 +0200 @@ -12,6 +12,7 @@ from knack.commands import CLICommand, PREVIEW_EXPERIMENTAL_CONFLICT_ERROR from knack.deprecation import Deprecated from knack.experimental import ExperimentalItem +from knack.log import get_logger from knack.preview import PreviewItem from azure.cli.core.azclierror import CLIInternalError @@ -25,6 +26,9 @@ from .exceptions import AAZUnknownFieldError, AAZUnregisteredArg +logger = get_logger(__name__) + + class AAZCommandGroup: """Atomic Layer Command Group""" AZ_NAME = None @@ -392,6 +396,24 @@ return None +def _link_helper(pkg, name, mod, helper_cls_name="_Helper"): + helper_mod = importlib.import_module(mod, pkg) + helper = getattr(helper_mod, helper_cls_name) + return getattr(helper, name) + + +def link_helper(pkg, *links): + def _wrapper(cls): + for link in links: + if isinstance(link[1], str): + func = _link_helper(pkg, *link) + else: + func = getattr(link[1], link[0]) + setattr(cls, link[0], partial(func, cls)) + return cls + return _wrapper + + def _load_aaz_pkg(loader, pkg, parent_command_table, command_group_table, arg_str, fully_load): """ Load aaz commands and aaz command groups under a package folder. """ @@ -429,7 +451,13 @@ try: sub_pkg = importlib.import_module(f'.{sub_path}', pkg.__name__) except ModuleNotFoundError: + logger.debug('Failed to load package folder in aaz: %s.', os.path.join(pkg_path, sub_path)) continue + + if not sub_pkg.__file__: + logger.debug('Ignore invalid package folder in aaz: %s.', os.path.join(pkg_path, sub_path)) + continue + # recursively load sub package _load_aaz_pkg(loader, sub_pkg, command_table, command_group_table, arg_str, fully_load) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/aaz/_command_ctx.py new/azure-cli-core-2.47.0/azure/cli/core/aaz/_command_ctx.py --- old/azure-cli-core-2.46.0/azure/cli/core/aaz/_command_ctx.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/aaz/_command_ctx.py 2023-03-31 11:26:38.000000000 +0200 @@ -30,6 +30,11 @@ cmd_arg.apply(self.args, dest) elif cmd_arg != AAZUndefined: self.args[dest] = cmd_arg + elif dest == "subscription": + # support to specify the command's subscription when call AAZCommand directly in code + if isinstance(cmd_arg, str): + self._subscription_id = cmd_arg + self._clients = {} self._vars_schema = AAZObjectType() self.vars = AAZObject(schema=self._vars_schema, data={}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/cloud.py new/azure-cli-core-2.47.0/azure/cli/core/cloud.py --- old/azure-cli-core-2.46.0/azure/cli/core/cloud.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/cloud.py 2023-03-31 11:26:38.000000000 +0200 @@ -425,6 +425,8 @@ def get_known_clouds(refresh=False): if 'ARM_CLOUD_METADATA_URL' in os.environ: from azure.cli.core._session import CLOUD_ENDPOINTS + if not os.path.isdir(GLOBAL_CONFIG_DIR): + os.makedirs(GLOBAL_CONFIG_DIR) endpoints_file = os.path.join(GLOBAL_CONFIG_DIR, 'cloudEndpoints.json') CLOUD_ENDPOINTS.load(endpoints_file) if refresh: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/extension/__init__.py new/azure-cli-core-2.47.0/azure/cli/core/extension/__init__.py --- old/azure-cli-core-2.46.0/azure/cli/core/extension/__init__.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/extension/__init__.py 2023-03-31 11:26:38.000000000 +0200 @@ -55,7 +55,7 @@ self.extension_name = extension_name def __str__(self): - return "The extension {} is not installed.".format(self.extension_name) + return f"The extension {self.extension_name} is not installed. Please install the extension via `az extension add -n {self.extension_name}`." class Extension: @@ -205,6 +205,9 @@ ext = WheelExtension(ext_name, ext_path) if ext not in exts: exts.append(ext) + # https://docs.python.org/3/library/os.html#os.listdir, listdir is in arbitrary order. + # Sort the extensions by name to support overwrite extension feature: https://github.com/Azure/azure-cli/issues/25782. + exts.sort(key=lambda ext: ext.name) return exts @@ -272,6 +275,9 @@ _collect(os.path.join(path, item), depth + 1, max_depth) for source in DEV_EXTENSION_SOURCES: _collect(source) + # https://docs.python.org/3/library/os.html#os.listdir, listdir is in arbitrary order. + # Sort the extensions by name to support overwrite extension feature: https://github.com/Azure/azure-cli/issues/25782. + exts.sort(key=lambda ext: ext.name) return exts @@ -305,8 +311,8 @@ pos_mods = [n for n in os.listdir(ext_dir) if n.startswith(EXTENSIONS_MOD_PREFIX) and os.path.isdir(os.path.join(ext_dir, n))] if len(pos_mods) != 1: - raise AssertionError("Expected 1 module to load starting with " - "'{}': got {}".format(EXTENSIONS_MOD_PREFIX, pos_mods)) + raise AssertionError("Expected 1 module to load starting with '{}': got {}. Please delete {} and " + "install the extension again.".format(EXTENSIONS_MOD_PREFIX, pos_mods, ext_dir)) return pos_mods[0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/profiles/_shared.py new/azure-cli-core-2.47.0/azure/cli/core/profiles/_shared.py --- old/azure-cli-core-2.46.0/azure/cli/core/profiles/_shared.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/profiles/_shared.py 2023-03-31 11:26:38.000000000 +0200 @@ -49,6 +49,7 @@ MGMT_COMPUTE = ('azure.mgmt.compute', 'ComputeManagementClient') MGMT_NETWORK = ('azure.mgmt.network', 'NetworkManagementClient') MGMT_NETWORK_DNS = ('azure.mgmt.dns', 'DnsManagementClient') + MGMT_NETWORK_PRIVATEDNS = ('azure.mgmt.privatedns', 'PrivateDnsManagementClient') MGMT_AUTHORIZATION = ('azure.mgmt.authorization', 'AuthorizationManagementClient') MGMT_CONTAINERREGISTRY = ('azure.mgmt.containerregistry', 'ContainerRegistryManagementClient') MGMT_RESOURCE_FEATURES = ('azure.mgmt.resource.features', 'FeatureClient') @@ -60,6 +61,7 @@ MGMT_RESOURCE_DEPLOYMENTSCRIPTS = ('azure.mgmt.resource.deploymentscripts', 'DeploymentScriptsClient') MGMT_RESOURCE_TEMPLATESPECS = ('azure.mgmt.resource.templatespecs', 'TemplateSpecsClient') MGMT_RESOURCE_PRIVATELINKS = ('azure.mgmt.resource.privatelinks', 'ResourcePrivateLinkClient') + MGMT_RESOURCE_MANAGEDAPPLICATIONS = ('azure.mgmt.resource.managedapplications', 'ApplicationClient') MGMT_MONITOR = ('azure.mgmt.monitor', 'MonitorManagementClient') MGMT_MSI = ('azure.mgmt.msi', 'ManagedServiceIdentityClient') DATA_KEYVAULT = ('azure.keyvault', 'KeyVaultClient') @@ -77,7 +79,7 @@ MGMT_DATABOXEDGE = ('azure.mgmt.databoxedge', 'DataBoxEdgeManagementClient') MGMT_CUSTOMLOCATION = ('azure.mgmt.extendedlocation', 'CustomLocations') MGMT_CONTAINERSERVICE = ('azure.mgmt.containerservice', 'ContainerServiceClient') - MGMT_APPCONFIGURATION = ('azure.mgmt.appconfiguration', 'AppConfigurationManagementClient') + MGMT_APPCONTAINERS = ('azure.mgmt.appcontainers', 'ContainerAppsAPIClient') # the "None" below will stay till a command module fills in the type so "get_mgmt_service_client" # can be provided with "ResourceType.XXX" to initialize the client object. This usually happens @@ -171,13 +173,15 @@ ResourceType.MGMT_RESOURCE_LINKS: '2016-09-01', ResourceType.MGMT_RESOURCE_LOCKS: '2016-09-01', ResourceType.MGMT_RESOURCE_POLICY: '2021-06-01', - ResourceType.MGMT_RESOURCE_RESOURCES: '2021-04-01', + ResourceType.MGMT_RESOURCE_RESOURCES: '2022-09-01', ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2019-11-01', ResourceType.MGMT_RESOURCE_DEPLOYMENTSCRIPTS: '2020-10-01', ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2021-05-01', ResourceType.MGMT_RESOURCE_PRIVATELINKS: '2020-05-01', + ResourceType.MGMT_RESOURCE_MANAGEDAPPLICATIONS: '2018-06-01', ResourceType.MGMT_NETWORK_DNS: '2018-05-01', - ResourceType.MGMT_KEYVAULT: '2022-07-01', + ResourceType.MGMT_NETWORK_PRIVATEDNS: None, + ResourceType.MGMT_KEYVAULT: '2023-02-01', ResourceType.MGMT_AUTHORIZATION: SDKProfile('2022-04-01', { 'classic_administrators': '2015-06-01', 'role_definitions': '2022-04-01', @@ -248,13 +252,11 @@ ResourceType.MGMT_ARO: '2022-09-04', ResourceType.MGMT_DATABOXEDGE: '2021-02-01-preview', ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview', - ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2023-01-01', { + ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2023-02-01', { 'container_services': '2017-07-01', 'open_shift_managed_clusters': '2019-09-30-preview' }), - ResourceType.MGMT_APPCONFIGURATION: SDKProfile('2022-05-01', { - 'replicas': '2022-03-01-preview' - }), + ResourceType.MGMT_APPCONTAINERS: '2022-10-01', }, '2020-09-01-hybrid': { ResourceType.MGMT_STORAGE: '2019-06-01', @@ -280,6 +282,7 @@ ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2016-06-01', ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2015-01-01', ResourceType.MGMT_RESOURCE_PRIVATELINKS: '2020-05-01', + ResourceType.MGMT_RESOURCE_MANAGEDAPPLICATIONS: '2018-06-01', ResourceType.MGMT_NETWORK_DNS: '2016-04-01', ResourceType.MGMT_AUTHORIZATION: SDKProfile('2015-07-01', { 'classic_administrators': '2015-06-01', @@ -323,6 +326,7 @@ ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2016-06-01', ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2015-01-01', ResourceType.MGMT_RESOURCE_PRIVATELINKS: '2020-05-01', + ResourceType.MGMT_RESOURCE_MANAGEDAPPLICATIONS: '2018-06-01', ResourceType.MGMT_NETWORK_DNS: '2016-04-01', ResourceType.MGMT_KEYVAULT: '2016-10-01', ResourceType.MGMT_AUTHORIZATION: SDKProfile('2015-07-01', { @@ -361,6 +365,7 @@ ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2016-06-01', ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2015-01-01', ResourceType.MGMT_RESOURCE_PRIVATELINKS: '2020-05-01', + ResourceType.MGMT_RESOURCE_MANAGEDAPPLICATIONS: '2018-06-01', ResourceType.MGMT_NETWORK_DNS: '2016-04-01', ResourceType.MGMT_KEYVAULT: '2016-10-01', ResourceType.MGMT_AUTHORIZATION: SDKProfile('2015-07-01', { @@ -389,6 +394,7 @@ ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2016-06-01', ResourceType.MGMT_RESOURCE_PRIVATELINKS: '2020-05-01', ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2015-01-01', + ResourceType.MGMT_RESOURCE_MANAGEDAPPLICATIONS: '2018-06-01', ResourceType.MGMT_NETWORK_DNS: '2016-04-01', ResourceType.MGMT_KEYVAULT: '2016-10-01', ResourceType.MGMT_AUTHORIZATION: SDKProfile('2015-07-01', { @@ -410,10 +416,6 @@ # We should avoid using ad hoc API versions, # use the version in a profile as much as possible. AD_HOC_API_VERSIONS = { - ResourceType.MGMT_NETWORK: { - 'appservice_network': '2020-04-01', - 'appservice_ensure_subnet': '2019-02-01' - }, ResourceType.MGMT_CONTAINERREGISTRY: { # src/azure-cli/azure/cli/command_modules/acr/_client_factory.py:8 'VERSION_2019_05_01_PREVIEW': "2019-05-01-preview", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure/cli/core/telemetry.py new/azure-cli-core-2.47.0/azure/cli/core/telemetry.py --- old/azure-cli-core-2.46.0/azure/cli/core/telemetry.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure/cli/core/telemetry.py 2023-03-31 11:26:38.000000000 +0200 @@ -47,6 +47,7 @@ self.extension_name = None self.extension_version = None self.event_id = str(uuid.uuid4()) + self.cli_recommendation = None self.feedback = None self.extension_management_detail = None self.raw_command = None @@ -178,8 +179,7 @@ set_custom_properties(result, 'Source', source) set_custom_properties(result, 'ClientRequestId', - lambda: self.application.data['headers'][ - 'x-ms-client-request-id']) + lambda: self.application.data['headers'].get('x-ms-client-request-id', '')) set_custom_properties(result, 'CoreVersion', _get_core_version) set_custom_properties(result, 'TelemetryVersion', "2.0") set_custom_properties(result, 'InstallationId', _get_installation_id) @@ -201,6 +201,7 @@ set_custom_properties(result, 'PythonVersion', platform.python_version()) set_custom_properties(result, 'ModuleCorrelation', self.module_correlation) set_custom_properties(result, 'ExtensionName', ext_info) + set_custom_properties(result, 'CLIRecommendation', self.cli_recommendation) set_custom_properties(result, 'Feedback', self.feedback) set_custom_properties(result, 'ExtensionManagementDetail', self.extension_management_detail) set_custom_properties(result, 'Mode', self.mode) @@ -404,6 +405,14 @@ @decorators.suppress_all_exceptions() +def set_cli_recommendation(api_version, feedback): + # This function returns the user's selection and feedback on the cli-recommendation results + # Please refer to feedback_design.md of cli-recommendation for detailed information + _session.cli_recommendation = {"api_version": api_version, + "feedback": feedback} + + +@decorators.suppress_all_exceptions() def set_extension_management_detail(ext_name, ext_version): content = '{}@{}'.format(ext_name, ext_version) _session.extension_management_detail = content[:512] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/azure_cli_core.egg-info/PKG-INFO new/azure-cli-core-2.47.0/azure_cli_core.egg-info/PKG-INFO --- old/azure-cli-core-2.46.0/azure_cli_core.egg-info/PKG-INFO 2023-03-06 10:39:37.000000000 +0100 +++ new/azure-cli-core-2.47.0/azure_cli_core.egg-info/PKG-INFO 2023-03-31 11:27:03.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-cli-core -Version: 2.46.0 +Version: 2.47.0 Summary: Microsoft Azure Command-Line Tools Core Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-core-2.46.0/setup.py new/azure-cli-core-2.47.0/setup.py --- old/azure-cli-core-2.46.0/setup.py 2023-03-06 10:39:15.000000000 +0100 +++ new/azure-cli-core-2.47.0/setup.py 2023-03-31 11:26:38.000000000 +0200 @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "2.46.0" +VERSION = "2.47.0" # If we have source, validate that our version numbers match # This should prevent uploading releases with mismatched versions.