Skip to content

Commit

Permalink
update upgrade message & default prompt to no
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusdc committed Sep 24, 2024
1 parent d0c6ca9 commit e45e585
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions src/_nebari/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,22 +1236,29 @@ def _version_specific_upgrade(
)
rich.print("")

rich.print("\n ⚠️ Warning ⚠️")
rich.print(
f"Nebari version [green]{self.version}[/green] introduces changes to how group directories are mounted in JupyterLab pods.\n\n"
"[bold]What does this mean?[/bold]\n"
"- Only groups with specific permissions will have their directories mounted.\n"
"- You need to confirm how Nebari should handle your groups.\n\n"
"[bold yellow]No data will be lost during this operation.[/bold yellow]\n"
"You can reverse this at any time by adding or removing the `allow-group-directory-creation-role` from your groups in the Keycloak UI.\n\n"
"For more information, please see the [green][link=https://www.nebari.dev/docs/how-tos/group-directory-creation]documentation[/link][/green].\n"
rich.print("\n ⚠️ Upgrade Warning ⚠️")

text = textwrap.dedent(
"""
Nebari version [green]2024.9.1[/green] introduces changes to how group
directories are mounted in JupyterLab pods, now only groups with specific
permissions will have their directories mounted.
You will be asked to confirm how Nebari should handle your groups.
No data will be lost during this operation. You can reverse this at any time
by adding or removing the `allow-group-directory-creation-role` from your
groups in the Keycloak UI.
For more information, please see the [green][link=https://www.nebari.dev/docs/how-tos/group-directory-creation]documentation[/link][/green].
"""
)
rich.print(text)

# Prompt the user for action
confirm = Prompt.ask(
"[bold]Would you like Nebari to update your group permissions now?[/bold] (y/n)",
choices=["y", "n"],
default="y",
choices=["y", "N"],
default="N",
)

if confirm.lower() == "y":
Expand Down

0 comments on commit e45e585

Please sign in to comment.