Skip to content

Commit

Permalink
fix skip
Browse files Browse the repository at this point in the history
  • Loading branch information
arianvp committed Mar 2, 2024
1 parent bcdc521 commit a639044
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions upload-ami/src/upload_ami/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ def smoke_test(image_id, run_id, cancel):
InstanceMarketOptions={"MarketType": "spot"},
)

instance_id = run_instances["Instances"][0]["InstanceId"]
instance = run_instances["Instances"][0]
instance_id = instance["InstanceId"]

try:
if not cancel and run_instances[0]["State"]["Name"] != "terminated":
if not cancel and instance["State"]["Name"] != "terminated":
# This basically waits for DHCP to have finished; as it uses ARP to check if the instance is healthy
logging.info(f"Waiting for instance {instance_id} to be running")
ec2.get_waiter("instance_running").wait(InstanceIds=[instance_id])
Expand Down

0 comments on commit a639044

Please sign in to comment.