Skip to content

Commit 0bb58e5

Browse files
committed
Merge branch 'main' of https://github.com/Azure/azure-cli into brett/untagged-manifest-update
2 parents ae104a7 + 0494144 commit 0bb58e5

File tree

406 files changed

+260717
-225397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+260717
-225397
lines changed

.github/policies/resourceManagement.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ configuration:
235235
mentionees:
236236
- mojayara
237237
- jportugal0
238+
- pkrishnanms
238239
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
239240
assignMentionees: False
240241
- if:
@@ -2093,7 +2094,8 @@ configuration:
20932094
then:
20942095
- mentionUsers:
20952096
mentionees:
2096-
- Tanmayeekamath
2097+
- anishtrakru
2098+
- derekbekoe
20972099
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
20982100
assignMentionees: False
20992101
- if:
@@ -2395,7 +2397,8 @@ configuration:
23952397
mentionees:
23962398
- RandalliLama
23972399
- schaabs
2398-
- jlichwa
2400+
- chen-karen
2401+
- chandanrr
23992402
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
24002403
assignMentionees: False
24012404
- if:
@@ -4245,7 +4248,7 @@ configuration:
42454248
then:
42464249
- mentionUsers:
42474250
mentionees:
4248-
- wonner
4251+
- wanyang7
42494252
- v-yanjungao
42504253
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
42514254
assignMentionees: False

linter_exclusions.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,14 @@ appconfig update:
728728
encryption_key_version:
729729
rule_exclusions:
730730
- option_length_too_long
731+
enable_arm_private_network_access:
732+
rule_exclusions:
733+
- option_length_too_long
734+
appconfig create:
735+
parameters:
736+
enable_arm_private_network_access:
737+
rule_exclusions:
738+
- option_length_too_long
731739
appservice ase create:
732740
parameters:
733741
force_network_security_group:

src/azure-cli-core/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
2.67.0
7+
++++++
8+
* PREVIEW: Support managed identity on Azure Arc-enabled Windows server (#29187)
9+
610
2.66.0
711
++++++
812
* `aaz`: Support managed identity (#29953)

src/azure-cli-core/azure/cli/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --------------------------------------------------------------------------------------------
55
# pylint: disable=line-too-long
66

7-
__version__ = "2.66.0"
7+
__version__ = "2.67.0"
88

99
import os
1010
import sys

src/azure-cli-core/azure/cli/core/aaz/_field_value.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def to_serialized_data(self, processor=None, **kwargs):
478478

479479
result = self._build_identity(calculate_data, result)
480480

481-
if not result:
481+
if not result and calculate_data.get("action", None) == "remove":
482482
result = {"type": "None"} # empty identity
483483

484484
if not result and self._is_patch:

src/azure-cli-core/azure/cli/core/breaking_change.py

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

1414
logger = get_logger()
1515

16-
NEXT_BREAKING_CHANGE_RELEASE = '2.67.0'
16+
NEXT_BREAKING_CHANGE_RELEASE = '2.73.0'
1717
DEFAULT_BREAKING_CHANGE_TAG = '[Breaking Change]'
1818

1919

src/azure-cli-core/azure/cli/core/extension/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,9 @@ def is_stable_from_metadata(item):
380380
return not (item["metadata"].get(EXT_METADATA_ISPREVIEW, False) or
381381
item["metadata"].get(EXT_METADATA_ISEXPERIMENTAL, False) or
382382
is_preview_from_semantic_version(item["metadata"]['version']))
383+
384+
385+
def is_preview_from_metadata(item):
386+
return bool(item["metadata"].get(EXT_METADATA_ISPREVIEW, False) or
387+
item["metadata"].get(EXT_METADATA_ISEXPERIMENTAL, False) or
388+
is_preview_from_semantic_version(item["metadata"]['version']))

src/azure-cli-core/azure/cli/core/extension/_resolve.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from packaging.version import parse
66
from typing import Callable, List, NamedTuple, Union
77

8-
from azure.cli.core.extension import ext_compat_with_cli, WHEEL_INFO_RE, is_stable_from_metadata
8+
from azure.cli.core.extension import (ext_compat_with_cli, WHEEL_INFO_RE,
9+
is_stable_from_metadata, is_preview_from_metadata)
910
from azure.cli.core.extension._index import get_index_extensions
1011

1112
from knack.log import get_logger
@@ -104,6 +105,28 @@ def resolve_from_index(extension_name, cur_version=None, index_url=None, target_
104105
if not candidates:
105106
raise NoExtensionCandidatesError(f"No extension found with name '{extension_name}'")
106107

108+
if allow_preview is None:
109+
# default value of allow-preview changed from true to false
110+
# and the following part deals with two influenced scenariors if user does not specify allow-preview
111+
# 1. if extension module does not have any stable version, set allow-preview=True and display warning message to
112+
# unblock those extension module user
113+
# 2. if extension module has a later preview version than stable one, dispaly a warning message to user
114+
# indicating how to try the newer preview one, but allow-preview is still set to be False by default
115+
allow_preview = False
116+
stable_candidates = list(filter(is_stable_from_metadata, candidates))
117+
preview_candidates = list(filter(is_preview_from_metadata, candidates))
118+
if len(stable_candidates) == 0:
119+
logger.warning("No stable version of '%s' to install. Preview versions allowed.", extension_name)
120+
allow_preview = True
121+
elif len(preview_candidates) != 0:
122+
max_preview_item = max(preview_candidates, key=lambda x: parse(x['metadata']['version']))
123+
max_stable_item = max(stable_candidates, key=lambda x: parse(x['metadata']['version']))
124+
if parse(max_preview_item['metadata']['version']) > parse(max_stable_item['metadata']['version']):
125+
logger.warning("Extension '%s' has a later preview version to install, add `--allow-preview True` "
126+
"to try preview version.", extension_name)
127+
else:
128+
logger.info("No preview versions need to be tried.")
129+
107130
# Helper to curry predicate functions
108131
def list_filter(f):
109132
return lambda cs: list(filter(f, cs))
@@ -120,7 +143,7 @@ def list_filter(f):
120143
_ExtensionFilter(
121144
filter=list_filter(is_stable_from_metadata),
122145
on_empty_results_message=f"No suitable stable version of '{extension_name}' to install. "
123-
f"Add `--allow-preview` to try preview versions"
146+
f"Add `--allow-preview True` to try preview versions"
124147
)]
125148

126149
if target_version:

src/azure-cli-core/azure/cli/core/extension/dynamic_install.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ def _get_extension_run_after_dynamic_install_config(cli_ctx):
110110

111111

112112
def _get_extension_allow_preview_install_config(cli_ctx):
113-
default_value = True
114-
if cli_ctx and cli_ctx.config.get('extension', 'dynamic_install_allow_preview', None) is None:
115-
logger.warning("Preview version of extension is enabled by default for extension installation now. "
116-
"Will be disabled in future release. ")
117-
logger.warning("Please run 'az config set extension.dynamic_install_allow_preview=true or false' "
118-
"to config it specifically. ")
119-
dynamic_install_allow_preview = cli_ctx.config.getboolean('extension',
120-
'dynamic_install_allow_preview',
121-
default_value) if cli_ctx else default_value
113+
dynamic_install_allow_preview = None
114+
if cli_ctx:
115+
if cli_ctx.config.get('extension', 'dynamic_install_allow_preview', None) is None:
116+
logger.warning("Preview version of extension is disabled by default for extension installation, "
117+
"enabled for modules without stable versions. ")
118+
logger.warning("Please run 'az config set extension.dynamic_install_allow_preview=true or false' "
119+
"to config it specifically. ")
120+
else:
121+
dynamic_install_allow_preview = cli_ctx.config.getboolean('extension', 'dynamic_install_allow_preview')
122122
return dynamic_install_allow_preview
123123

124124

src/azure-cli-core/azure/cli/core/extension/operations.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,6 @@ def check_version_compatibility(azext_metadata):
306306
def add_extension(cmd=None, source=None, extension_name=None, index_url=None, yes=None, # pylint: disable=unused-argument, too-many-statements
307307
pip_extra_index_urls=None, pip_proxy=None, system=None,
308308
version=None, cli_ctx=None, upgrade=None, allow_preview=None):
309-
if allow_preview is None:
310-
logger.warning("Default enabled including preview versions for extension installation now. "
311-
"Disabled in future release. "
312-
"Use '--allow-preview true' to enable it specifically if needed. "
313-
"Use '--allow-preview false' to install stable version only. ")
314-
allow_preview = True
315309
ext_sha256 = None
316310
update_to_latest = version == 'latest' and not source
317311

@@ -405,12 +399,6 @@ def show_extension(extension_name):
405399

406400

407401
def update_extension(cmd=None, extension_name=None, index_url=None, pip_extra_index_urls=None, pip_proxy=None, allow_preview=None, cli_ctx=None, version=None, download_url=None, ext_sha256=None):
408-
if allow_preview is None:
409-
logger.warning("Default enabled including preview versions for extension installation now. "
410-
"Disabled in future release. "
411-
"Use '--allow-preview true' to enable it specifically if needed. "
412-
"Use '--allow-preview false' to install stable version only. ")
413-
allow_preview = True
414402
try:
415403
cmd_cli_ctx = cli_ctx or cmd.cli_ctx
416404
ext = get_extension(extension_name, ext_type=WheelExtension)

0 commit comments

Comments
 (0)