diff --git a/azext_edge/edge/providers/orchestration/upgrade.py b/azext_edge/edge/providers/orchestration/upgrade.py index 368125cbc..9c491e9b3 100644 --- a/azext_edge/edge/providers/orchestration/upgrade.py +++ b/azext_edge/edge/providers/orchestration/upgrade.py @@ -112,7 +112,7 @@ def do_work(self, confirm_yes: Optional[bool] = None): print() print("[yellow]Upgrading may fail and require you to delete and re-create your cluster.[/yellow]") - should_bail = not should_continue_prompt(confirm_yes=confirm_yes) + should_bail = not should_continue_prompt(confirm_yes=confirm_yes, context="Upgrade") if should_bail: return @@ -155,8 +155,9 @@ def _check_extensions(self) -> str: "properties" : { "autoUpgradeMinorVersion": "false", "releaseTrain": train_map[extension_key], - "version": version_map[extension_key] - } + "version": version_map[extension_key], + }, + "currentVersion": current_version } if extension_type == "microsoft.openservicemesh": @@ -186,8 +187,9 @@ def _check_extensions(self) -> str: # text to print (ordered) display_desc = "[dim]" for extension, update in self.extensions_to_update.items(): - version = update["properties"]["version"] - display_desc += f"• {extension}: {version}\n" + new_version = update["properties"]["version"] + old_version = update.pop("currentVersion") + display_desc += f"• {extension}: {old_version} -> {new_version}\n" return display_desc[:-1] + "" def _get_resource_map(self) -> IoTOperationsResourceMap: