Skip to content

Commit b751fcc

Browse files
committed
pr comments
1 parent 370e5c1 commit b751fcc

File tree

5 files changed

+1062
-570
lines changed

5 files changed

+1062
-570
lines changed

src/azure-cli/azure/cli/command_modules/acs/custom.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,6 @@ def aks_update(
843843
try:
844844
# update mc profile
845845
mc = aks_update_decorator.update_mc_profile_default()
846-
# Update kubernetes_version and orchestrator_version based on auto_upgrade_channel
847-
mc = aks_update_decorator.update_kubernetes_version_and_orchestrator_version(mc)
848846
except DecoratorEarlyExitException:
849847
# exit gracefully
850848
return None

src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8482,6 +8482,8 @@ def update_mc_profile_default(self) -> ManagedCluster:
84828482
mc = self.update_node_resource_group_profile(mc)
84838483
# update bootstrap profile
84848484
mc = self.update_bootstrap_profile(mc)
8485+
# update kubernetes version and orchestrator version
8486+
mc = self.update_kubernetes_version_and_orchestrator_version(mc)
84858487
return mc
84868488

84878489
def update_kubernetes_version_and_orchestrator_version(self, mc: ManagedCluster) -> ManagedCluster:
@@ -8500,7 +8502,7 @@ def update_kubernetes_version_and_orchestrator_version(self, mc: ManagedCluster)
85008502
"currentKubernetesVersion, all agent pools orchestratorVersion will be set to the value of "
85018503
"currentOrchestratorVersion respectively. Continue?"
85028504
)
8503-
if not prompt_y_n(warning_message, default="n"):
8505+
if not self.context.get_yes() and not prompt_y_n(warning_message, default="n"):
85048506
raise CLIError("Operation cancelled by user.")
85058507

85068508
# Set kubernetes version to match the current kubernetes version if it has a value

0 commit comments

Comments
 (0)