Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: changes for az iot ops upgrade display text #425

Merged
merged 2 commits into from
Oct 25, 2024
Merged
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
12 changes: 7 additions & 5 deletions azext_edge/edge/providers/orchestration/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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:
Expand Down