From d3e47182aa376bfa9666e9472ae9e3c1c7213d87 Mon Sep 17 00:00:00 2001 From: Ray Chan Date: Mon, 24 Jun 2024 14:07:56 +0800 Subject: [PATCH] docs: add more information when highest release is achieved. (#448) --- cou/steps/plan.py | 8 ++++++-- tests/unit/steps/test_plan.py | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cou/steps/plan.py b/cou/steps/plan.py index 258457e6..263999e3 100644 --- a/cou/steps/plan.py +++ b/cou/steps/plan.py @@ -183,8 +183,12 @@ def _verify_highest_release_achieved(analysis_result: Analysis) -> None: if o7k_release and current_series and str(o7k_release) == last_supported: raise HighestReleaseAchieved( f"No upgrades available for OpenStack {str(o7k_release).capitalize()} on " - f"Ubuntu {current_series.capitalize()}.\nNewer OpenStack releases " - "may be available after upgrading to a later Ubuntu series." + f"Ubuntu {current_series.capitalize()}.\nIn future releases of COU, newer " + "OpenStack releases may available after manually upgrading to a later Ubuntu series.\n" + "Charmed OpenStack Upgrader will not support upgrade across series,\n" + "please refer to the official documentation on how to do series upgrade:\n" + "- https://docs.openstack.org/charm-guide/latest/admin/upgrades/series.html\n" + "- https://docs.openstack.org/charm-guide/latest/admin/upgrades/series-openstack.html" ) diff --git a/tests/unit/steps/test_plan.py b/tests/unit/steps/test_plan.py index 69ce6bfe..497d94e7 100644 --- a/tests/unit/steps/test_plan.py +++ b/tests/unit/steps/test_plan.py @@ -541,8 +541,13 @@ def test_verify_highest_release_achieved(): mock_analysis_result.current_cloud_o7k_release = OpenStackRelease("yoga") mock_analysis_result.current_cloud_series = "focal" exp_error_msg = ( - "No upgrades available for OpenStack Yoga on Ubuntu Focal.\n" - "Newer OpenStack releases may be available after upgrading to a later Ubuntu series." + "No upgrades available for OpenStack Yoga on " + "Ubuntu Focal.\nIn future releases of COU, newer OpenStack releases " + "may available after manually upgrading to a later Ubuntu series.\n" + "Charmed OpenStack Upgrader will not support upgrade across series,\n" + "please refer to the official documentation on how to do series upgrade:\n" + "- https://docs.openstack.org/charm-guide/latest/admin/upgrades/series.html\n" + "- https://docs.openstack.org/charm-guide/latest/admin/upgrades/series-openstack.html" ) with pytest.raises(HighestReleaseAchieved, match=exp_error_msg): cou_plan._verify_highest_release_achieved(mock_analysis_result)