From d053d048788d29a6169ae6daa1f3f3a9937343b0 Mon Sep 17 00:00:00 2001 From: smokestacklightnin <125844868+smokestacklightnin@users.noreply.github.com> Date: Sun, 10 Nov 2024 00:02:40 -0800 Subject: [PATCH] Add `attempt_fixes` to `Upgrade_2024_11_1._version_specific_upgrade` --- src/_nebari/upgrade.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/_nebari/upgrade.py b/src/_nebari/upgrade.py index 41e27c49c..177d182d2 100644 --- a/src/_nebari/upgrade.py +++ b/src/_nebari/upgrade.py @@ -1291,7 +1291,13 @@ class Upgrade_2024_11_1(UpgradeStep): @override def _version_specific_upgrade( - self, config, start_version, config_filename: Path, *args, **kwargs + self, + config, + start_version, + config_filename: Path, + *args, + attempt_fixes=False, + **kwargs, ): if config.get("provider", "") == ProviderEnum.azure.value: rich.print("\n ⚠️ Upgrade Warning ⚠️") @@ -1341,13 +1347,9 @@ def _version_specific_upgrade( keycloak_admin = None # Prompt the user for role assignment (if yes, transforms the response into bool) - assign_roles = ( - Prompt.ask( - "[bold]Would you like Nebari to assign the corresponding role/scopes to all of your current groups automatically?[/bold]", - choices=["y", "N"], - default="N", - ).lower() - == "y" + assign_roles = attempt_fixes or Confirm.ask( + "[bold]Would you like Nebari to assign the corresponding role/scopes to all of your current groups automatically?[/bold]", + default=False, ) if assign_roles: