Skip to content

Commit

Permalink
added assertion to make it clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Nov 8, 2023
1 parent ac4e5ed commit 8a75ee5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ def find_selected_instance_type_for_task(
)
raise Ec2InstanceInvalidError(msg=msg)

assert len(filtered_instances) == 1 # nosec
selected_instance = filtered_instances[0]

# check that the assigned resources and the machine resource fit
if auto_scaling_mode.get_max_resources_from_task(task) > Resources(
cpus=selected_instance.cpus, ram=selected_instance.ram
Expand Down

0 comments on commit 8a75ee5

Please sign in to comment.