From b38f78c96082b0e2983a0c1e85b2c8de0a953970 Mon Sep 17 00:00:00 2001 From: Mateusz Russak Date: Tue, 22 Oct 2024 14:29:44 +0200 Subject: [PATCH] feat(deploy): better feedback after deploy fail --- src/writer/deploy.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/writer/deploy.py b/src/writer/deploy.py index dfba5ba57..022bf044e 100644 --- a/src/writer/deploy.py +++ b/src/writer/deploy.py @@ -265,11 +265,16 @@ def upload_package(deploy_url, tar, token, env, verbose=False, sleep_interval=5) print("Deployment successful") print(f"URL: {url}") sys.exit(0) + elif status == "FAILED": + print("Deployment failed") + print(f"URL: {url}") + sys.exit(1) else: time.sleep(sleep_interval) check_service_status(deploy_url, token, build_id, build_time, start_time, datetime.now(pytz.timezone('UTC')), status) - print("Deployment failed") - sys.exit(1) + print("Deployment status timeout") + print(f"URL: {url}") + sys.exit(2) def on_error_print_and_raise(resp, verbose=False): try: