Skip to content

Commit

Permalink
Test error catching
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeliton committed Mar 5, 2024
1 parent 35868af commit 2d02d25
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/docker_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ def build(node: Node) -> Tuple[bool, str]:
step += 1

report += content_str + '\n'

# Error detection. The docker client is not throwing errors if the build fails.
# These errors are caught by our tests unless we scan these lines manually.
if 'errorDetail' in line:
logger.error(f"Docker returned build error during build of {node.image_name},\n {build_e}")
return False, report

# time for last step
last_t, m, s = get_time_duration(last_t)
report += f'Step {step} took [{m} min {s} sec] \n'
Expand Down

0 comments on commit 2d02d25

Please sign in to comment.