From 095db02439e7693797d7059bc83ff0c5e90894cf Mon Sep 17 00:00:00 2001 From: bmccandless Date: Fri, 13 Nov 2020 10:49:11 -0800 Subject: [PATCH] Remove deprecated health endpoint (#1943) NOTE: do not push to main until the new path has been terraformed into all the environments. #1846 --- server/app/app.py | 11 ----------- server/test/unit/common/config/test_server_config.py | 6 ------ 2 files changed, 17 deletions(-) diff --git a/server/app/app.py b/server/app/app.py index da167453..5f924703 100644 --- a/server/app/app.py +++ b/server/app/app.py @@ -105,17 +105,6 @@ def dataset_index(url_dataroot=None, dataset=None): ) -# TODO: This route will be deprecated, but needs to be left for a short time until all the -# deployments are upgraded to the new location for the health check (or else the upgrade will -# fail). Once the upgrade is complete, the deployments can move to the new health check URL -# and this route will be removed. -@webbp.route("/health", methods=["GET"]) -@cache_control_always(no_store=True) -def health(): - config = current_app.app_config - return health_check(config) - - @webbp.errorhandler(RequestException) def handle_request_exception(error): return common_rest.abort_and_log(error.status_code, error.message, loglevel=logging.INFO, include_exc_info=True) diff --git a/server/test/unit/common/config/test_server_config.py b/server/test/unit/common/config/test_server_config.py index 69257bfd..e7598b7f 100644 --- a/server/test/unit/common/config/test_server_config.py +++ b/server/test/unit/common/config/test_server_config.py @@ -173,12 +173,6 @@ class TestServerConfig(ConfigTests): response = session.get(f"{server}/additional/path/health") assert response.json()["status"] == "pass" - # also check that the old URL still works. - # NOTE: this old URL location will soon be deprecated, and when that happens - # this check can be removed. - response = session.get(f"{server}/health") - assert response.json()["status"] == "pass" - def test_get_web_base_url_works(self): config = self.get_config(web_base_url="www.thisisawebsite.com") web_base_url = config.server_config.get_web_base_url()