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

{Branch Management} Merge release 2.53.1 back to dev #27682

Merged
merged 5 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all 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/azure-cli-core/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

2.53.1
++++++
* No changes

2.53.0
++++++
* `aaz`: Fix command name case issue for aaz command table lazy load (#27344)
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long

__version__ = "2.53.0"
__version__ = "2.53.1"

import os
import sys
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = "2.53.0"
VERSION = "2.53.1"

# If we have source, validate that our version numbers match
# This should prevent uploading releases with mismatched versions.
Expand Down
11 changes: 11 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
Release History
===============

2.53.1
++++++

**AKS**

* Hotfix: `az aks update`: Fix bug where supportPlan can be reset to None (#27664)

**App Service**

* [BREAKING CHANGE] Redact appsettings output on set/delete commands (#27565)

2.53.0
++++++

Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from knack.log import get_logger

__author__ = "Microsoft Corporation <python@microsoft.com>"
__version__ = "2.53.0"
__version__ = "2.53.1"


# A workaround for https://bugs.python.org/issue32502 (https://github.com/Azure/azure-cli/issues/5184)
Expand Down
20 changes: 16 additions & 4 deletions src/azure-cli/azure/cli/command_modules/appservice/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def update_app_settings(cmd, resource_group_name, name, settings=None, slot=None
app_settings_slot_cfg_names = slot_cfg_names.app_setting_names
client.web_apps.update_slot_configuration_names(resource_group_name, name, slot_cfg_names)

return _build_app_settings_output(result.properties, app_settings_slot_cfg_names)
return _build_app_settings_output(result.properties, app_settings_slot_cfg_names, redact=True)


# TODO: Update manual polling to use LongRunningOperation once backend API & new SDK supports polling
Expand Down Expand Up @@ -1561,7 +1561,10 @@ def delete_app_settings(cmd, resource_group_name, name, setting_names, slot=None
result = _generic_settings_operation(cmd.cli_ctx, resource_group_name, name,
'update_application_settings',
app_settings, slot, client)
return _build_app_settings_output(result.properties, slot_cfg_names.app_setting_names if slot_cfg_names else [])

return _build_app_settings_output(result.properties,
slot_cfg_names.app_setting_names if slot_cfg_names else [],
redact=True)


def delete_azure_storage_accounts(cmd, resource_group_name, name, custom_id, slot=None):
Expand Down Expand Up @@ -1597,11 +1600,20 @@ def _ssl_context():
return ssl.create_default_context()


def _build_app_settings_output(app_settings, slot_cfg_names):
def _build_app_settings_output(app_settings, slot_cfg_names, redact=False):
slot_cfg_names = slot_cfg_names or []
return [{'name': p,
'value': app_settings[p],
'slotSetting': p in slot_cfg_names} for p in _mask_creds_related_appsettings(app_settings)]
'slotSetting': p in slot_cfg_names} for p in (_redact_appsettings(app_settings) if redact
else _mask_creds_related_appsettings(app_settings))]


def _redact_appsettings(settings):
logger.warning('App settings have been redacted. '
'Use `az webapp/logicapp/functionapp config appsettings list` to view.')
for x in settings:
settings[x] = None
return settings


def _build_app_settings_input(settings, connection_string_type):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,13 @@ def set_staticsite_app_settings(cmd, name, setting_pairs, resource_group_name=No
app_settings.properties[k] = v

if not environment_name:
return client.create_or_update_static_site_app_settings(
result = client.create_or_update_static_site_app_settings(
resource_group_name, name, app_settings=app_settings)
else:
result = client.create_or_update_static_site_build_app_settings(
resource_group_name, name, environment_name, app_settings=app_settings)

return client.create_or_update_static_site_build_app_settings(
resource_group_name, name, environment_name, app_settings=app_settings)
return _redact_appsettings(result)


def delete_staticsite_app_settings(cmd, name, setting_names, resource_group_name=None, environment_name=None):
Expand All @@ -320,11 +322,20 @@ def delete_staticsite_app_settings(cmd, name, setting_names, resource_group_name
logger.warning("key '%s' not found in app settings", key)

if not environment_name:
return client.create_or_update_static_site_app_settings(
result = client.create_or_update_static_site_app_settings(
resource_group_name, name, app_settings=app_settings)
else:
result = client.create_or_update_static_site_build_app_settings(
resource_group_name, name, environment_name, app_settings=app_settings)

return client.create_or_update_static_site_build_app_settings(
resource_group_name, name, environment_name, app_settings=app_settings)
return _redact_appsettings(result)


def _redact_appsettings(payload):
logger.warning('App settings have been redacted. Use `az staticwebapp appsettings list` to view.')
for x in payload.properties:
payload.properties[x] = None
return payload


def list_staticsite_users(cmd, name, resource_group_name=None, authentication_provider='all'):
Expand Down
Loading
Loading