From 86b706e6e6abb9a2361f4b80e62ecc45defea072 Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Thu, 19 Oct 2023 19:31:01 +0000 Subject: [PATCH 1/3] Update upgrade for 2023.10.1 --- src/_nebari/upgrade.py | 8 ++++---- tests/tests_unit/test_cli_upgrade.py | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/_nebari/upgrade.py b/src/_nebari/upgrade.py index fba60767e..eebf685ea 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( 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 = { From ca69b68fbbf5c1fd35be14d994a05981a7622977 Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Fri, 20 Oct 2023 12:08:35 +0000 Subject: [PATCH 2/3] add deprecation warning --- src/_nebari/upgrade.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/_nebari/upgrade.py b/src/_nebari/upgrade.py index eebf685ea..6185b4c40 100644 --- a/src/_nebari/upgrade.py +++ b/src/_nebari/upgrade.py @@ -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( + f"-> 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/) From d0487073b82d050c75d84f8a4c0670d4ebf4f95f Mon Sep 17 00:00:00 2001 From: Ken Foster Date: Fri, 20 Oct 2023 16:01:33 +0000 Subject: [PATCH 3/3] run precommit --- src/_nebari/upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_nebari/upgrade.py b/src/_nebari/upgrade.py index 6185b4c40..077c58203 100644 --- a/src/_nebari/upgrade.py +++ b/src/_nebari/upgrade.py @@ -568,7 +568,7 @@ def _version_specific_upgrade( # Deprecation Warning - ClearML, Prefect, kbatch rich.print("\n ⚠️ Deprecation Warning ⚠️") rich.print( - f"-> 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]." + "-> 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