From cb76e0e0512bb8c09af7ad5505bb93a87b6781ad Mon Sep 17 00:00:00 2001 From: Alec Merdler Date: Thu, 18 Aug 2022 16:17:55 -0400 Subject: [PATCH] Remove references to local app admin view The local app '/admin' route is being removed because it does not provide any value, so we need to remove references from it in the CLI. --- src/lightning_app/cli/lightning_cli.py | 4 ++-- src/lightning_app/core/constants.py | 1 - tests/tests_app/core/test_lightning_api.py | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lightning_app/cli/lightning_cli.py b/src/lightning_app/cli/lightning_cli.py index 81d2a773b4619..876a663913a73 100644 --- a/src/lightning_app/cli/lightning_cli.py +++ b/src/lightning_app/cli/lightning_cli.py @@ -16,7 +16,7 @@ from lightning_app.cli.lightning_cli_create import create from lightning_app.cli.lightning_cli_delete import delete from lightning_app.cli.lightning_cli_list import get_list -from lightning_app.core.constants import get_lightning_cloud_url, LOCAL_LAUNCH_ADMIN_VIEW +from lightning_app.core.constants import get_lightning_cloud_url from lightning_app.runners.runtime import dispatch from lightning_app.runners.runtime_type import RuntimeType from lightning_app.utilities.app_logs import _app_logs_reader @@ -38,7 +38,7 @@ def get_app_url(runtime_type: RuntimeType, *args) -> str: lightning_app = args[0] return f"{get_lightning_cloud_url()}/me/apps/{lightning_app.id}" else: - return "http://127.0.0.1:7501/admin" if LOCAL_LAUNCH_ADMIN_VIEW else "http://127.0.0.1:7501/view" + return "http://127.0.0.1:7501/view" def main(): diff --git a/src/lightning_app/core/constants.py b/src/lightning_app/core/constants.py index 84a0da49c21cf..74a8dc17f141f 100644 --- a/src/lightning_app/core/constants.py +++ b/src/lightning_app/core/constants.py @@ -23,7 +23,6 @@ USER_ID = os.getenv("USER_ID", "1234") FRONTEND_DIR = os.path.join(os.path.dirname(lightning_app.__file__), "ui") PACKAGE_LIGHTNING = os.getenv("PACKAGE_LIGHTNING", None) -LOCAL_LAUNCH_ADMIN_VIEW = bool(int(os.getenv("LOCAL_LAUNCH_ADMIN_VIEW", "0"))) CLOUD_UPLOAD_WARNING = int(os.getenv("CLOUD_UPLOAD_WARNING", "2")) DISABLE_DEPENDENCY_CACHE = bool(int(os.getenv("DISABLE_DEPENDENCY_CACHE", "0"))) # Project under which the resources need to run in cloud. If this env is not set, diff --git a/tests/tests_app/core/test_lightning_api.py b/tests/tests_app/core/test_lightning_api.py index 1b2bf2fb52fd9..104ff198b864c 100644 --- a/tests/tests_app/core/test_lightning_api.py +++ b/tests/tests_app/core/test_lightning_api.py @@ -337,7 +337,6 @@ async def test_health_endpoint_failure(): ("/", 200), ("/asdf", 200), ("/view/component_a", 200), - ("/admin", 200), ), ) @pytest.mark.anyio