@@ -1457,40 +1457,39 @@ async def _remove_tags_and_return(
14571457 * list_pre_pulled_images_tag_keys (node .ec2_instance .tags ),
14581458 ],
14591459 )
1460- else :
1461- match ssm_command .status :
1462- case "Success" :
1463- _logger .info ("%s finished pre-pulling images" , node .ec2_instance .id )
1464- return await _remove_tags_and_return (
1465- node ,
1466- [
1467- MACHINE_PULLING_EC2_TAG_KEY ,
1468- MACHINE_PULLING_COMMAND_ID_EC2_TAG_KEY ,
1469- ],
1470- )
1471- case "Failed" | "TimedOut" :
1472- _logger .error (
1473- "%s failed pre-pulling images, status is %s. this will be retried later" ,
1474- node .ec2_instance .id ,
1475- ssm_command .status ,
1476- )
1477- return await _remove_tags_and_return (
1478- node ,
1479- [
1480- MACHINE_PULLING_EC2_TAG_KEY ,
1481- MACHINE_PULLING_COMMAND_ID_EC2_TAG_KEY ,
1482- * list_pre_pulled_images_tag_keys (node .ec2_instance .tags ),
1483- ],
1484- )
1485- case _:
1486- _logger .info (
1487- "%s is pre-pulling %s, status is %s" ,
1488- node .ec2_instance .id ,
1489- load_pre_pulled_images_from_tags (node .ec2_instance .tags ),
1490- ssm_command .status ,
1491- )
1492- # skip the instance this time as this is still ongoing
1493- return node
1460+ match ssm_command .status :
1461+ case "Success" :
1462+ _logger .info ("%s finished pre-pulling images" , node .ec2_instance .id )
1463+ return await _remove_tags_and_return (
1464+ node ,
1465+ [
1466+ MACHINE_PULLING_EC2_TAG_KEY ,
1467+ MACHINE_PULLING_COMMAND_ID_EC2_TAG_KEY ,
1468+ ],
1469+ )
1470+ case "Failed" | "TimedOut" :
1471+ _logger .error (
1472+ "%s failed pre-pulling images, status is %s. this will be retried later" ,
1473+ node .ec2_instance .id ,
1474+ ssm_command .status ,
1475+ )
1476+ return await _remove_tags_and_return (
1477+ node ,
1478+ [
1479+ MACHINE_PULLING_EC2_TAG_KEY ,
1480+ MACHINE_PULLING_COMMAND_ID_EC2_TAG_KEY ,
1481+ * list_pre_pulled_images_tag_keys (node .ec2_instance .tags ),
1482+ ],
1483+ )
1484+ case _:
1485+ _logger .info (
1486+ "%s is pre-pulling %s, status is %s" ,
1487+ node .ec2_instance .id ,
1488+ load_pre_pulled_images_from_tags (node .ec2_instance .tags ),
1489+ ssm_command .status ,
1490+ )
1491+ # skip the instance this time as this is still ongoing
1492+ return node
14941493
14951494
14961495async def _pre_pull_docker_images_on_idle_hot_buffers (
0 commit comments