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 15, 2024
1 parent 1fdb8fb commit 47df80c
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 @@ -1292,7 +1292,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 @@ -1342,13 +1348,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 47df80c

Please sign in to comment.