Skip to content

Commit

Permalink
docs: add more information when highest release is achieved. (canonic…
Browse files Browse the repository at this point in the history
  • Loading branch information
chanchiwai-ray authored Jun 24, 2024
1 parent c95aa7f commit d3e4718
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 6 additions & 2 deletions cou/steps/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
9 changes: 7 additions & 2 deletions tests/unit/steps/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d3e4718

Please sign in to comment.