mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 06:08:12 +08:00
Remove deprecated health endpoint (#1943)
NOTE: do not push to main until the new path has been terraformed into all the environments. #1846
This commit is contained in:
@@ -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)
|
@webbp.errorhandler(RequestException)
|
||||||
def handle_request_exception(error):
|
def handle_request_exception(error):
|
||||||
return common_rest.abort_and_log(error.status_code, error.message, loglevel=logging.INFO, include_exc_info=True)
|
return common_rest.abort_and_log(error.status_code, error.message, loglevel=logging.INFO, include_exc_info=True)
|
||||||
|
|||||||
@@ -173,12 +173,6 @@ class TestServerConfig(ConfigTests):
|
|||||||
response = session.get(f"{server}/additional/path/health")
|
response = session.get(f"{server}/additional/path/health")
|
||||||
assert response.json()["status"] == "pass"
|
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):
|
def test_get_web_base_url_works(self):
|
||||||
config = self.get_config(web_base_url="www.thisisawebsite.com")
|
config = self.get_config(web_base_url="www.thisisawebsite.com")
|
||||||
web_base_url = config.server_config.get_web_base_url()
|
web_base_url = config.server_config.get_web_base_url()
|
||||||
|
|||||||
Reference in New Issue
Block a user