From 76769e0ff26f941a2272cc5a75e0e95d71c1c8d9 Mon Sep 17 00:00:00 2001 From: kenafoster Date: Fri, 20 Oct 2023 13:30:43 -0400 Subject: [PATCH] Update upgrade for 2023.10.1 (#2080) --- src/_nebari/upgrade.py | 14 ++++++++++---- tests/tests_unit/test_cli_upgrade.py | 18 +++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/_nebari/upgrade.py b/src/_nebari/upgrade.py index fba60767e..077c58203 100644 --- a/src/_nebari/upgrade.py +++ b/src/_nebari/upgrade.py @@ -529,8 +529,8 @@ 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 @@ -538,7 +538,7 @@ class Upgrade_2023_9_1(UpgradeStep): 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( @@ -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( @@ -565,6 +565,12 @@ def _version_specific_upgrade( rich.print("-> Removing cdsdashboards from config file.") del config["cdsdashboards"] + # Deprecation Warning - ClearML, Prefect, kbatch + rich.print("\n ⚠️ Deprecation Warning ⚠️") + rich.print( + "-> We will be removing and ending support for ClearML, Prefect and kbatch in the next release. The kbatch has been functionally replaced by Argo-Jupyter-Scheduler. We have seen little interest in ClearML and Prefect in recent years, and removing makes sense at this point. However if you wish to continue using them with Nebari we encourage you to [green][link=https://www.nebari.dev/docs/how-tos/nebari-extension-system/#developing-an-extension]write your own Nebari extension[/link][/green]." + ) + # Kubernetes version check # JupyterHub Helm chart 2.0.0 (app version 3.0.0) requires K8S Version >=1.23. (reference: https://z2jh.jupyter.org/en/stable/) diff --git a/tests/tests_unit/test_cli_upgrade.py b/tests/tests_unit/test_cli_upgrade.py index 91d8c0b29..aa79838be 100644 --- a/tests/tests_unit/test_cli_upgrade.py +++ b/tests/tests_unit/test_cli_upgrade.py @@ -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"], @@ -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( """ @@ -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"), @@ -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 = {