Skip to content

Commit

Permalink
Catch errors when getting status of VM Image build (#2418)
Browse files Browse the repository at this point in the history
Catch errors when getting status of VM Image build

Fixes #2417
RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

Reviewed-by: Nikola Forró
Reviewed-by: Maja Massarini
  • Loading branch information
2 parents b54885f + f9a92d5 commit e2fbf60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packit_service/worker/helpers/build/babysit.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,14 @@ def update_vm_image_build(build_id: int, build: "VMImageBuildTargetModel"):
message = f"No response for VM Image Build {build_id}: {ex}"
logger.error(message)
status = VMImageBuildStatus.error
except Exception as ex:
message = (
f"There was an exception when getting status of the VM "
f"Image Build {build_id}: {ex}"
)
logger.error(message)
# keep polling
return False

if status in (
VMImageBuildStatus.pending,
Expand Down

0 comments on commit e2fbf60

Please sign in to comment.