Skip to content

Commit

Permalink
fix: add no_wait to the build service update command (#6347)
Browse files Browse the repository at this point in the history
  • Loading branch information
smile37773 authored May 31, 2023
1 parent 56deefc commit 8f84eb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/spring/HISTORY.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/spring/azext_spring/_build_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion src/spring/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f84eb1

Please sign in to comment.