From 967348069f6c002f088d280af18e60d6b2ce23be Mon Sep 17 00:00:00 2001 From: Simon Li Date: Sun, 27 Nov 2022 23:15:20 +0000 Subject: [PATCH] Add `inspect` to container debugging --- .github/integration-test.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/integration-test.py b/.github/integration-test.py index 0dc93e4..c67e273 100755 --- a/.github/integration-test.py +++ b/.github/integration-test.py @@ -45,9 +45,21 @@ def check_container_ready(container_name, timeout=60): now = time.time() while True: try: - container_check_output(["exec", "-t", container_name, "id"]) + out = container_check_output(["exec", "-t", container_name, "id"]) + print(out.decode()) return - except subprocess.CalledProcessError: + except subprocess.CalledProcessError as e: + print(e) + try: + out = container_check_output(["inspect", container_name]) + print(out.decode()) + except subprocess.CalledProcessError as e: + print(e) + try: + out = container_check_output(["logs", container_name]) + print(out.decode()) + except subprocess.CalledProcessError as e: + print(e) if time.time() - now > timeout: raise RuntimeError(f"Container {container_name} hasn't started") time.sleep(5)