From 9b3cfbed13872683119d5a7f6e9ca2820ac0d970 Mon Sep 17 00:00:00 2001 From: courtneycb Date: Fri, 8 Nov 2019 11:39:34 +1300 Subject: [PATCH] Use default settings for split health checks. --- csfieldguide/config/urls.py | 2 -- csfieldguide/config/views.py | 12 ------------ csfieldguide/tests/config/urls/__init__.py | 1 - .../tests/config/urls/test_health_check_url.py | 13 ------------- infrastructure/dev-deploy/app-dev.yaml | 5 ----- infrastructure/prod-deploy/app-prod.yaml | 8 -------- 6 files changed, 41 deletions(-) delete mode 100644 csfieldguide/config/views.py delete mode 100644 csfieldguide/tests/config/urls/__init__.py delete mode 100644 csfieldguide/tests/config/urls/test_health_check_url.py diff --git a/csfieldguide/config/urls.py b/csfieldguide/config/urls.py index f52303a756..05cfae880a 100644 --- a/csfieldguide/config/urls.py +++ b/csfieldguide/config/urls.py @@ -7,7 +7,6 @@ from django.conf import settings from django.conf.urls.i18n import i18n_patterns from django.urls import include, path -from config.views import health_check urlpatterns = i18n_patterns( @@ -19,7 +18,6 @@ ) urlpatterns += [ - path("_ah/health", health_check), path("en/search/", include("search.urls", namespace="search")), ] diff --git a/csfieldguide/config/views.py b/csfieldguide/config/views.py deleted file mode 100644 index 8d5df5aba9..0000000000 --- a/csfieldguide/config/views.py +++ /dev/null @@ -1,12 +0,0 @@ -"""Views for the general application.""" - -from django.http import HttpResponse - - -def health_check(request): - """Return health check response for Google App Engine. - - Returns a 200 HTTP response for Google App Engine to detect the system - is running. - """ - return HttpResponse(status=200) diff --git a/csfieldguide/tests/config/urls/__init__.py b/csfieldguide/tests/config/urls/__init__.py deleted file mode 100644 index b2903b3214..0000000000 --- a/csfieldguide/tests/config/urls/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Module for tests of urls in the config application.""" diff --git a/csfieldguide/tests/config/urls/test_health_check_url.py b/csfieldguide/tests/config/urls/test_health_check_url.py deleted file mode 100644 index 28494eb8cb..0000000000 --- a/csfieldguide/tests/config/urls/test_health_check_url.py +++ /dev/null @@ -1,13 +0,0 @@ -from tests.BaseTestWithDB import BaseTestWithDB -from http import HTTPStatus - - -class HealthCheckURLTest(BaseTestWithDB): - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.language = "en" - - def test_valid_health_check_request(self): - response = self.client.get("/_ah/health") - self.assertEqual(HTTPStatus.OK, response.status_code) diff --git a/infrastructure/dev-deploy/app-dev.yaml b/infrastructure/dev-deploy/app-dev.yaml index 677f4b6b13..7e6bed365a 100644 --- a/infrastructure/dev-deploy/app-dev.yaml +++ b/infrastructure/dev-deploy/app-dev.yaml @@ -16,10 +16,5 @@ resources: cpu: 1 memory_gb: 3.75 -health_check: - enable_health_check: True - check_interval_sec: 5 - timeout_sec: 4 - manual_scaling: instances: 1 diff --git a/infrastructure/prod-deploy/app-prod.yaml b/infrastructure/prod-deploy/app-prod.yaml index 8662276223..4c2e5651fa 100644 --- a/infrastructure/prod-deploy/app-prod.yaml +++ b/infrastructure/prod-deploy/app-prod.yaml @@ -15,11 +15,3 @@ env_variables: resources: cpu: 1 memory_gb: 3.75 - -liveness_check: - path: "/_ah/health" - check_interval_sec: 5 - -readiness_check: - path: "/_ah/health" - check_interval_sec: 5