Skip to content

Commit 87578e5

Browse files
authored
Merge branch 'main' into kananmehta/artifactstreaming-cli-update
2 parents b32b7de + cc6d0bd commit 87578e5

File tree

9 files changed

+161
-7
lines changed

9 files changed

+161
-7
lines changed

src/aks-preview/HISTORY.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ To release a new version, please select a new version number (usually plus 1 to
1111

1212
Pending
1313
+++++++
14+
* `az aks nodepool update`: Add `--disable-artifact-streaming` to disable artifact streaming.
15+
16+
19.0.0b28
17+
+++++++
1418
* Fix `match_condition` kwarg leaking to HTTP transport by overriding `put_mc` and `add_agentpool` to pass `if_match` / `if_none_match` directly to the vendored SDK. This change fixes the compatibility issue as azure-cli/acs module adopts TypeSpec emitted SDKs while azure-cli-extensions/aks-preview still uses the autorest emitted SDK.
1519
+ `az aks list-vm-skus`: New command to list available VM SKUs for AKS clusters in a given region.
1620
* `az aks create/update`: Add `--enable-service-account-image-pull`, `--disable-service-account-image-pull`, and `--service-account-image-pull-default-managed-identity-id` parameters to manage service account based image pull settings.
1721
* `az aks list-vm-skus`: New command to list available VM SKUs for AKS clusters in a given region.
1822
* Add managed GPU enablement option to node pool property in `az aks nodepool add` and `az aks nodepool update`.
19-
* `az aks nodepool update`: Add `--disable-artifact-streaming` to disable artifact streaming.
23+
* `az aks namespace update`: Fix location should use existing namespace location.
2024

2125
19.0.0b27
2226
+++++++

src/aks-preview/azext_aks_preview/managednamespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def aks_managed_namespace_update(cmd, client, raw_parameters, headers, existedNa
201201
namespace_name = raw_parameters.get("name")
202202

203203
namespace_config = updateNamespace(cmd, raw_parameters, existedNamespace)
204-
namespace_config.location = get_cluster_location(cmd, resource_group_name, cluster_name)
204+
namespace_config.location = existedNamespace.location
205205

206206
return sdk_no_wait(
207207
no_wait,

src/aks-preview/azext_aks_preview/tests/latest/test_managednamespace.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,52 @@ def test_update_managed_namespace_with_invalid_delete_policy(self, mock_get_clie
287287
ns.aks_managed_namespace_update(cmd, None, raw_parameters, None, None, False)
288288
self.assertIn(err, str(cm.exception))
289289

290+
def test_update_managed_namespace_sets_location_from_existing_namespace(self, mock_get_client):
291+
register_aks_preview_resource_type()
292+
cli_ctx = MockCLI()
293+
cmd = MockCmd(cli_ctx)
294+
295+
mock_client = Mock()
296+
297+
existing_ns = Mock()
298+
existing_ns.name = "test_managed_namespace"
299+
existing_ns.location = "westus2"
300+
existing_ns.properties.default_resource_quota.cpu_request = "300m"
301+
existing_ns.properties.default_resource_quota.cpu_limit = "500m"
302+
existing_ns.properties.default_resource_quota.memory_request = "1Gi"
303+
existing_ns.properties.default_resource_quota.memory_limit = "2Gi"
304+
existing_ns.properties.default_network_policy.ingress = "DenyAll"
305+
existing_ns.properties.default_network_policy.egress = "AllowAll"
306+
existing_ns.properties.adoption_policy = "Never"
307+
existing_ns.properties.delete_policy = "Keep"
308+
309+
raw_parameters = {
310+
"resource_group_name": "test_rg",
311+
"cluster_name": "test_cluster",
312+
"name": "test_managed_namespace",
313+
"tags": {},
314+
"labels": None,
315+
"annotations": ["a=c"],
316+
"cpu_request": None,
317+
"cpu_limit": None,
318+
"memory_request": None,
319+
"memory_limit": None,
320+
"ingress_policy": None,
321+
"egress_policy": None,
322+
"adoption_policy": None,
323+
"delete_policy": None,
324+
}
325+
326+
ns.aks_managed_namespace_update(cmd, mock_client, raw_parameters, None, existing_ns, False)
327+
328+
# The namespace passed to begin_create_or_update should carry the existing location
329+
call_args = mock_client.begin_create_or_update.call_args
330+
namespace_config = call_args[0][3] # 4th positional arg
331+
self.assertEqual(namespace_config.location, "westus2")
332+
333+
# No managed cluster GET should be needed for the update path
334+
mock_get_client.assert_not_called()
335+
290336

291337
if __name__ == "__main__":
292338
unittest.main()

src/aks-preview/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
VERSION = "19.0.0b27"
12+
VERSION = "19.0.0b28"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",

src/aosm/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
33
Release History
44
===============
5+
2.0.0b6
6+
++++++++
7+
* Updating genson dependency to 1.3.0 to fix update/install issues with azure cli version 2.84.0.
8+
* This version requires a minimum of 2.78.0 Azure core CLI. See install instructions: https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-conceptual/Latest-version/install-azure-cli.md
9+
510
2.0.0b5
611
++++++++
712
* Remove `__import__('pkg_resources').declare_namespace(__name__)` from `vendored_sdks/azure_storagev2/__init__.py` to fix the namespace package issue.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"azext.isPreview": true,
3-
"azext.minCliCoreVersion": "2.70.0"
3+
"azext.minCliCoreVersion": "2.78.0"
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# --------------------------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
4+
# --------------------------------------------------------------------------------------------

src/aosm/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Confirm this is the right version number you want and it matches your
1919
# HISTORY.rst entry.
20-
VERSION = "2.0.0b5"
20+
VERSION = "2.0.0b6"
2121

2222

2323
# The full list of classifiers is available at
@@ -36,7 +36,7 @@
3636
DEPENDENCIES = [
3737
"oras==0.1.30",
3838
"jinja2==3.1.6",
39-
"genson==1.2.2",
39+
"genson==1.3.0",
4040
"ruamel.yaml==0.18.6",
4141
]
4242

src/index.json

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22024,6 +22024,63 @@
2202422024
"version": "2.0.0b5"
2202522025
},
2202622026
"sha256Digest": "4115f3d7954614bdeec68001f6f95d2608db3c17ad2215f86d237d0642ebd8e3"
22027+
},
22028+
{
22029+
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aosm-2.0.0b6-py3-none-any.whl",
22030+
"filename": "aosm-2.0.0b6-py3-none-any.whl",
22031+
"metadata": {
22032+
"azext.isPreview": true,
22033+
"azext.minCliCoreVersion": "2.78.0",
22034+
"classifiers": [
22035+
"Development Status :: 4 - Beta",
22036+
"Intended Audience :: Developers",
22037+
"Intended Audience :: System Administrators",
22038+
"Programming Language :: Python",
22039+
"Programming Language :: Python :: 3",
22040+
"Programming Language :: Python :: 3.7",
22041+
"Programming Language :: Python :: 3.8",
22042+
"License :: OSI Approved :: MIT License"
22043+
],
22044+
"extensions": {
22045+
"python.details": {
22046+
"contacts": [
22047+
{
22048+
"email": "azpycli@microsoft.com",
22049+
"name": "Microsoft Corporation",
22050+
"role": "author"
22051+
}
22052+
],
22053+
"document_names": {
22054+
"description": "DESCRIPTION.rst"
22055+
},
22056+
"project_urls": {
22057+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aosm"
22058+
}
22059+
}
22060+
},
22061+
"extras": [],
22062+
"generator": "bdist_wheel (0.30.0)",
22063+
"license": "MIT",
22064+
"metadata_version": "2.0",
22065+
"name": "aosm",
22066+
"run_requires": [
22067+
{
22068+
"requires": [
22069+
"genson (==1.3.0)",
22070+
"genson==1.3.0",
22071+
"jinja2 (==3.1.6)",
22072+
"jinja2==3.1.6",
22073+
"oras (==0.1.30)",
22074+
"oras==0.1.30",
22075+
"ruamel.yaml (==0.18.6)",
22076+
"ruamel.yaml==0.18.6"
22077+
]
22078+
}
22079+
],
22080+
"summary": "Microsoft Azure Command-Line Tools Aosm Extension",
22081+
"version": "2.0.0b6"
22082+
},
22083+
"sha256Digest": "6be24263f6d15c425cfaedc6a436e464c027123f4725ec3b6c2ef038d426603a"
2202722084
}
2202822085
],
2202922086
"apic-extension": [
@@ -108115,6 +108172,48 @@
108115108172
"version": "1.12.3"
108116108173
},
108117108174
"sha256Digest": "82e15e31d8ebad4b2c829772cd5285175567fc2f9ecb4437385a1a94bf16bff6"
108175+
},
108176+
{
108177+
"downloadUrl": "https://hciarcvmsstorage.z13.web.core.windows.net/cli-extensions/stack_hci_vm-1.13.0-py3-none-any.whl",
108178+
"filename": "stack_hci_vm-1.13.0-py3-none-any.whl",
108179+
"metadata": {
108180+
"azext.minCliCoreVersion": "2.15.0",
108181+
"classifiers": [
108182+
"Development Status :: 4 - Beta",
108183+
"Intended Audience :: Developers",
108184+
"Intended Audience :: System Administrators",
108185+
"Programming Language :: Python",
108186+
"Programming Language :: Python :: 3",
108187+
"Programming Language :: Python :: 3.6",
108188+
"Programming Language :: Python :: 3.7",
108189+
"Programming Language :: Python :: 3.8",
108190+
"License :: OSI Approved :: MIT License"
108191+
],
108192+
"extensions": {
108193+
"python.details": {
108194+
"contacts": [
108195+
{
108196+
"email": "azpycli@microsoft.com",
108197+
"name": "Microsoft Corporation",
108198+
"role": "author"
108199+
}
108200+
],
108201+
"document_names": {
108202+
"description": "DESCRIPTION.rst"
108203+
},
108204+
"project_urls": {
108205+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/stack-hci-vm"
108206+
}
108207+
}
108208+
},
108209+
"generator": "bdist_wheel (0.30.0)",
108210+
"license": "MIT",
108211+
"metadata_version": "2.0",
108212+
"name": "stack-hci-vm",
108213+
"summary": "Microsoft Azure Command-Line Tools Stack-HCi-VM Extension",
108214+
"version": "1.13.0"
108215+
},
108216+
"sha256Digest": "fc6289cbbfa24f7ddebe767852935707d18d056b622c83895e1939559a30228b"
108118108217
}
108119108218
],
108120108219
"standbypool": [

0 commit comments

Comments
 (0)