From 3b8e116dfd267827ff7cd739f7c3b3ff08bf72cb Mon Sep 17 00:00:00 2001 From: liyaqin1 <42289525+liyaqin1@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:03:53 -0700 Subject: [PATCH] fix a bug - return status for containerized service (#1547) --- deploy-agent/deployd/common/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy-agent/deployd/common/utils.py b/deploy-agent/deployd/common/utils.py index 726362f6b3..f6a5b7ba81 100644 --- a/deploy-agent/deployd/common/utils.py +++ b/deploy-agent/deployd/common/utils.py @@ -302,8 +302,10 @@ def get_container_health_info(commit, service, redeploy) -> Optional[str]: elif returnValue and "unhealthy" not in returnValue: send_statsboard_metric(name='deployd.service_health_status', value=1, tags={"status": "healthy", "service": service, "commit": commit}) - # if no check happens for the current service, check if it is a non container with healthcheck enabled - return redeploy_check_without_container_status(commit, service, redeploy) + if returnValue: + return returnValue + # if no check happens for the current service, check if it is a non container with healthcheck enabled + return redeploy_check_without_container_status(commit, service, redeploy) except: log.error(f"Failed to get container health info with commit {commit}") return None