Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions chipflow_lib/steps/silicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def submit(self, rtlil_path, *, dry_run=False, wait=False):

# Poll the status API until the build is completed or failed
stream_event_counter = 0
fail_counter = 0
if wait:
while True:
logger.info("Polling build status...")
Expand All @@ -207,8 +208,11 @@ def submit(self, rtlil_path, *, dry_run=False, wait=False):
auth=(None, chipflow_api_key)
)
if status_resp.status_code != 200:
logger.error(f"Failed to fetch build status: {status_resp.text}")
raise ChipFlowError("Error while checking build status.")
fail_counter += 1
logger.error(f"Failed to fetch build status {fail_counter} times: {status_resp.text}")
if fail_counter > 5:
logger.error(f"Failed to fetch build status {fail_counter} times. Exiting.")
raise ChipFlowError("Error while checking build status.")

status_data = status_resp.json()
build_status = status_data.get("status")
Expand Down
Loading