Skip to content

Commit 0f76bba

Browse files
himani2411Himani Deshpande
andauthored
Shorten the action needed message shown on resizing of the compute fleet (#6144)
Co-authored-by: Himani Deshpande <himanidp@amazon.com>
1 parent 2cfd928 commit 0f76bba

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

cli/src/pcluster/config/update_policy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,8 @@ def actions_needed_queue_update_strategy(change, _):
122122

123123
def actions_needed_resize_update_strategy_on_remove(*_):
124124
return (
125-
"Stop the compute fleet with the pcluster update-compute-fleet command, "
126-
"or set QueueUpdateStrategy to TERMINATE in the configuration used for the 'update-cluster' operation. "
127-
"Be aware that this update will remove nodes from the scheduler and terminates the EC2 instances "
128-
"associated. Jobs running on the removed nodes will terminate"
125+
"Stop the compute fleet or set QueueUpdateStrategy:TERMINATE in config "
126+
"to remove nodes from the scheduler, terminate the associated instances & any running jobs"
129127
)
130128

131129

cli/tests/pcluster/config/test_update_policy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,8 @@ def test_condition_checker_resize_update_strategy_on_remove(
485485
"All compute nodes must be stopped or QueueUpdateStrategy must be set to TERMINATE"
486486
)
487487
assert_that(UpdatePolicy.RESIZE_UPDATE_STRATEGY_ON_REMOVE.action_needed(change_mock, patch_mock)).is_equal_to(
488-
"Stop the compute fleet with the pcluster update-compute-fleet command, or set QueueUpdateStrategy to "
489-
"TERMINATE in the configuration used for the 'update-cluster' operation. Be aware that this update will remove "
490-
"nodes from the scheduler and terminates the EC2 instances associated. Jobs running on the removed nodes will "
491-
"terminate"
488+
"Stop the compute fleet or set QueueUpdateStrategy:TERMINATE in config "
489+
"to remove nodes from the scheduler, terminate the associated instances & any running jobs"
492490
)
493491
cluster_has_running_capacity_mock.assert_called()
494492

tests/integration-tests/tests/custom_resource/test_cluster_custom_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_cluster_update_invalid(
173173
for cluster_config_path, error in [
174174
# CloudFormation truncates error messages,
175175
# so we cannot specify the full error message here, but only a part of it.
176-
("pcluster.config.reducemaxcount.yaml", "Jobs running on the removed nodes will terminate"),
176+
("pcluster.config.reducemaxcount.yaml", "Stop the compute fleet or set QueueUpdateStrategy:TERMINATE"),
177177
("pcluster.config.negativemaxcount.yaml", "Must be greater than or equal to 1."),
178178
("pcluster.config.wrongscripturi.yaml", "s3 url 's3://invalid' is invalid."),
179179
]:

0 commit comments

Comments
 (0)