Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Service Connector] release version and make some improvement #7225

Merged
merged 5 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
++++++
xfz11 marked this conversation as resolved.
Show resolved Hide resolved
* Release new version and make some improvements

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
Loading