From 98194b9316fed7c10ffb497ab84191ab245bf885 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 6 Jul 2021 17:08:14 -0700 Subject: [PATCH] blueslip: Remove SAVE_FRONTEND_STACKTRACES setting. Signed-off-by: Anders Kaseorg --- static/js/blueslip.ts | 10 ---------- static/js/page_params.ts | 1 - static/js/zulip_test.js | 1 - zerver/lib/home.py | 1 - zerver/tests/test_home.py | 1 - zproject/default_settings.py | 4 ---- zproject/dev_settings.py | 2 -- 7 files changed, 20 deletions(-) diff --git a/static/js/blueslip.ts b/static/js/blueslip.ts index 051c742430..59cbd8f159 100644 --- a/static/js/blueslip.ts +++ b/static/js/blueslip.ts @@ -12,7 +12,6 @@ import * as blueslip_stacktrace from "./blueslip_stacktrace"; import {page_params} from "./page_params"; import * as ui_report from "./ui_report"; -export let last_stacktrace: string | undefined; if (Error.stackTraceLimit !== undefined) { Error.stackTraceLimit = 100000; } @@ -163,15 +162,6 @@ function report_error( } }, }); - - if (page_params.save_stacktraces) { - // Save the stacktrace so it can be examined even in - // development servers. (N.B. This assumes you have set DEBUG - // = False on your development server, or else this code path - // won't execute to begin with -- useful for testing - // (un)minification.) - last_stacktrace = stack; - } } class BlueslipError extends Error { diff --git a/static/js/page_params.ts b/static/js/page_params.ts index 60df12f79f..fd181728e4 100644 --- a/static/js/page_params.ts +++ b/static/js/page_params.ts @@ -10,7 +10,6 @@ export const page_params: { }[]; development_environment: boolean; request_language: string; - save_stacktraces: boolean; translation_data: Record; } = $("#page-params").remove().data("params"); const t2 = performance.now(); diff --git a/static/js/zulip_test.js b/static/js/zulip_test.js index 915ba7f322..907d596ffe 100644 --- a/static/js/zulip_test.js +++ b/static/js/zulip_test.js @@ -14,4 +14,3 @@ export {last_visible as last_visible_row, id as row_id} from "./rows"; export {cancel as cancel_compose} from "./compose_actions"; export {page_params, page_params_parse_time} from "./page_params"; export {initiate as initiate_reload} from "./reload"; -export {last_stacktrace} from "./blueslip"; diff --git a/zerver/lib/home.py b/zerver/lib/home.py index 6f4450275d..7f8912f6f7 100644 --- a/zerver/lib/home.py +++ b/zerver/lib/home.py @@ -189,7 +189,6 @@ def build_page_params_for_home_page_load( test_suite=settings.TEST_SUITE, insecure_desktop_app=insecure_desktop_app, login_page=settings.HOME_NOT_LOGGED_IN, - save_stacktraces=settings.SAVE_FRONTEND_STACKTRACES, warn_no_email=settings.WARN_NO_EMAIL, search_pills_enabled=settings.SEARCH_PILLS_ENABLED, # Only show marketing email settings if on Zulip Cloud diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index 871198f3e6..815ee9fdf0 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -203,7 +203,6 @@ class HomeTest(ZulipTestCase): "realm_wildcard_mention_policy", "recent_private_conversations", "request_language", - "save_stacktraces", "search_pills_enabled", "server_avatar_changes_disabled", "server_generation", diff --git a/zproject/default_settings.py b/zproject/default_settings.py index 1f5a7217f7..c8465c51fd 100644 --- a/zproject/default_settings.py +++ b/zproject/default_settings.py @@ -288,10 +288,6 @@ EMAIL_BACKEND: Optional[str] = None # Set in settings.py when email isn't configured. WARN_NO_EMAIL = False -# Whether to keep extra frontend stack trace data. -# TODO: Investigate whether this should be removed and set one way or other. -SAVE_FRONTEND_STACKTRACES = False - # If True, disable rate-limiting and other filters on sending error messages # to admins, and enable logging on the error-reporting itself. Useful # mainly in development. diff --git a/zproject/dev_settings.py b/zproject/dev_settings.py index 45fd0a2dfe..f5ab55e770 100644 --- a/zproject/dev_settings.py +++ b/zproject/dev_settings.py @@ -78,8 +78,6 @@ INVITES_MIN_USER_AGE_DAYS = 0 EMBEDDED_BOTS_ENABLED = True -SAVE_FRONTEND_STACKTRACES = True - SYSTEM_ONLY_REALMS: Set[str] = set() USING_PGROONGA = True # Flush cache after migration.