Skip to content

Commit

Permalink
Add attempt_fixes to Upgrade_2024_11_1._version_specific_upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Nov 11, 2024
1 parent 91ecca0 commit d053d04
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/_nebari/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ⚠️")
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d053d04

Please sign in to comment.