Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upgrade for 2023.10.1 #2080

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/_nebari/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,16 +529,16 @@ def _version_specific_upgrade(
return config


class Upgrade_2023_9_1(UpgradeStep):
version = "2023.9.1"
class Upgrade_2023_10_1(UpgradeStep):
version = "2023.10.1"
# JupyterHub Helm chart 2.0.0 (app version 3.0.0) requires K8S Version >=1.23. (reference: https://z2jh.jupyter.org/en/stable/)
# This released has been tested against 1.26
min_k8s_version = 1.26

def _version_specific_upgrade(
self, config, start_version, config_filename: Path, *args, **kwargs
):
# Upgrading to 2023.9.1 is considered high-risk because it includes a major refacto
# Upgrading to 2023.10.1 is considered high-risk because it includes a major refacto
# to introduce the extension mechanism system.
rich.print("\n ⚠️ Warning ⚠️")
rich.print(
Expand All @@ -555,7 +555,7 @@ def _version_specific_upgrade(
# which they can override if they are happy they understand the situation.
config["prevent_deploy"] = True

# Nebari version 2023.9.1 upgrades JupyterHub to 3.1. CDS Dashboards are only compatible with
# Nebari version 2023.10.1 upgrades JupyterHub to 3.1. CDS Dashboards are only compatible with
# JupyterHub versions 1.X and so will be removed during upgrade.
rich.print("\n ⚠️ Deprecation Warning ⚠️")
rich.print(
iameskild marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
18 changes: 9 additions & 9 deletions tests/tests_unit/test_cli_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from typer.testing import CliRunner

import _nebari.upgrade
import _nebari.version
from _nebari.cli import create_cli
from _nebari.constants import AZURE_DEFAULT_REGION
from _nebari.upgrade import UPGRADE_KUBERNETES_MESSAGE
from _nebari.utils import get_provider_config_block_name
from _nebari.version import rounded_ver_parse

MOCK_KUBERNETES_VERSIONS = {
"aws": ["1.20"],
Expand Down Expand Up @@ -393,12 +393,12 @@ def test_cli_upgrade_to_0_4_0_fails_for_custom_auth_without_attempt_fixes():


@pytest.mark.skipif(
_nebari.upgrade.__version__ < "2023.9.1",
reason="This test is only valid for versions <= 2023.9.1",
rounded_ver_parse(_nebari.upgrade.__version__) < rounded_ver_parse("2023.10.1"),
reason="This test is only valid for versions >= 2023.10.1",
)
def test_cli_upgrade_to_2023_9_1_cdsdashboard_removed(monkeypatch: pytest.MonkeyPatch):
def test_cli_upgrade_to_2023_10_1_cdsdashboard_removed(monkeypatch: pytest.MonkeyPatch):
start_version = "2023.7.2"
end_version = "2023.9.1"
end_version = "2023.10.1"

addl_config = yaml.safe_load(
"""
Expand All @@ -422,8 +422,8 @@ def test_cli_upgrade_to_2023_9_1_cdsdashboard_removed(monkeypatch: pytest.Monkey


@pytest.mark.skipif(
_nebari.upgrade.__version__ < "2023.9.1",
reason="This test is only valid for versions <= 2023.9.1",
rounded_ver_parse(_nebari.upgrade.__version__) < rounded_ver_parse("2023.10.1"),
reason="This test is only valid for versions >= 2023.10.1",
)
@pytest.mark.parametrize(
("provider", "k8s_status"),
Expand All @@ -442,11 +442,11 @@ def test_cli_upgrade_to_2023_9_1_cdsdashboard_removed(monkeypatch: pytest.Monkey
("gcp", "invalid"),
],
)
def test_cli_upgrade_to_2023_9_1_kubernetes_validations(
def test_cli_upgrade_to_2023_10_1_kubernetes_validations(
monkeypatch: pytest.MonkeyPatch, provider: str, k8s_status: str
):
start_version = "2023.7.2"
end_version = "2023.9.1"
end_version = "2023.10.1"
monkeypatch.setattr(_nebari.upgrade, "__version__", end_version)

kubernetes_configs = {
Expand Down