From 8f84eb1e80f673c80e7e287c07bd9d07ca6dc618 Mon Sep 17 00:00:00 2001 From: Qingyi Liu <34502364+smile37773@users.noreply.github.com> Date: Wed, 31 May 2023 14:34:52 +0800 Subject: [PATCH] fix: add no_wait to the build service update command (#6347) --- src/spring/HISTORY.md | 4 ++++ src/spring/azext_spring/_build_service.py | 4 ++-- src/spring/setup.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/spring/HISTORY.md b/src/spring/HISTORY.md index 998a1cad898..ce0d9b47610 100644 --- a/src/spring/HISTORY.md +++ b/src/spring/HISTORY.md @@ -1,5 +1,9 @@ Release History =============== +1.13.1 +--- +* Fix the parameter `--no-wait` of the command -- `az spring build-service update`. + 1.13.0 --- * Add new command -- `az spring apm show` to show the APM resource. diff --git a/src/spring/azext_spring/_build_service.py b/src/spring/azext_spring/_build_service.py index f70d07f0e09..3855178508b 100644 --- a/src/spring/azext_spring/_build_service.py +++ b/src/spring/azext_spring/_build_service.py @@ -152,14 +152,14 @@ def build_result_list(cmd, client, resource_group, service, build_name=None): return client.build_service.list_build_results(resource_group, service, DEFAULT_BUILD_SERVICE_NAME, build_name) -def update_build_service(cmd, client, resource_group, service, registry_name=None): +def update_build_service(cmd, client, resource_group, service, registry_name=None, no_wait=False): subscription = get_subscription_id(cmd.cli_ctx) service_resource_id = '/subscriptions/{}/resourceGroups/{}/providers/Microsoft.AppPlatform/Spring/{}'.format(subscription, resource_group, service) build_service_properties = models.BuildServiceProperties( container_registry='{}/containerregistries/{}'.format(service_resource_id, registry_name) if registry_name else None) build_service_resource = models.BuildService( properties=build_service_properties) - return client.build_service.begin_create_or_update(resource_group, service, DEFAULT_BUILD_SERVICE_NAME, build_service_resource) + return sdk_no_wait(no_wait, client.build_service.begin_create_or_update, resource_group, service, DEFAULT_BUILD_SERVICE_NAME, build_service_resource) def build_service_show(cmd, client, resource_group, service): diff --git a/src/spring/setup.py b/src/spring/setup.py index a9fb83f3856..dcf27e5d6eb 100644 --- a/src/spring/setup.py +++ b/src/spring/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.13.0' +VERSION = '1.13.1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers