From b3b2b8d047e85772ef94e4757bb45eb413c2d67b Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Wed, 29 Mar 2023 13:38:23 +0100 Subject: [PATCH 1/3] feat(chalice): ignore quickwit health-check --- ee/api/chalicelib/core/health.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/health.py b/ee/api/chalicelib/core/health.py index 1a84a9715..e530c4a64 100644 --- a/ee/api/chalicelib/core/health.py +++ b/ee/api/chalicelib/core/health.py @@ -156,7 +156,7 @@ def get_health(): "ingress-nginx": __always_healthy, "integrations": __check_be_service("integrations"), "peers": __check_be_service("peers"), - "quickwit": __check_be_service("quickwit"), + # "quickwit": __check_be_service("quickwit"), "sink": __check_be_service("sink"), "sourcemaps-reader": __check_be_service("sourcemapreader"), "storage": __check_be_service("storage") From d600c1ac2c191847e50f9ecc62df98c2c9a01746 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Wed, 29 Mar 2023 13:42:06 +0100 Subject: [PATCH 2/3] feat(chalice): changed health-check logs --- api/chalicelib/core/health.py | 4 ++-- ee/api/chalicelib/core/health.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/chalicelib/core/health.py b/api/chalicelib/core/health.py index ec5eeeb8f..a40e6f9b9 100644 --- a/api/chalicelib/core/health.py +++ b/api/chalicelib/core/health.py @@ -77,7 +77,7 @@ def __check_be_service(service_name): try: results = requests.get(HEALTH_ENDPOINTS.get(service_name), timeout=2) if results.status_code != 200: - print(f"!! issue with the storage-health code:{results.status_code}") + print(f"!! issue with the {service_name}-health code:{results.status_code}") print(results.text) # fail_response["details"]["errors"].append(results.text) return fail_response @@ -86,7 +86,7 @@ def __check_be_service(service_name): # fail_response["details"]["errors"].append("timeout") return fail_response except Exception as e: - print("!! Issue getting storage-health response") + print(f"!! Issue getting {service_name}-health response") print(str(e)) try: print(results.text) diff --git a/ee/api/chalicelib/core/health.py b/ee/api/chalicelib/core/health.py index e530c4a64..d20e47dae 100644 --- a/ee/api/chalicelib/core/health.py +++ b/ee/api/chalicelib/core/health.py @@ -79,7 +79,7 @@ def __check_be_service(service_name): try: results = requests.get(HEALTH_ENDPOINTS.get(service_name), timeout=2) if results.status_code != 200: - print(f"!! issue with the storage-health code:{results.status_code}") + print(f"!! issue with the {service_name}-health code:{results.status_code}") print(results.text) # fail_response["details"]["errors"].append(results.text) return fail_response @@ -88,7 +88,7 @@ def __check_be_service(service_name): # fail_response["details"]["errors"].append("timeout") return fail_response except Exception as e: - print("!! Issue getting storage-health response") + print(f"!! Issue getting {service_name}-health response") print(str(e)) try: print(results.text) From 480dd0cb00c9176e662a7bc6a96cd2d8d850bd3b Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Wed, 29 Mar 2023 13:47:20 +0100 Subject: [PATCH 3/3] feat(chalice): fixed health-check for sourcemaps-reader --- api/chalicelib/core/health.py | 2 +- ee/api/chalicelib/core/health.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/chalicelib/core/health.py b/api/chalicelib/core/health.py index a40e6f9b9..76fcf35ca 100644 --- a/api/chalicelib/core/health.py +++ b/api/chalicelib/core/health.py @@ -152,7 +152,7 @@ def get_health(): "integrations": __check_be_service("integrations"), "peers": __check_be_service("peers"), "sink": __check_be_service("sink"), - "sourcemaps-reader": __check_be_service("sourcemapreader"), + "sourcemaps-reader": __check_be_service("sourcemaps-reader"), "storage": __check_be_service("storage") } } diff --git a/ee/api/chalicelib/core/health.py b/ee/api/chalicelib/core/health.py index d20e47dae..26b3a2b24 100644 --- a/ee/api/chalicelib/core/health.py +++ b/ee/api/chalicelib/core/health.py @@ -158,7 +158,7 @@ def get_health(): "peers": __check_be_service("peers"), # "quickwit": __check_be_service("quickwit"), "sink": __check_be_service("sink"), - "sourcemaps-reader": __check_be_service("sourcemapreader"), + "sourcemaps-reader": __check_be_service("sourcemaps-reader"), "storage": __check_be_service("storage") } }