Skip to content

Commit

Permalink
[Service Connector] release version and make some improvement (#7225)
Browse files Browse the repository at this point in the history
  • Loading branch information
xfz11 authored Jan 30, 2024
1 parent 6d0fe08 commit c32f1ce
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/serviceconnector-passwordless/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release History
===============
1.0.1
++++++
* Make some improvements to fix non-json output issue

1.0.0
++++++
* Support function app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ def get_create_query(self):


def getSourceHandler(source_id, source_type):
if source_type in {RESOURCE.WebApp}:
if source_type in {RESOURCE.WebApp, RESOURCE.FunctionApp}:
return WebappHandler(source_id, source_type)
if source_type in {RESOURCE.ContainerApp}:
return ContainerappHandler(source_id, source_type)
Expand Down Expand Up @@ -1020,15 +1020,15 @@ def get_identity_pid(self):
logger.warning('Enabling WebApp System Identity...')
if self.slot_name is None:
run_cli_cmd(
'az webapp identity assign --ids {}'.format(self.source_id))
'az webapp identity assign --ids "{}"'.format(self.source_id))

identity = run_cli_cmd(
'az webapp identity show --ids {}'.format(self.source_id), 15, 5, output_is_none)
'az webapp identity show --ids "{}"'.format(self.source_id), 15, 5, output_is_none)
else:
run_cli_cmd(
'az webapp identity assign --ids {} --slot {}'.format(self.source_id, self.slot_name))
'az webapp identity assign --ids "{}" --slot "{}"'.format(self.source_id, self.slot_name))
identity = run_cli_cmd(
'az webapp identity show --ids {} --slot {}'.format(self.source_id, self.slot_name), 15, 5, output_is_none)
'az webapp identity show --ids "{}" --slot "{}"'.format(self.source_id, self.slot_name), 15, 5, output_is_none)

if identity is None:
ex = CLIInternalError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ def should_load_source(source):
return should_load_source_base(source)


def run_cli_cmd(cmd, retry=0, interval=0, should_retry_func=None):
def run_cli_cmd(cmd, retry=0, interval=0, should_retry_func=None, should_return_json=True):
try:
if should_return_json:
return run_cli_cmd_base(cmd + ' -o json', retry, interval, should_retry_func)
return run_cli_cmd_base(cmd, retry, interval, should_retry_func)
except CLIInternalError as e:
error_code = 'Unknown'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# --------------------------------------------------------------------------------------------


VERSION = '1.0.0'
VERSION = '1.0.1'
NAME = 'serviceconnector-passwordless'
2 changes: 1 addition & 1 deletion src/serviceconnector-passwordless/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")


VERSION = '1.0.0'
VERSION = '1.0.1'
try:
from azext_serviceconnector_passwordless.config import VERSION
except ImportError:
Expand Down

0 comments on commit c32f1ce

Please sign in to comment.