From c4dc53ae84715eb212eefdf65720e8580906e1a0 Mon Sep 17 00:00:00 2001 From: Himani Deshpande Date: Fri, 1 Mar 2024 14:36:53 -0500 Subject: [PATCH] Shorten the action needed message shown on resizing of the compute fleet --- cli/src/pcluster/config/update_policy.py | 6 ++---- cli/tests/pcluster/config/test_update_policy.py | 6 ++---- .../tests/custom_resource/test_cluster_custom_resource.py | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/cli/src/pcluster/config/update_policy.py b/cli/src/pcluster/config/update_policy.py index 8d408fdf04..cc20fd3eef 100644 --- a/cli/src/pcluster/config/update_policy.py +++ b/cli/src/pcluster/config/update_policy.py @@ -122,10 +122,8 @@ def actions_needed_queue_update_strategy(change, _): def actions_needed_resize_update_strategy_on_remove(*_): return ( - "Stop the compute fleet with the pcluster update-compute-fleet command, " - "or set QueueUpdateStrategy to TERMINATE in the configuration used for the 'update-cluster' operation. " - "Be aware that this update will remove nodes from the scheduler and terminates the EC2 instances " - "associated. Jobs running on the removed nodes will terminate" + "Stop the compute fleet or set QueueUpdateStrategy:TERMINATE in config " + "to remove nodes from the scheduler, terminate the associated instances & any running jobs" ) diff --git a/cli/tests/pcluster/config/test_update_policy.py b/cli/tests/pcluster/config/test_update_policy.py index d8b1b031e4..6ab9bf9d33 100644 --- a/cli/tests/pcluster/config/test_update_policy.py +++ b/cli/tests/pcluster/config/test_update_policy.py @@ -485,10 +485,8 @@ def test_condition_checker_resize_update_strategy_on_remove( "All compute nodes must be stopped or QueueUpdateStrategy must be set to TERMINATE" ) assert_that(UpdatePolicy.RESIZE_UPDATE_STRATEGY_ON_REMOVE.action_needed(change_mock, patch_mock)).is_equal_to( - "Stop the compute fleet with the pcluster update-compute-fleet command, or set QueueUpdateStrategy to " - "TERMINATE in the configuration used for the 'update-cluster' operation. Be aware that this update will remove " - "nodes from the scheduler and terminates the EC2 instances associated. Jobs running on the removed nodes will " - "terminate" + "Stop the compute fleet or set QueueUpdateStrategy:TERMINATE in config " + "to remove nodes from the scheduler, terminate the associated instances & any running jobs" ) cluster_has_running_capacity_mock.assert_called() diff --git a/tests/integration-tests/tests/custom_resource/test_cluster_custom_resource.py b/tests/integration-tests/tests/custom_resource/test_cluster_custom_resource.py index bad63f12fe..321cc437da 100644 --- a/tests/integration-tests/tests/custom_resource/test_cluster_custom_resource.py +++ b/tests/integration-tests/tests/custom_resource/test_cluster_custom_resource.py @@ -173,7 +173,7 @@ def test_cluster_update_invalid( for cluster_config_path, error in [ # CloudFormation truncates error messages, # so we cannot specify the full error message here, but only a part of it. - ("pcluster.config.reducemaxcount.yaml", "Jobs running on the removed nodes will terminate"), + ("pcluster.config.reducemaxcount.yaml", "Stop the compute fleet or set QueueUpdateStrategy:TERMINATE"), ("pcluster.config.negativemaxcount.yaml", "Must be greater than or equal to 1."), ("pcluster.config.wrongscripturi.yaml", "s3 url 's3://invalid' is invalid."), ]: