7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-07 08:30:48 +00:00

fix: tutor local upgrade --from=nutmeg

There is nothing to do in the upgrade from nutmeg to olive, but it's not a
reason to crash this command.

Close #756.
This commit is contained in:
Régis Behmo 2022-12-12 23:28:22 +01:00 committed by Régis Behmo
parent b4a1b9528a
commit 609b39b802
3 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,7 @@ from tutor.commands import jobs
from tutor.commands.config import save as config_save_command
from tutor.commands.context import BaseTaskContext
from tutor.commands.upgrade.k8s import upgrade_from
from tutor.commands.upgrade import OPENEDX_RELEASE_NAMES
from tutor.tasks import BaseTaskRunner
from tutor.types import Config, get_typed
@ -461,7 +462,7 @@ def wait(context: K8sContext, name: str) -> None:
@click.option(
"--from",
"from_release",
type=click.Choice(["ironwood", "juniper", "koa", "lilac", "maple"]),
type=click.Choice(OPENEDX_RELEASE_NAMES),
)
@click.pass_context
def upgrade(context: click.Context, from_release: Optional[str]) -> None:

View File

@ -10,6 +10,7 @@ from tutor import utils
from tutor.commands import compose
from tutor.commands.config import save as config_save_command
from tutor.commands.upgrade.local import upgrade_from
from tutor.commands.upgrade import OPENEDX_RELEASE_NAMES
from tutor.types import Config, get_typed
@ -188,7 +189,7 @@ def quickstart(
@click.option(
"--from",
"from_release",
type=click.Choice(["ironwood", "juniper", "koa", "lilac", "maple"]),
type=click.Choice(OPENEDX_RELEASE_NAMES),
)
@click.pass_context
def upgrade(context: click.Context, from_release: t.Optional[str]) -> None:

View File

@ -0,0 +1,2 @@
# Note: don't forget to change this when we upgrade from olive
OPENEDX_RELEASE_NAMES = ["ironwood", "juniper", "koa", "lilac", "maple", "nutmeg"]