Skip to content
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
8 changes: 8 additions & 0 deletions src/azure-cli-core/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
===============

2.24.2
++++++
* No changes

2.24.1
++++++
* No changes

2.24.0
++++++
* Fix issue #16798: Azure CLI output is corrupted! (#18065)
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.24.0"
__version__ = "2.24.2"

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.24.0"
VERSION = "2.24.2"

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

2.24.2
++++++

**Container**

* Hotfix: Fix #18276: `az container create` fails with `AttributeError: 'ResourcesOperations' object has no attribute 'create_or_update'`

2.24.1
++++++

**App Service**

* Hotfix: Fix #18266 - webapp config appsettings set command causing all values to default to "false"

**ARM**
* Hotfix: Fix deserialization issue in the What-If formatter of ARM template

**Compute**
* Hotfix: Fix the bad request issue when creating VMSS in Azure Stack

**IoT**
* Hotfix: Fix issue for removing last user-assigned identity from IoT Hub

2.24.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 @@ -17,7 +17,7 @@
from knack.log import get_logger

__author__ = "Microsoft Corporation <[email protected]>"
__version__ = "2.24.0"
__version__ = "2.24.2"


# A workaround for https://bugs.python.org/issue32502 (https://github.com/Azure/azure-cli/issues/5184)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def update_app_settings(cmd, resource_group_name, name, settings=None, slot=None
dest[setting_name] = value
result.update(dest)

result.update(slot_result)
for setting_name, value in result.items():
app_settings.properties[setting_name] = value
client = web_client_factory(cmd.cli_ctx)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def test_webapp_config_appsettings(self, resource_group):
def test_update_webapp_settings_thru_json(self, resource_group):
webapp_name = self.create_random_name('webapp-config-test', 40)
plan_name = self.create_random_name('webapp-config-plan', 40)

slot = 'staging'
# update through a json file with key value pair
_, settings_file = tempfile.mkstemp()
with open(settings_file, 'w+') as file:
Expand All @@ -585,6 +585,11 @@ def test_update_webapp_settings_thru_json(self, resource_group):
'appservice plan create -g {} -n {} --sku S1'.format(resource_group, plan_name))
self.cmd(
'webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan_name))
# create an empty slot
self.cmd('webapp deployment slot create -g {} -n {} --slot {}'.format(resource_group, webapp_name, slot),
checks=[
JMESPathCheck('name', slot)
])

output = self.cmd('webapp config appsettings set -g {} -n {} --settings s=value "@{}"'.format(
resource_group, webapp_name, settings_file)).get_output_in_json()
Expand Down Expand Up @@ -617,17 +622,40 @@ def test_update_webapp_settings_thru_json(self, resource_group):

self.assertEqual(output[0], {
'name': 's',
'value': 'False',
'value': 'value',
'slotSetting': False
})
self.assertEqual(output[1], {
'name': 's2',
'value': 'False',
'value': 'value2',
'slotSetting': False
})
self.assertEqual(output[2], {
'name': 's3',
'value': 'True',
'value': 'value3',
'slotSetting': True
})
with open(settings_file, 'w') as file:
file.write(json.dumps(output))

output = self.cmd('webapp config appsettings set -g {} -n {} --slot {} --settings "@{}"'.format(
resource_group, webapp_name, slot, settings_file)).get_output_in_json()
output = [s for s in output if s['name'] in ['s', 's2', 's3']]
output.sort(key=lambda s: s['name'])

self.assertEqual(output[0], {
'name': 's',
'value': 'value',
'slotSetting': False
})
self.assertEqual(output[1], {
'name': 's2',
'value': 'value2',
'slotSetting': False
})
self.assertEqual(output[2], {
'name': 's3',
'value': 'value3',
'slotSetting': True
})
# update site config
Expand All @@ -640,7 +668,8 @@ def test_update_webapp_settings_thru_json(self, resource_group):
self.cmd('webapp config set -g {} -n {} --generic-configurations "@{}"'.format(resource_group, webapp_name, settings_file)).assert_with_checks([
JMESPathCheck("requestTracingEnabled", True),
JMESPathCheck("alwaysOn", True),
])
])



class WebappScaleTest(ScenarioTest):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def _create_update_from_file(cli_ctx, resource_group_name, name, location, file,
api_version = cg_defintion.get('apiVersion', None) or container_group_client.api_version

return sdk_no_wait(no_wait,
resource_client.resources.create_or_update,
resource_client.resources.begin_create_or_update,
resource_group_name,
"Microsoft.ContainerInstance",
'',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def populate_change_type_set(property_changes):
change_type_color = _change_type_to_color[change_type]
_format_indent(builder)
builder.append(change_type_symbol, change_type_color).append(Symbol.WHITE_SPACE)
builder.append_line(change_type.value.title())
builder.append_line(change_type.title())


def _format_resource_changes_stats(builder, resource_changes):
Expand Down
Loading